RFR: JDK-4858457 -- File.getCanonicalPath() throws IOException when invoked with "nul" (win)

Dan Xu dan.xu at oracle.com
Thu Aug 8 20:44:19 UTC 2013


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

-Dan



More information about the core-libs-dev mailing list