<AWT Dev> RFR: 8182043: Access to Windows Large Icons [v14]

Alexander Zuev kizune at openjdk.java.net
Wed May 26 16:06:22 UTC 2021


On Wed, 26 May 2021 16:03:02 GMT, Alexander Zuev <kizune at openjdk.org> wrote:

>> test/jdk/javax/swing/JFileChooser/FileSystemView/SystemIconTest.java line 67:
>> 
>>> 65:         if (!gotException) {
>>> 66:             throw new RuntimeException("Negative size icon should throw invalid argument exception");
>>> 67:         }
>> 
>> A suggestion: throw the exception inside try-block and ignore the expected exception, then `gotException` can be dropped.
>> Suggestion:
>> 
>>         try {
>>             fsv.getSystemIcon(new File("."), -1, 16);
>>             throw new RuntimeException("Negative size icon should throw invalid argument exception");
>>         } catch (IllegalArgumentException iae) {
>>             // expected
>>         }
>> 
>> 
>> Shall the test also exercise 0 as an invalid parameter? Shall the test also pass an invalid height?
>
> Fixed.

I do not think such detailed testing is required. After all it is not a full spec conformance test.

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

PR: https://git.openjdk.java.net/jdk/pull/2875


More information about the awt-dev mailing list