RFR: JDK-4858457 -- File.getCanonicalPath() throws IOException when invoked with "nul" (win)
Alan.Bateman at oracle.com
Wed Aug 14 15:22:37 UTC 2013
On 08/08/2013 21:44, Dan Xu wrote:
> Hi All,
> Windows platforms have reserved a few names for device usages, and
> "nul" is one of them. And Windows API, such as _wfullpath() and
> GetFullPathNameW, returns its full path with the prefix "\\.\", which
> represents win32 device namespaces.
> For example, "nul", whose full path name is "\\.\nul", is a valid
> device name. But our current Canonicalization logicfails to generate
> its canonicalpath and throws an IOException. This fix is going to
> address the problem. Thanks!
> Webrev: http://cr.openjdk.java.net/~dxu/4858457/webrev.00/
> Bug: http://bugs.sun.com/view_bug.do?bug_id=4858457
The change looks okay to me, I just wonder if it might make sense to
combine the test with WinDeviceName so that there is only one set of
inputs to test.
More information about the core-libs-dev