<i18n dev> RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v46]

Jim Laskey jlaskey at openjdk.org
Fri Mar 24 15:43:45 UTC 2023


On Wed, 22 Mar 2023 23:27:20 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Jim Laskey has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Tidy javadoc
>>  - Rename StringTemplate classes
>
> src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java line 1051:
> 
>> 1049:      * @param ptypes    list of expression types
>> 1050:      *
>> 1051:      * @return {@link MethodHandle}
> 
> Suggestion:
> 
>      * @return the {@link MethodHandle} for concatenation

Changing

> src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java line 1169:
> 
>> 1167:      * have an extra {@link String} slot for the result from the previous
>> 1168:      * {@link MethodHandle}.
>> 1169:      * {@link java.lang.invoke.StringConcatFactory#makeConcatWithTemplate}
> 
> Suggestion:
> 
>      * {@link #makeConcatWithTemplate}

Changing

> src/java.base/share/classes/java/lang/runtime/Carriers.java line 370:
> 
>> 368:          */
>> 369:         private static Map<MethodType, CarrierElements>
>> 370:                 methodTypeCache = ReferencedKeyMap.create(() -> new ConcurrentHashMap<>());
> 
> Suggestion:
> 
>                 methodTypeCache = ReferencedKeyMap.create(ConcurrentHashMap::new);

Changing

> src/java.base/share/classes/java/lang/runtime/Carriers.java line 421:
> 
>> 419:          */
>> 420:         protected CarrierObject(int primitiveCount, int objectCount) {
>> 421:             this.primitives = createPrimitivesArray(primitiveCount );
> 
> Suggestion:
> 
>             this.primitives = createPrimitivesArray(primitiveCount);

Changing

> src/java.base/share/classes/java/lang/runtime/Carriers.java line 776:
> 
>> 774:          * @throws IllegalArgumentException if number of component slots exceeds maximum
>> 775:          */
>> 776:         static CarrierElements of(Class < ? >...ptypes) {
> 
> Suggestion:
> 
>         static CarrierElements of(Class<?>... ptypes) {

Changing

> src/java.base/share/classes/java/lang/runtime/ReferenceKey.java line 49:
> 
>> 47: interface ReferenceKey<T> {
>> 48:     /**
>> 49:      * {@return the value of the unwrapped key.}
> 
> Suggestion:
> 
>      * {@return the value of the unwrapped key}
> 
> Inline return tag generates a period already.

Changing

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/10889#discussion_r1147750445
PR Review Comment: https://git.openjdk.org/jdk/pull/10889#discussion_r1147752071
PR Review Comment: https://git.openjdk.org/jdk/pull/10889#discussion_r1147757381
PR Review Comment: https://git.openjdk.org/jdk/pull/10889#discussion_r1147752347
PR Review Comment: https://git.openjdk.org/jdk/pull/10889#discussion_r1147755043
PR Review Comment: https://git.openjdk.org/jdk/pull/10889#discussion_r1147757878


More information about the i18n-dev mailing list