RFR: 8319386: Migrate Class::getEnclosingMethod/Constructor away from old generic utilities
Chen Liang
liach at openjdk.org
Wed Feb 28 02:05:48 UTC 2024
On Fri, 3 Nov 2023 14:03:02 GMT, Chen Liang <liach at openjdk.org> wrote:
> Please review a patch that migrates `Class::getEnclosingMethod` and `Class::getEnclosingConstructor`'s descriptor parsing from old generic utilities to more simple utilities from java.lang.invoke implementation. This will help migrate away from the old generic repositories in the future.
>
> The `getClassLoader()` call plus https://github.com/openjdk/jdk/blob/1a21c1a783d64ca0930c358c06a43975f96ffac6/src/java.base/share/classes/sun/invoke/util/BytecodeDescriptor.java#L93
> should be functionally equivalent to the previous `getDeclsLoader()`
> https://github.com/openjdk/jdk/blob/1a21c1a783d64ca0930c358c06a43975f96ffac6/src/java.base/share/classes/sun/reflect/generics/factory/CoreReflectionFactory.java#L60-L68
> plus
> https://github.com/openjdk/jdk/blob/1a21c1a783d64ca0930c358c06a43975f96ffac6/src/java.base/share/classes/sun/reflect/generics/factory/CoreReflectionFactory.java#L113-L114
Please review this patch that migrated descriptor parsing from old, complex Java 5 signature parsing system to the java.lang.invoke's descriptor parsing utilities.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16496#issuecomment-1968053393
More information about the core-libs-dev
mailing list