-
Bug
-
Resolution: Fixed
-
P3
-
6u26
-
1.4
-
x86
-
windows_xp
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2219365 | 7u4 | Joe Wang | P3 | Closed | Fixed | b07 |
JDK-8039932 | 6u85 | Aleksej Efimov | P3 | Resolved | Fixed | b01 |
JDK-2212394 | 6u81 | Aleksej Efimov | P3 | Resolved | Fixed | b04 |
A customer finds out different behavior in SAXParser between JDK5 and JDK6.
A program executes javax.xml.parsers.SAXParser.parse(File, DefaultHandler)
and tries to delete a specified file as parameter in java.io.File.delete().
Then, the program can delete the file in JDK5 but not in JDK6(and JDK7).
CONFIGURATION:
JDK : JDK5u30/JDK6u26/JDK7b143
OS: WindowsXP(SP3, Japanese)
REPRODUCE:
1. Compile the attached Test.java
2. Create a file
(In this report, "a.txt" is created.)
3. Launch "java Test a.txt" in JDK5u30
(size of a.txt is 0.)
Program can delete a.txt with the following message.
----
F:\licensees\diff-behavior-in-SAXParser>java -showversion Test a.txt
java version "1.5.0_30"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_30-b02)
Java HotSpot(TM) Client VM (build 1.5.0_30-b02, mixed mode)
SAXException: Premature end of file.
Delete: OK
-----
4. Create a.txt and launch "java Test a.txt" in JDK6u25
The test program do not delete a.txt.
----
F:\licensees\diff-behavior-in-SAXParser>java -showversion Test a.txt
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode)
SAXException: Premature end of file.
Delete: NG
----
A program executes javax.xml.parsers.SAXParser.parse(File, DefaultHandler)
and tries to delete a specified file as parameter in java.io.File.delete().
Then, the program can delete the file in JDK5 but not in JDK6(and JDK7).
CONFIGURATION:
JDK : JDK5u30/JDK6u26/JDK7b143
OS: WindowsXP(SP3, Japanese)
REPRODUCE:
1. Compile the attached Test.java
2. Create a file
(In this report, "a.txt" is created.)
3. Launch "java Test a.txt" in JDK5u30
(size of a.txt is 0.)
Program can delete a.txt with the following message.
----
F:\licensees\diff-behavior-in-SAXParser>java -showversion Test a.txt
java version "1.5.0_30"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_30-b02)
Java HotSpot(TM) Client VM (build 1.5.0_30-b02, mixed mode)
SAXException: Premature end of file.
Delete: OK
-----
4. Create a.txt and launch "java Test a.txt" in JDK6u25
The test program do not delete a.txt.
----
F:\licensees\diff-behavior-in-SAXParser>java -showversion Test a.txt
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode)
SAXException: Premature end of file.
Delete: NG
----
- backported by
-
JDK-2212394 Incompatible behavior of javax.xml.parsers.SAXParser between JDK5 and 6
- Resolved
-
JDK-8039932 Incompatible behavior of javax.xml.parsers.SAXParser between JDK5 and 6
- Resolved
-
JDK-2219365 Incompatible behavior of javax.xml.parsers.SAXParser between JDK5 and 6
- Closed
- duplicates
-
JDK-7077542 javax.xml.parsers.DocumentBuilder.parse(File) does not always close file.
- Closed
-
JDK-8023652 DocumentBuilder parse failures can cause file handle leak
- Closed