On Wed, 1 Jul 2026 11:25:19 GMT, Alan Bateman <[email protected]> wrote:

>> Chen Liang has updated the pull request with a new target base due to a 
>> merge or a rebase. The incremental webrev excludes the unrelated changes 
>> brought in by the merge/rebase. The pull request contains six additional 
>> commits since the last revision:
>> 
>>  - Merge branch 'lworld' of https://github.com/openjdk/valhalla into 
>> doc/lw-reflect-preview-api-0
>>  - Merge branch 'lworld' of https://github.com/openjdk/valhalla into 
>> doc/lw-reflect-preview-api-0
>>  - Merge branch 'lworld' of https://github.com/openjdk/valhalla into 
>> doc/lw-reflect-preview-api-0
>>  - Reword recommendations
>>  - Make requireIdentity reflective
>>  - Reflective preview API behavior out of preview
>
> src/java.base/share/classes/java/lang/Class.java line 1392:
> 
>> 1390:      *      <div class="preview-comment">
>> 1391:      *          When preview features are enabled, if this {@code 
>> Class} object
>> 1392:      *          represents a class whose {@code class} file does not 
>> use preview
> 
> It might be smoother to start with "When preview features are enabled and 
> this Class object ..."

Done. Also used "either a class whose.... or an array type" to make clear what 
"or" is switching on.

> src/java.base/share/classes/java/lang/classfile/attribute/StackMapFrameInfo.java
>  line 89:
> 
>> 87:      * unset fields, the {@code class} file must declare it uses preview
>> 88:      * features.  The list of unset fields is always empty for a stack 
>> map frame
>> 89:      * declared in a {@code class} file that does not use preview 
>> features.
> 
> It might be a bit more readable to swap the sentences so that it's initially 
> clear that the list is always empty when they class does not use preview 
> features. It may be non-empty when the class uses preview features. Just a 
> suggestion as I had to read the paragraph a few times to digest it.

Reordered so it now flows like "if non-preview empty; otherwise preview if 
non-empty"

> src/java.base/share/classes/java/util/Objects.java line 203:
> 
>> 201:      * features are enabled.  Value objects do not exist when preview 
>> features
>> 202:      * are disabled; consequently, this method behaves the same as 
>> {@link
>> 203:      * #nonNull Objects.nonNull} when preview features are disabled.
> 
> "Value objects do not exist when preview features are disabled".  What would 
> you think about just saying that "All objects are identity objects when 
> preview features are disabled"?

Done.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2578#discussion_r3513948902
PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2578#discussion_r3513958817
PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2578#discussion_r3513950329

Reply via email to