RFR: 8265372: Simplify PKCS9Attribute [v2]

Valerie Peng valeriep at openjdk.org
Wed Jan 10 02:29:22 UTC 2024


On Thu, 21 Dec 2023 16:46:54 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> Ben Perez has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Minor fixes to make the code more readable, inlined init(), removed PKCS9Attributes.getAttributes()
>
> src/java.base/share/classes/sun/security/pkcs/PKCS9Attribute.java line 241:
> 
>> 239:     static {
>> 240:         try {
>> 241:             Class<?> str = Class.forName("[Ljava.lang.String;");
> 
> `String[].class`. In fact I wonder if it's worth define a variable for this. Just use the literal directly everywhere.

+1 for using literal directly everywhere...

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17132#discussion_r1446814658



More information about the security-dev mailing list