On Tue, 25 May 2021 23:17:39 GMT, Phil Race <p...@openjdk.org> wrote:

>> Alexander Zuev has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Changed API to support non-square icons and updated documentation
>>   accordingly
>>   Fixed test to support updated API
>>   Added negative test cases
>
> src/java.desktop/share/classes/javax/swing/filechooser/FileSystemView.java 
> line 282:
> 
>> 280:     * @return an icon as it would be displayed by a native file chooser
>> 281:     * or null if invalid parameters are passed such as reference to a
>> 282:     * non-existing file.
> 
> non-existent not non-existing, but I think null deserves an IAE - as I had 
> written a couple of days ago.
> 
> I see you dropped the words about null if the size is too large.
> Should I interpret that as meaning one of the things I suggested - that this 
> is just another case of a closest match ?

Thanks for correction. Yes - we will return the best match no matter how big 
the requested size is.

Fixed IAE in case of null file.

> src/java.desktop/share/classes/javax/swing/filechooser/FileSystemView.java 
> line 286:
> 
>> 284:     * @see AbstractMultiResolutionImage
>> 285:     * @see FileSystemView#getSystemIcon(File)
>> 286:     * @since 17
> 
> You need to add the IAE to the javadoc.

Done.

> src/java.desktop/share/classes/javax/swing/filechooser/FileSystemView.java 
> line 290:
> 
>> 288:     public Icon getSystemIcon(File f, int width, int height) {
>> 289:         if (height <1 || width < 1) {
>> 290:             throw new IllegalArgumentException("Icon size can not be 
>> below 1");
> 
> (minor) spacing. <1

Typo. Fixed.

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

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

Reply via email to