RFR: JDK-4858457 -- File.getCanonicalPath() throws IOException when invoked with "nul" (win)
dan.xu at oracle.com
Wed Aug 14 19:54:46 UTC 2013
Thanks for pointing out. I have updated my fix in the new webrev,
http://cr.openjdk.java.net/~dxu/4858457/webrev.01/. Please take a look!
On 08/14/2013 08:22 AM, Alan Bateman wrote:
> 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