Re: RFR: 8297271: AccessFlags should be specific to class file version [v2]

2022-12-07 Thread Roger Riggs
On Wed, 7 Dec 2022 20:17:57 GMT, Joe Darcy wrote: >> Should the masking out unassigned bits that is done in this method be >> extended to the existing `AccessFlag.maskToAccessFlags(mask, location)`; >> Instead of throwing `IllegalArgumentException`? >> The two methods should be consistent in t

Re: RFR: 8297271: AccessFlags should be specific to class file version [v2]

2022-12-07 Thread Joe Darcy
On Wed, 7 Dec 2022 19:59:08 GMT, Roger Riggs wrote: > Should the masking out unassigned bits that is done in this method be > extended to the existing `AccessFlag.maskToAccessFlags(mask, location)`; > Instead of throwing `IllegalArgumentException`? The two methods should be > consistent in thi

Re: RFR: 8297271: AccessFlags should be specific to class file version [v2]

2022-12-07 Thread Roger Riggs
On Tue, 6 Dec 2022 03:33:25 GMT, Joe Darcy wrote: >> I would propose to say: >> >> Mask bits that do not match an {@code AccessFlag} for the location and >> class file format version are ignored. >> >> The case arises when the mask argument contains mask bits that are not >> cons

Re: RFR: 8297271: AccessFlags should be specific to class file version [v3]

2022-12-06 Thread Roger Riggs
> The accessFlags() methods added (in JDK 20, the current release) to > java.lang.Class, java.lang.reflect.Executable, and java.lang.reflect.Field > implicitly uses the access flags from the current/most recent class file > format version. For current and past class file format versions there ar

Re: RFR: 8297271: AccessFlags should be specific to class file version [v2]

2022-12-05 Thread Joe Darcy
On Mon, 5 Dec 2022 23:33:14 GMT, Roger Riggs wrote: >> src/java.base/share/classes/java/lang/reflect/AccessFlag.java line 519: >> >>> 517: * @param cffv the class file format version >>> 518: */ >>> 519: public static Set maskToAccessFlags(int mask, Location >>> location, >> >> T

Re: RFR: 8297271: AccessFlags should be specific to class file version [v2]

2022-12-05 Thread Joe Darcy
On Mon, 5 Dec 2022 23:10:20 GMT, Roger Riggs wrote: >> src/java.base/share/classes/java/lang/Class.java line 1345: >> >>> 1343: * its {@code INTERFACE} flag is absent, even when the >>> 1344: * component type is an interface >>> 1345: * its class file format version is that

Re: RFR: 8297271: AccessFlags should be specific to class file version [v2]

2022-12-05 Thread Roger Riggs
On Mon, 5 Dec 2022 21:47:29 GMT, Joe Darcy wrote: >> Roger Riggs has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Updated the descriptions of AccessFlags being dependent on the class file >> version number. >>Removed unnecessary te

Re: RFR: 8297271: AccessFlags should be specific to class file version [v2]

2022-12-05 Thread Roger Riggs
On Mon, 5 Dec 2022 21:43:03 GMT, Joe Darcy wrote: >> Roger Riggs has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Updated the descriptions of AccessFlags being dependent on the class file >> version number. >>Removed unnecessary te

Re: RFR: 8297271: AccessFlags should be specific to class file version [v2]

2022-12-05 Thread Joe Darcy
On Mon, 5 Dec 2022 19:52:20 GMT, Roger Riggs wrote: >> The accessFlags() methods added (in JDK 20, the current release) to >> java.lang.Class, java.lang.reflect.Executable, and java.lang.reflect.Field >> implicitly uses the access flags from the current/most recent class file >> format version

Re: RFR: 8297271: AccessFlags should be specific to class file version [v2]

2022-12-05 Thread Joe Darcy
On Mon, 5 Dec 2022 19:52:20 GMT, Roger Riggs wrote: >> The accessFlags() methods added (in JDK 20, the current release) to >> java.lang.Class, java.lang.reflect.Executable, and java.lang.reflect.Field >> implicitly uses the access flags from the current/most recent class file >> format version

Re: RFR: 8297271: AccessFlags should be specific to class file version [v2]

2022-12-05 Thread Roger Riggs
> The accessFlags() methods added (in JDK 20, the current release) to > java.lang.Class, java.lang.reflect.Executable, and java.lang.reflect.Field > implicitly uses the access flags from the current/most recent class file > format version. For current and past class file format versions there ar

Re: RFR: 8297271: AccessFlags should be specific to class file version

2022-11-29 Thread Joe Darcy
On Tue, 29 Nov 2022 15:33:44 GMT, Roger Riggs wrote: > Yes, the location information via > `AccessFlags.locations(ClassFileFormatVersion)` provides the needed > information. And the tests verify that information. My objective was to make > the AccessFlags returned for a class reflect the class

Re: RFR: 8297271: AccessFlags should be specific to class file version

2022-11-29 Thread Roger Riggs
On Mon, 28 Nov 2022 22:56:27 GMT, Roger Riggs wrote: > The accessFlags() methods added (in JDK 20, the current release) to > java.lang.Class, java.lang.reflect.Executable, and java.lang.reflect.Field > assume the access flags are from the current/most recent class file format > version. For cu

Re: RFR: 8297271: AccessFlags should be specific to class file version

2022-11-28 Thread Joe Darcy
On Mon, 28 Nov 2022 22:56:27 GMT, Roger Riggs wrote: > The accessFlags() methods added (in JDK 20, the current release) to > java.lang.Class, java.lang.reflect.Executable, and java.lang.reflect.Field > assume the access flags are from the current/most recent class file format > version. For cu

RFR: 8297271: AccessFlags should be specific to class file version

2022-11-28 Thread Roger Riggs
The accessFlags() methods added (in JDK 20, the current release) to java.lang.Class, java.lang.reflect.Executable, and java.lang.reflect.Field assume the access flags are from the current/most recent class file format version. For current and past class file format versions there are few signif