RFR: 8261880: Change nested classes in java.base to static nested classes where possible [v2]
Claes Redestad
redestad at openjdk.java.net
Wed Feb 17 17:27:56 UTC 2021
On Wed, 17 Feb 2021 16:35:02 GMT, liach <github.com+7806504+liach at openjdk.org> wrote:
>> I'll just revert them
>
> For static methods, since in java language you cannot declare static method in instance inner classes, I'd say making them static makes more sense language-wise. Also making them static reduces compiler synthetic instance field and constructors.
Incidentally, Java-the-language allows static methods in inner instance classes since JDK 16. And I'm not sure this was ever a restriction at the JVMS level since we've been generating static methods (using ASM) into these inner instance classes since at least JDK 9.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2589
More information about the security-dev
mailing list