<Swing Dev> RFR: 8182043: Access to Windows Large Icons [v14]
Phil Race
prr at openjdk.java.net
Wed May 26 17:43:22 UTC 2021
On Wed, 26 May 2021 15:15:42 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> null file now properly causes IllegalArgumentException
>> Small fixed in JavaDoc
>
> src/java.desktop/share/classes/javax/swing/filechooser/FileSystemView.java line 300:
>
>> 298:
>> 299: if(!f.exists()) {
>> 300: return null;
>
> Shall it throw `FileNotFoundException` or `IllegalArgumentException` if the file doesn't exist?
> It could more convenient to return `null` rather than catch an exception.
>
> The space is missing between if and the opening parenthesis.
It definitely should not be IAE. But FNFE is a reasonable idea.
However it changes the usage since it is a checked exception.
I'm on the fence and could go either way.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2875
More information about the swing-dev
mailing list