RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton
Alexey Ivanov
aivanov at openjdk.java.net
Tue May 24 10:47:57 UTC 2022
On Mon, 16 May 2022 06:45:04 GMT, Tejesh R <duke at openjdk.java.net> wrote:
> Added test for checking setMargin() of JRadioButton.
test/jdk/javax/swing/JRadioButton/bug4380543.java line 143:
> 141: {
> 142: disposeUI();
> 143: if (res.toString() == "false")
This looks weird. Why can't you use `res.get()`? It returns a `Boolean` object which can be used directly in an if-condition.
test/jdk/javax/swing/JRadioButton/bug4380543.java line 208:
> 206: getContentPane().add(p,BorderLayout.SOUTH);
> 207:
> 208: setDefaultCloseOperation(EXIT_ON_CLOSE);
You should never call `System.exit` in a jtreg test.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8721
More information about the client-libs-dev
mailing list