RFR: 8282191: Implementation of Foreign Function & Memory API (Preview) [v39]
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Fri May 6 11:51:46 UTC 2022
On Fri, 6 May 2022 08:42:12 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> src/java.base/share/classes/jdk/internal/reflect/Reflection.java line 120:
>>
>>> 118: // if there is no caller class, act as if the call came from an unnamed module
>>> 119: Module module = currentClass != null ?
>>> 120: currentClass.getModule() : Holder.FALLBACK_MODULE;
>>
>> This can be simplified to:
>>
>> Module module = currentClass != null ?
>> currentClass.getModule() : ClassLoader::getSystemClassLoader().getUnnamedModule();
>>
>>
>> No need to have the Holder class.
>
> gah! I missed that :-)
I've addressed these comments (thanks!) and also added some tests for these corner cases.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7888
More information about the build-dev
mailing list