On Tue, 17 Dec 2024 12:57:43 GMT, Daniel Jeliński <[email protected]> wrote:
>> test/lib/jdk/test/lib/Asserts.java line 448:
>>
>>> 446: if ((lhs == rhs) || (lhs != null && lhs.equals(rhs))) {
>>> 447: msg = Objects.toString(msg, "assertNotEquals")
>>> 448: + ": expected not equals but was " +
>>> Objects.toString(lhs);
>>
>> Same comment as above `assertNotEqualsByteArray(byte[] lhs, byte[] rhs,
>> String msg)`
>
> This might hide problems with the implementation of `equals`
But this would be very uncommon and once it happens the developer would find
out the problem, right?
Maybe I can use `Objects.toString(rhs)` in the message. `lhs` (as the expected
value) is more likely to be a constant.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21101#discussion_r1888624756