Details
-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
8u331
-
b06
-
x86_64
-
windows
Description
ADDITIONAL SYSTEM INFORMATION :
Windows Server 2019
Oracle Java 8u331 (worked in 8u321)
A DESCRIPTION OF THE PROBLEM :
On Windows, NUL is the null output device similar to /dev/null on Linux.
With Oracle Java 8 Update 331, trying to get a new FileOutputStream("NUL:") throws an exception. Previously (Java 8u321) it worked fine.
The problem seems to be the colon:
* new FileOutputStream("NUL") - OK
* new FileOutputStream("NUL:") - exception
REGRESSION : Last worked in version 8
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
try
{
new FileOutputStream("NUL:");
System.out.println("OK");
}
catch (FileNotFoundException e)
{
System.out.println(e);
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
"OK" output
ACTUAL -
java.io.FileNotFoundException: Invalid file path
FREQUENCY : always
Windows Server 2019
Oracle Java 8u331 (worked in 8u321)
A DESCRIPTION OF THE PROBLEM :
On Windows, NUL is the null output device similar to /dev/null on Linux.
With Oracle Java 8 Update 331, trying to get a new FileOutputStream("NUL:") throws an exception. Previously (Java 8u321) it worked fine.
The problem seems to be the colon:
* new FileOutputStream("NUL") - OK
* new FileOutputStream("NUL:") - exception
REGRESSION : Last worked in version 8
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
try
{
new FileOutputStream("NUL:");
System.out.println("OK");
}
catch (FileNotFoundException e)
{
System.out.println(e);
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
"OK" output
ACTUAL -
java.io.FileNotFoundException: Invalid file path
FREQUENCY : always
Attachments
Issue Links
- duplicates
-
JDK-8285445 cannot open file "NUL:"
- Closed
-
JDK-8285445 cannot open file "NUL:"
- Closed