<i18n dev> RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v57]
Roger Riggs
rriggs at openjdk.org
Thu Apr 13 18:13:19 UTC 2023
On Wed, 12 Apr 2023 19:02:22 GMT, Jim Laskey <jlaskey at openjdk.org> wrote:
>> Enhance the Java programming language with string templates, which are similar to string literals but contain embedded expressions. A string template is interpreted at run time by replacing each expression with the result of evaluating that expression, possibly after further validation and transformation. This is a [preview language feature and API](http://openjdk.java.net/jeps/12).
>
> Jim Laskey has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 75 commits:
>
> - Merge branch 'master' into 8285932
> - Change MAX_INDY_CONCAT_ARG_SLOTS to be updatable.
> - Clean up Error handling
> - Recommended changes
> - RuntimeException is the only exception type that can is deduced from a lambda.
> - Update combine example
> - Merge branch 'master' into 8285932
> - Update StringTemplate.combine javadoc
> - Requested review changes.
> - Clean up list construction
> - ... and 65 more: https://git.openjdk.org/jdk/compare/bc151633...f1b187a1
The PreviewFeature annotations can/should be removed from classes/methods that are not part of the public interface. They are unnecessary and possibly misleading, implying part of the public interface.
src/java.base/share/classes/java/lang/runtime/Carriers.java line 554:
> 552:
> 553: /**
> 554: * Class used to tally ahd track the number of ints, longs and objects.
typo: ahd
src/java.base/share/classes/jdk/internal/util/FormatConcatItem.java line 37:
> 35: * @since 21
> 36: */
> 37: @PreviewFeature(feature=PreviewFeature.Feature.STRING_TEMPLATES)
Generally, The `PreviewFeature` annotation is not needed on internal APIs and serves little purpose.
-------------
PR Review: https://git.openjdk.org/jdk/pull/10889#pullrequestreview-1383555414
PR Review Comment: https://git.openjdk.org/jdk/pull/10889#discussion_r1165702256
PR Review Comment: https://git.openjdk.org/jdk/pull/10889#discussion_r1165631226
More information about the i18n-dev
mailing list