RFR: 8315981: Opensource five more random Swing tests [v2]

Alexander Zvegintsev azvegint at openjdk.org
Mon Sep 18 22:25:42 UTC 2023


On Thu, 14 Sep 2023 15:28:40 GMT, Alexander Zuev <kizune at openjdk.org> wrote:

>> Clean up and open source five tests:
>> javax/swing/DefaultListCellRenderer/4180943/bug4180943.java
>> javax/swing/DefaultListModel/4466250/bug4466250.java
>> javax/swing/DefaultListSelectionModel/4140619/bug4140619.java
>> javax/swing/DefaultListSelectionModel/4177723/bug4177723.java
>> javax/swing/ImageIcon/4827074/bug4827074.java
>
> Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update test/jdk/javax/swing/ImageIcon/4827074/bug4827074.java
>   
>   Co-authored-by: Andrey Turbanov <turbanoff at gmail.com>

Marked as reviewed by azvegint (Reviewer).

test/jdk/javax/swing/DefaultListCellRenderer/4180943/bug4180943.java line 34:

> 32: public class bug4180943 {
> 33:     public static void main(String[] argv) {
> 34:         DefaultListCellRenderer lcr1 = new DefaultListCellRenderer();

In this case not critical to the test, but I think it would be a good example for others to perform Swing related code on EDT.
(applicable to all tests).

test/jdk/javax/swing/ImageIcon/4827074/bug4827074.java line 55:

> 53:     synchronized static void setPassed(boolean p) {
> 54:         passed = p;
> 55:     }

Why not just set `passed` to true directly on the line 100?

test/jdk/javax/swing/ImageIcon/4827074/bug4827074.java line 70:

> 68:             ex.printStackTrace();
> 69:         }
> 70:         return _ii;

Looks like the return value is not used.

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

PR Review: https://git.openjdk.org/jdk/pull/15724#pullrequestreview-1632048875
PR Review Comment: https://git.openjdk.org/jdk/pull/15724#discussion_r1329338740
PR Review Comment: https://git.openjdk.org/jdk/pull/15724#discussion_r1329329954
PR Review Comment: https://git.openjdk.org/jdk/pull/15724#discussion_r1329328849


More information about the client-libs-dev mailing list