On Tue, 24 Mar 2026 03:29:46 GMT, Renjith Kannath Pariyangad 
<[email protected]> wrote:

>> test/jdk/javax/swing/RepaintManager/RemoveInvalidComponentTest.java line 71:
>> 
>>> 69:         JLabel label2 = new EqualLabel("label");
>>> 70: 
>>> 71:         System.out.println(label1.equals(label2));
>> 
>> I wonder whether it's better to enforce `label1.equals(label2)` returns 
>> `true` and fail the test otherwise:
>> 
>> 
>> Suggestion:
>> 
>>         if (!label1.equals(label2)) {
>>             throw new RuntimeException("label1.equals(label2) returned 
>> false");
>>         }
>
> Although this check is not our primary objective, it may become relevant in a 
> future revision.

It is *relevant* here. If `label1.equals(label2)` returns `false`, the 
prerequisite for the following statements isn't met.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30184#discussion_r2983210232

Reply via email to