On Wed, 5 Feb 2025 16:29:24 GMT, Shaojin Wen <s...@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

Reply via email to