On Thu, 15 Apr 2021 18:32:26 GMT, Valerie Peng <valer...@openjdk.org> wrote:

>> test/jdk/javax/crypto/KeyGenerator/CompareKeys.java line 73:
>> 
>>> 71:                 && !Arrays.equals(origKey.getEncoded(), 
>>> copyKey.getEncoded())
>>> 72:                 && origKey.hashCode() != copyKey.hashCode()) {
>>> 73:             throw new RuntimeException("Key inequality found");
>> 
>> Check the format equality as well?
>
> Should be || instead of &&? Would also be nice to know which one(s) failed.

Considering equality and hashCode check may not be same for all KeyTypes, i 
have relaxed the verification with || operator. Also added print statement for 
possible failure cause. Added verification for format too.

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

PR: https://git.openjdk.java.net/jdk/pull/3490

Reply via email to