On Wed, 31 Aug 2022 22:25:57 GMT, Weijun Wang <wei...@openjdk.org> wrote:

>> Don't know what you mean about changing `toString`. I could change `equals` 
>> to something like:
>> 
>> 
>> public boolean equals(Object other) {
>>         if (!(other instanceof PKCS10Attributes))
>>             return false;
>> 
>>         Collection<PKCS10Attribute> othersAttribs =
>>                 ((PKCS10Attributes)other).getAttributes();
>>         PKCS10Attribute[] attrs =
>>                 othersAttribs.toArray(new PKCS10Attribute[0]);
>>         PKCS10Attributes foo = new PKCS10Attributes(attrs);
>>         return this.map.equals(foo.map);
>> }
>
> Sorry, I meant `equals`. Why cannot we just compare with `other.map`?

Ah, I see. The key for an attr might not be the id.

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

PR: https://git.openjdk.org/jdk/pull/9972

Reply via email to