RFR: JDK-8344368 : IndependenceSwingTest.java and IndependenceAWTTest.java failed: Selected text & clipboard contents differs [v2]
Harshitha Onkar
honkar at openjdk.org
Mon Dec 2 19:03:55 UTC 2024
On Mon, 2 Dec 2024 18:27:52 GMT, Alexander Zuev <kizune at openjdk.org> wrote:
>> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:
>>
>> removed redundant null check
>
> test/jdk/java/awt/datatransfer/Independence/IndependenceAWTTest.java line 167:
>
>> 165: robot.waitForIdle(500);
>> 166:
>> 167: if (primaryClip != null) {
>
> Do we even need this check? I mean in the getPrimaryClipboard() you throw a runtime exception if primaryClip is null. The only possible option when there is no exception thrown and primaryClip is null is when inside getPrimaryClipboard() HeadlessException happened which should not be the case because of headful tag in the header. So what are we checking for here? In original test it was a soft way to skip test on Windows and macOS but you eliminated that check and added platform requirement to the header.
That's correct, the check is redundant and no longer needed after the addition of `@requires` tag. Removed it in the latest commit.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22490#discussion_r1866454824
More information about the client-libs-dev
mailing list