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

behavior of javax.xml.stream.XMLEventFactory.createStartDocument(String encoding, String version) is wrong on some platforms

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 6-pool, 7, 8
    • Fix Version/s: None
    • Component/s: xml
    • Labels:
      None

      Description

      XMLEventFactory.createStartDocument(null, "1.0") will generate <?xml version="1.0"?> correctly on solaris-sparc.
      But on linux-i586, it generates <?xml version="1.0" encoding="UTF-8"?> and the default encode is set as utf-8.

      It looks the encoding is wrong on linux-i586 since we set is as null.

      The Test.java has been attached.

      log on linux-i586:
      =================
      gtee@jsn-gtwy-1: ~ $ echo $JAVA_HOME
      /net/sqenfs-1/export1/jdk/re/8/promoted/latest/binaries/linux-i586
      gtee@jsn-gtwy-1: ~ $ pwd
      /net/sqenfs-1/export1/comp/jsn/users/patrick
      gtee@jsn-gtwy-1: ~ $ $JAVA_HOME/bin/javac Test.java
      gtee@jsn-gtwy-1: ~ $ $JAVA_HOME/bin/java Test
      <?xml version="1.0" encoding="UTF-8"?><root></root>
      =================

      log on solaris-sparc:
      =================
      gtee@jsn-sb2500-5: ~ $ echo $JAVA_HOME
      /net/sqenfs-1/export1/jdk/re/8/promoted/latest/binaries/solaris-sparc
      gtee@jsn-sb2500-5: ~ $ $JAVA_HOME/bin/javac Test.java
      gtee@jsn-sb2500-5: ~ $ $JAVA_HOME/bin/java Test
      <?xml version="1.0"?><root></root>
      =================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                joehw Joe Wang
                Reporter:
                pzhang Patrick Zhang (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: