RFR: 8316324: Opensource five miscellaneous Swing tests [v2]

Alexander Zuev kizune at openjdk.org
Tue Mar 26 00:51:23 UTC 2024


On Mon, 25 Mar 2024 21:24:13 GMT, Phil Race <prr at openjdk.org> wrote:

>> Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Removing image file as not needed, generating ImageIcon instead;
>>   Moved test file from the dedicated folder siince it is no longer needed;
>>   Removed setVidible(false) calls before disposal of the components;
>
> test/jdk/javax/swing/JButton/bug4385611.java line 84:
> 
>> 82:                 }
>> 83:             } catch (Exception e) {
>> 84:                 e.printStackTrace();
> 
> Not a blocker for approval, but I wonder why this test catches the exception ?
> Surely we don't expect installing the L&F to fail since we require windows.
> And the Metal case above should never fail. 
> Perhaps we should let the exceptions propagate so the test fails rather than being silent.
> You decide.

I think i will re-throw them as RuntimeException with original exception passed as a parameter. There is no reason for adding all 4 exceptions that can be thrown to the main method signature.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18443#discussion_r1538451330


More information about the client-libs-dev mailing list