Other |
---|
tbdUnresolved |
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
All file operations in IO and NIO area are working fine and well tested if the input is a real file. But if the input is a device, some operation may work incorrectly. The logic on how to handling devices, especially on Windows platforms, need to be revisited. Here are some examples for the reserved names on windows. File f = new File("nul"); f.getCanonicalPath(); // This is fixed in jdk-4858457 f.getAbsolutePath(); f.toPath().toAbsolutePath(); f.toPath().toRealPath(); In addition, when opening a file, if the file is a device, the operation flags shall be set correctly. For example, OPEN_EXISTING flag is usually used in such situation.