Re: [jdk17] RFR: 8269409: Post JEP 411 refactoring: core-libs with maximum covering > 10K [v2]
On Sat, 26 Jun 2021 16:53:30 GMT, Alan Bateman wrote: >> Weijun Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> one more > > src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java line > 53: > >> 51: private static final long CURRENT_PID = >> AccessController.doPrivileged( >> 52: (PrivilegedAction) >> ProcessHandle::current).pid(); >> 53: > > The original code separated out the declaration of the PrivilegedAction to > avoid this cast. If you move the code from the original static initializer > into a static method that it called from initializer then it might provide > you with a cleaner way to refactor this. There are several other places in > this patch that could do with similar cleanup. This cast is only to tell the compiler which overloaded method to call, and I don't think there will be a real cast at runtime. It might look a little ugly but extracting it into a variable declaration/definition plus a new `initStatic` method seems not worth doing, IMHO. - PR: https://git.openjdk.java.net/jdk17/pull/152
[jdk17] Integrated: JDK-8266269: Lookup::accessClass fails with IAE when accessing an arrayClass with a protected inner class as component class
On Thu, 24 Jun 2021 18:42:23 GMT, Mandy Chung wrote: > `Lookup::accessClass` should determine the accessibility of the element type. > An array class is accessible if and only if its element type is accessible. > > This also fixes a spec bug to document `@throws NullPointerException` if the > argument is null. > > Please review the CSR: > https://bugs.openjdk.java.net/browse/JDK-8269312 This pull request has now been integrated. Changeset: 6eb734a6 Author:Mandy Chung URL: https://git.openjdk.java.net/jdk17/commit/6eb734a60fdd982c94dd152a803809f148bff582 Stats: 102 lines in 5 files changed: 84 ins; 2 del; 16 mod 8266269: Lookup::accessClass fails with IAE when accessing an arrayClass with a protected inner class as component class Reviewed-by: chegar, alanb - PR: https://git.openjdk.java.net/jdk17/pull/137
Re: [jdk17] RFR: JDK-8266269: Lookup::accessClass fails with IAE when accessing an arrayClass with a protected inner class as component class [v2]
On Fri, 25 Jun 2021 18:46:30 GMT, Mandy Chung wrote: >> `Lookup::accessClass` should determine the accessibility of the element >> type. An array class is accessible if and only if its element type is >> accessible. >> >> This also fixes a spec bug to document `@throws NullPointerException` if the >> argument is null. >> >> Please review the CSR: >> https://bugs.openjdk.java.net/browse/JDK-8269312 > > Mandy Chung has updated the pull request incrementally with one additional > commit since the last revision: > > remove extra import I also notice that `t8150782` outliner. It'd actually prefer to remove the directory `t8150782` or place the tests in a directory name with descriptive name. That can be cleaned up as a separate issue. - PR: https://git.openjdk.java.net/jdk17/pull/137
Re: [jdk17] RFR: JDK-8266269: Lookup::accessClass fails with IAE when accessing an arrayClass with a protected inner class as component class [v2]
On Fri, 25 Jun 2021 18:46:30 GMT, Mandy Chung wrote: >> `Lookup::accessClass` should determine the accessibility of the element >> type. An array class is accessible if and only if its element type is >> accessible. >> >> This also fixes a spec bug to document `@throws NullPointerException` if the >> argument is null. >> >> Please review the CSR: >> https://bugs.openjdk.java.net/browse/JDK-8269312 > > Mandy Chung has updated the pull request incrementally with one additional > commit since the last revision: > > remove extra import Looks okay. In passing I think t8150782 is the only test directory using that naming convention. There are several tests using in the directory name. - Marked as reviewed by alanb (Reviewer). PR: https://git.openjdk.java.net/jdk17/pull/137
Re: [jdk17] RFR: 8269409: Post JEP 411 refactoring: core-libs with maximum covering > 10K [v2]
On Fri, 25 Jun 2021 23:40:27 GMT, Weijun Wang wrote: >> More refactoring to limit the scope of `@SuppressWarnings` annotations. >> >> Sometimes I introduce new methods. Please feel free to suggest method names >> you like to use. > > Weijun Wang has updated the pull request incrementally with one additional > commit since the last revision: > > one more src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java line 53: > 51: private static final long CURRENT_PID = AccessController.doPrivileged( > 52: (PrivilegedAction) > ProcessHandle::current).pid(); > 53: The original code separated out the declaration of the PrivilegedAction to avoid this cast. If you move the code from the original static initializer into a static method that it called from initializer then it might provide you with a cleaner way to refactor this. There are several other places in this patch that could do with similar cleanup. - PR: https://git.openjdk.java.net/jdk17/pull/152
Release of ASM 9.2
Hi everybody, we are happy to announce the release of ASM 9.2 which support Java 18 (available via Maven Central). I still hope to find the time this summer to work of the support of Valhalla new bytecodes. RĂ©mi
[jdk17] Integrated: JDK-8269351: Proxy::newProxyInstance and MethodHandleProxies::asInterfaceInstance should reject sealed interfaces
On Fri, 25 Jun 2021 17:24:58 GMT, Mandy Chung wrote: > `java.lang.reflect.Proxy::newProxyInstance` and > `java.lang.invoke.MethodHandleProxies::asInterfaceInstance` do not specify > how to deal with sealed interfaces. These APIs should reject sealed > interface with `IllegalArgumentException` which is thrown if the given > interface is invalid. > > Please review CSR: > https://bugs.openjdk.java.net/browse/JDK-8269396 This pull request has now been integrated. Changeset: 3d0d27ce Author:Mandy Chung URL: https://git.openjdk.java.net/jdk17/commit/3d0d27ce57b4456b6fab86f05e105241ddf8471e Stats: 101 lines in 4 files changed: 97 ins; 0 del; 4 mod 8269351: Proxy::newProxyInstance and MethodHandleProxies::asInterfaceInstance should reject sealed interfaces Reviewed-by: darcy, alanb - PR: https://git.openjdk.java.net/jdk17/pull/148
Re: [jdk17] RFR: 8269409: Post JEP 411 refactoring: core-libs with maximum covering > 10K [v2]
On Fri, 25 Jun 2021 23:40:27 GMT, Weijun Wang wrote: >> More refactoring to limit the scope of `@SuppressWarnings` annotations. >> >> Sometimes I introduce new methods. Please feel free to suggest method names >> you like to use. > > Weijun Wang has updated the pull request incrementally with one additional > commit since the last revision: > > one more Marked as reviewed by lancea (Reviewer). - PR: https://git.openjdk.java.net/jdk17/pull/152
Re: RFR: 6766844: ByteArrayInputStream#read with a byte array of length 0 not consistent with InputStream when at EOF [v4]
On Fri, 25 Jun 2021 20:50:47 GMT, Brian Burkhalter wrote: >> src/java.base/share/classes/java/io/ByteArrayInputStream.java line 163: >> >>> 161: * @apiNote >>> 162: * Unlike the {@link InputStream#read(byte[],int,int) equivalent >>> method} >>> 163: * of {@code InputStream}, this method returns {@code -1} instead >>> of zero >> >> I think I would say superclass method instead of equivalent method. >> Or prehaps overridden method. > > I think overridden would work best. I think it needs to be normative text rather than an apiNote (but I'm happy that it is now a javadoc change rather than a potentially breaking implementation change). - PR: https://git.openjdk.java.net/jdk/pull/4591