Details
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2172668 | 1.4-pool | Unassigned | P4 | Closed | Won't Fix |
Description
###@###.### 2003-05-05
J2SE Version (please include all output from java -version flag):
J:\borsotti\jtest>java -version
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
and
java version "1.4.2-rc"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-rc-b20)
Java HotSpot(TM) Client VM (build 1.4.2-rc-b20, mixed mode)
Does this problem occur on J2SE 1.3, 1.4 or 1.4.1? Yes / No (pick one)
Yes on 1.4.1
No pm 1.4 and 1.3.1
Operating System Configuration Information (be specific):
NT service pack 5
Hardware Configuration Information (be specific):
Compaq DeskPro
Bug Description:
java.io.IOException exception throws on getCanonicalPath method when
a file "nul" is created on Window system.
Steps to Reproduce (be specific):
- Compile and run it.
- A File for "nul" is created (i.e. for the name that is used
in Windows to denote the null device).
- A writer is created, successfully.
- The getCanonicalPath() methid is invoked, which throws an exception:
>java Fnull
Exception in thread "main" java.io.IOException: No such file or
directory
at java.io.WinNTFileSystem.canonicalize(Native Method)
at java.io.File.getCanonicalPath(File.java:513)
at Fnull.main(Fnull.java:6)
This should not occur because a file on which a Writer can be
successfully created should also have a canonical name.
Test program (Fnull.java):
---------------------------
import java.io.*;
public class Fnull {
public static void main(String[] args) throws IOException {
File f = new File("nul");
FileWriter out = new FileWriter(f);
String s = f.getCanonicalPath();
}
}
J2SE Version (please include all output from java -version flag):
J:\borsotti\jtest>java -version
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
and
java version "1.4.2-rc"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-rc-b20)
Java HotSpot(TM) Client VM (build 1.4.2-rc-b20, mixed mode)
Does this problem occur on J2SE 1.3, 1.4 or 1.4.1? Yes / No (pick one)
Yes on 1.4.1
No pm 1.4 and 1.3.1
Operating System Configuration Information (be specific):
NT service pack 5
Hardware Configuration Information (be specific):
Compaq DeskPro
Bug Description:
java.io.IOException exception throws on getCanonicalPath method when
a file "nul" is created on Window system.
Steps to Reproduce (be specific):
- Compile and run it.
- A File for "nul" is created (i.e. for the name that is used
in Windows to denote the null device).
- A writer is created, successfully.
- The getCanonicalPath() methid is invoked, which throws an exception:
>java Fnull
Exception in thread "main" java.io.IOException: No such file or
directory
at java.io.WinNTFileSystem.canonicalize(Native Method)
at java.io.File.getCanonicalPath(File.java:513)
at Fnull.main(Fnull.java:6)
This should not occur because a file on which a Writer can be
successfully created should also have a canonical name.
Test program (Fnull.java):
---------------------------
import java.io.*;
public class Fnull {
public static void main(String[] args) throws IOException {
File f = new File("nul");
FileWriter out = new FileWriter(f);
String s = f.getCanonicalPath();
}
}
Attachments
Issue Links
- backported by
-
JDK-2172668 File.getCanonicalPath() throws IOException when invoked with "nul" (win)
- Closed
- relates to
-
JDK-6176051 File.isFile() should return "false" for "con" on windows platform
- Closed
-
JDK-4514340 java.io.File.getCanonicalPath transforms "..." to ".." (win32)
- Closed
-
JDK-8022671 Revisit the Logic of Handling Devices In Java IO/NIO Functions
- Open