RFR: 8327980: Convert javax/swing/JToggleButton/4128979/bug4128979.java applet test to main [v2]
Harshitha Onkar
honkar at openjdk.org
Thu Mar 14 17:07:42 UTC 2024
On Wed, 13 Mar 2024 05:38:35 GMT, Abhishek Kumar <abhiscxk at openjdk.org> wrote:
>> Conversion of manual applet test to main based using PassFailJFrame manual framework
>
> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision:
>
> Review comment fix
Please remove unused imports
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");
-------------
Changes requested by honkar (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/18233#pullrequestreview-1937291754
PR Review Comment: https://git.openjdk.org/jdk/pull/18233#discussion_r1525227378
More information about the client-libs-dev
mailing list