On Mon, 5 Jun 2023 18:02:34 GMT, Joe Darcy <da...@openjdk.org> wrote:

>> src/java.base/share/classes/java/lang/System.java line 758:
>> 
>>> 756:      *     <td>Greatest Java class file format version recognized by 
>>> the runtime as {@code "MAJOR.MINOR"}
>>> 757:      *     where {@link 
>>> java.lang.reflect.ClassFileFormatVersion#major() MAJOR} and {@code MINOR}
>>> 758:      *     are both formatted as decimal integers</td></tr>
>> 
>> I'm not sure about using the adjective "Greatest" here, only because 
>> "Greatest ... recognized" reads a bit like recognition of greatness when it 
>> really wants to convey that it's the highest version recognized.
>> 
>> Does the wording need to take account of running with preview features 
>> enabled? 
>> 
>> The table uses "Java runtime" rather than "runtime" in the description of 
>> some of the other properties.
>> 
>> In passing, should the descriptions of RELEASE_xxx in ClassFileFormatVersion 
>> say "The highest version recognized" rather than the "The version 
>> recognized"?
>
> Update PR and CSR to use the wording:
> 
> "Latest Java class file format version recognized by the Java runtime as 
> "MAJOR.MINOR" where MAJOR and MINOR are both formatted as decimal integers"
> 
> While it wouldn't be unreasonable to assume that when running under 
> --enable-preview that the minor version was 65535, it is printed out as 0 
> with or without preview being enabled.
> 
> I didn't want to broach preview-ness as part of this update to either promise 
> or document the current behavior.

Related to Alan's comment on RELEASE_xxx in ClassFileFormatVersion, perhaps the 
class description can clarify that a class file version has major version 
number `M` and minor version number `m` and a Java Virtual Machine 
implementation can support a class file format of version v if and only if v 
lies in some contiguous range Mi.0 ≤ v ≤ Mj.m.   RELEASE_xxx represents the 
major version number. 

That way, the description of RELEASE_xxx can remain to say "The version 
recognized...".

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14305#discussion_r1218619362

Reply via email to