Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7057778

Incompatible behavior of javax.xml.parsers.SAXParser between JDK5 and 6

    Details

    • Subcomponent:
    • Resolved In Build:
      1.4
    • CPU:
      x86
    • OS:
      windows_xp
    • Verification:
      Verified

      Backports

        Description

        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
        ----

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  joehw Joe Wang
                  Reporter:
                  tbaba Tadayuki Baba (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: