-
Bug
-
Resolution: Fixed
-
P2
-
1.3.1
-
rc1
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2041628 | 1.4.0 | Mark Reinhold | P2 | Resolved | Fixed | beta |
import java.io.*;
public class F {
public static void main(String[] args) throws Exception {
String fn = "/etc/passwd/";
new FileInputStream(fn);
}
}
This program works fine on Solaris, but fails on Linux:
% java F
Exception in thread "main" java.io.FileNotFoundException: /etc/passwd/ (Not a directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java, Compiled Code)
at F.main(F.java:15)
%
This is reproducible in 1.2.2, 1.3.0, and 1.3.1-beta.
-- mr@eng 2001/3/20
=======================================================
A regression test that demonstrates this is:
java/io/pathNames/GeneralSolaris.java
java/io/pathNames/unix/TrailingSlash.java
al.smith@eng 2001-03-26
- backported by
-
JDK-2041628 java.io.FileInputStream fails when argument has trailing slash (Linux)
-
- Resolved
-
- relates to
-
JDK-4428402 (spec) java.io file-opening constructors ignore trailing slashes
-
- Open
-
-
JDK-4428642 Regression test java/io/pathNames/GeneralSolaris failing on Linux
-
- Resolved
-
-
JDK-4422296 Regression test GeneralWin32.java Failing
-
- Closed
-