On Tue, 2 Jan 2024 18:22:51 GMT, Ben Perez <d...@openjdk.org> wrote:

>> src/java.base/share/classes/sun/security/pkcs/PKCS9Attribute.java line 186:
>> 
>>> 184:     /**
>>> 185:      * Array of attribute OIDs defined in PKCS9, by number.
>>> 186:      */
>> 
>> I don't think `PKCS9_OIDS` is useful now. It's used in 
>> `PKCS9Attributes.getAttributes()` but this method is used nowhere. It's also 
>> used in `PKCS9Attributes.toString` but we can just iterate through 
>> `attributes` there. I don't see a reason to print the attributes in this 
>> order. If we want to print them in the order they appear in the data, we can 
>> use `LinkedHashMap` to in `PKCS9Attributes`. `Hashtable` is a little stale.
>
> Do you think we can remove `PKCS9Attributes.getAttributes()` entirely or 
> should we just modify it to not use `PKCS9_OIDS` anymore?

I think we can remove both. There is no need to keep a useless method as long 
as it's not an exported API.

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

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

Reply via email to