RFR: 8315883: Open source several Swing JToolbar tests [v2]

Damon Nguyen dnguyen at openjdk.org
Mon Sep 18 18:55:41 UTC 2023


On Mon, 18 Sep 2023 13:50:20 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Review comments update
>
> test/jdk/javax/swing/JToolBar/bug4138694.java line 48:
> 
>> 46:     public static void main(String[] args) throws InterruptedException,
>> 47:             InvocationTargetException {
>> 48:         SwingUtilities.invokeAndWait(() -> {
> 
> This code can be safely run on the main thread, it does not depend on handling any events.

In our group discussions, it was decided that running components on the EDT anyway was better even though the test is headless and doesn't necessarily require being run on the EDT.

> test/jdk/javax/swing/JToolBar/bug4138694.java line 54:
> 
>> 52:             jtb.add(aa);
>> 53:             JComponent c = (JComponent)jtb.getComponentAtIndex(0);
>> 54:             if (!c.getToolTipText().equals("Action")) {
> 
> You may want to introduce a constant for `"Action"`.

Added. Thanks!

> test/jdk/javax/swing/JToolBar/bug4140421.java line 38:
> 
>> 36:     public static void main(String[] args) throws InterruptedException,
>> 37:             InvocationTargetException {
>> 38:         SwingUtilities.invokeAndWait(() -> {
> 
> This code can be run safely on the main thread.

Response on first instance above.

> test/jdk/javax/swing/JToolBar/bug4196662.java line 39:
> 
>> 37:     public static void main(String[] args) throws InterruptedException,
>> 38:             InvocationTargetException {
>> 39:         SwingUtilities.invokeAndWait(() -> {
> 
> I think this can also be run on the main thread, if you like.

Response on first instance above.

> test/jdk/javax/swing/JToolBar/bug4243930.java line 48:
> 
>> 46:     public static void main(String[] argv) throws InterruptedException,
>> 47:             InvocationTargetException {
>> 48:         SwingUtilities.invokeAndWait(() -> {
> 
> Also safe to run on the main thread.

Response on first instance above.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15748#discussion_r1329150216
PR Review Comment: https://git.openjdk.org/jdk/pull/15748#discussion_r1329150379
PR Review Comment: https://git.openjdk.org/jdk/pull/15748#discussion_r1329150620
PR Review Comment: https://git.openjdk.org/jdk/pull/15748#discussion_r1329150723
PR Review Comment: https://git.openjdk.org/jdk/pull/15748#discussion_r1329150796


More information about the client-libs-dev mailing list