<Swing Dev> [11][JDK-8196673] JFileChooser throws InvalidPathException when changing to directory with added space

Semyon Sadetsky semyon.sadetsky at oracle.com
Fri Feb 16 16:33:35 UTC 2018


According to Pardeep Sharma comment the bug is reproducible since 6u45. 
Do you confirm this or it is a regression introduced in 9?

 From the stack trace it doesn't look as a client-libs issue but a NIO 
issue.

--Semyon

On 02/16/2018 04:40 AM, Krishna Addepalli wrote:
>
> Hi Sergey, Phil
>
> Please review a fix for JDK-8196673: 
> https://bugs.openjdk.java.net/browse/JDK-8196673
>
> Webrev: http://cr.openjdk.java.net/~kaddepalli/8196673/webrev00 
> <http://cr.openjdk.java.net/%7Ekaddepalli/8196673/webrev00>
>
> The problem is in Java9 and later, when a directory path that contains 
> leading/trailing space is provided, it throws an InvalidPathException. 
> As per Phil’s recommendation, I have added a simple fix, which will 
> trim the path for Windows, whereas for other platforms, it keeps it as 
> it is.
>
> Thanks,
>
> Krishna
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20180216/21b8cdad/attachment.html>


More information about the swing-dev mailing list