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

javax.xml.parsers.DocumentBuilder.parse(java.io.InputStream) reads incorrect characters at specific positions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • None
    • xml

      javax.xml.parsers.DocumentBuilder.parse(java.io.InputStream) reads incorrect characters
      at specific positions from an xml input file.

      The behaviour is strictly reproducible.
      The behaviour is not reproducible with Java SE 5.0.

      The issue can be demonstrated on record 1021 of a certain xml file:

      Java SE 5.0 reads the correct data item:
      % /jdk1.5.0_09/bin/java BugReproductor 1020
      TITAL
      %

      Java SE 8 reads incorrectly:
      % /jdk1.8.0/bin/java BugReproductor 1020
      ZSTAL
      %

      % /jdk1.8.0/bin/java -version
      java version "1.8.0"
      Java(TM) SE Runtime Environment (build 1.8.0-b132)
      Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
      %

      The incorrect behaviour is reproducible with Java SE 7:
      % /jdk1.7.0_51/bin/java BugReproductor 1020
      ZSTAL
      %

      The incorrect behaviour is reproducible with Java SE 6:
      % /jdk1.6.0_60/bin/java BugReproductor 1020
      ZSTAL
      %

        1. src.1.zip
          44 kB
        2. src.2.zip
          44 kB

            aefimov Aleksej Efimov
            thlenz Thomas Lenz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: