RFR: 8261880: Change nested classes in java.base to static nested classes where possible [v2]

Сергей Цыпанов github.com+10835776+stsypanov at openjdk.java.net
Wed Feb 17 16:38:04 UTC 2021

On Wed, 17 Feb 2021 16:24:46 GMT, Claes Redestad <redestad at openjdk.org> wrote:

>> Сергей Цыпанов has updated the pull request incrementally with one additional commit since the last revision:
>>   8261880: Remove static from declarations of Holder nested classes
> src/java.base/share/classes/java/lang/invoke/DelegatingMethodHandle.java line 192:
>> 190: 
>> 191:     /* Placeholder class for DelegatingMethodHandles generated ahead of time */
>> 192:     static final class Holder {}
> For the four `Holder` classes in `java.lang.invoke`, the class is generated when running jlink via `java.lang.invoke.GenerateJLIClassesHelper`. To stay in sync with the definition you'd have to update that code. Also, since these `Holder` classes will only contain static methods and are never instantiated then I'm not sure it matters whether the classes are static or not.

I'll just revert them


PR: https://git.openjdk.java.net/jdk/pull/2589

More information about the security-dev mailing list