RFR: 8349400: Improve startup speed via eliminating nested classes
Johannes Graham
duke at openjdk.org
Thu Feb 6 23:48:18 UTC 2025
On Wed, 5 Feb 2025 16:29:24 GMT, Shaojin Wen <swen at openjdk.org> wrote:
>> src/java.base/share/classes/sun/security/util/KnownOIDs.java line 494:
>>
>>> 492: this.stdName = stdName;
>>> 493: this.registerNames = registerNames;
>>> 494: this.aliases = new String[0];
>>
>> Unless this String[] needs to be unique, it would be sufficient to use the same empty array everywhere.
>
> you are right, but accessing static field from enum constructor is not allowed
You could define the static field on another class, like SecurityConstants, and then use it in the enum constructor.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23411#discussion_r1945623744
More information about the security-dev
mailing list