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

ArrayIndexOutOfBoundsException with supplementary characters

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Cannot Reproduce
    • Affects Version/s: 6u41
    • Fix Version/s: None
    • Component/s: xml

      Description

      This is probably the same root cause as Xalan bug
       https://issues.apache.org/jira/browse/XALANJ-2571
       (ArrayIndexOutOfBoundsException with supplementary characters,
       disable-output-escaping="yes").

      The input XML file contains Unicode supplementary characters. Transforming it
       with disable-output-escaping="yes" results in ArrayIndexOutOfBoundsException:

       C:\diag\2013\xslbug>java org.apache.xalan.xslt.Process -in test.xml -xsl
       test.xsl -out test_jdk.out
       file:///C:/diag/2013/xslbug/test.xsl; Line #8; Column #63;
       java.lang.ArrayIndexOutOfBoundsException: 1024

       Sorry, I don't know how to get a stack trace from the command line. But
      when
       this occurs in our code, we can get a stack trace and see that the cause is in

      WriterToUTF8Buffered:
       Caused by: java.lang.ArrayIndexOutOfBoundsException
         Message: 1024
              68: at org.apache.xml.serializer.WriterToUTF8Buffered.write(WriterToUTF8Buffered.java:290)
              67: at org.apache.xml.serializer.ToStream.charactersRaw(ToStream.java:1360)
              66: at org.apache.xml.serializer.ToStream.characters(ToStream.java:1433)
              65: at org.apache.xml.serializer.ToHTMLStream.characters(ToHTMLStream.java:1562)
              64: at org.apache.xml.utils.FastStringBuffer.sendSAXcharacters(FastStringBuffer.java:999)
              63: at org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.dispatchCharactersEvents(SAX2DTM.java:557)
              62: at org.apache.xpath.axes.LocPathIterator.executeCharsToContentHandler(LocPathIterator.java:247)
              61: at org.apache.xalan.templates.ElemValueOf.execute(ElemValueOf.java:274)

        Attachments

          Activity

            People

            • Assignee:
              aefimov Aleksej Efimov
              Reporter:
              asaha Abhijit Saha
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: