RFR: 8327980: Convert javax/swing/JToggleButton/4128979/bug4128979.java applet test to main [v2]
Abhishek Kumar
abhiscxk at openjdk.org
Thu Mar 14 18:01:55 UTC 2024
On Thu, 14 Mar 2024 17:04:22 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:
>> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Review comment fix
>
> test/jdk/javax/swing/JToggleButton/bug4128979.java line 69:
>
>> 67:
>> 68: public static void main(String[] args) throws Exception {
>> 69: UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel");
>
> As the test is for Windows only it is good to have OS check along with the `@requires (os.family == "windows")` and throw skipped exception otherwise.
>
> Since it is followed by setting `WindowsClassicLookAndFeel` all the more reason to include this check.
>
> Suggestion:
>
> if (OSInfo.getOSType() != OSInfo.OSType.WINDOWS) {
> throw new SkippedException("This test is for Windows only");
> }
> UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel");
Updated.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18233#discussion_r1525298637
More information about the client-libs-dev
mailing list