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

Krishna Addepalli krishna.addepalli at oracle.com
Fri Feb 16 12:40:25 UTC 2018


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

 

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/5ad3d063/attachment.html>


More information about the swing-dev mailing list