xalan-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Rabe (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (XALANJ-2571) ArrayIndexOutOfBoundsException with supplementary characters, disable-output-escaping="yes"
Date Fri, 05 Apr 2013 20:21:15 GMT

     [ https://issues.apache.org/jira/browse/XALANJ-2571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Daniel Rabe updated XALANJ-2571:
--------------------------------

    Attachment: identity02.xsl
                identity02.xml

I put these in test/tests/contrib/identity for testing purposes. (I know, it's not strictly
speaking an identity transform, but I'm not familiar enough with the source layout to know
where else to put it.) The xml file is encoded as UTF-8. 
                
> ArrayIndexOutOfBoundsException with supplementary characters, disable-output-escaping="yes"
> -------------------------------------------------------------------------------------------
>
>                 Key: XALANJ-2571
>                 URL: https://issues.apache.org/jira/browse/XALANJ-2571
>             Project: XalanJ2
>          Issue Type: Bug
>      Security Level: No security risk; visible to anyone(Ordinary problems in Xalan projects.
 Anybody can view the issue.) 
>          Components: Xalan
>    Affects Versions: The Latest Development Code
>            Reporter: Daniel Rabe
>            Assignee: Steven J. Hathaway
>         Attachments: identity02.xml, identity02.xsl
>
>
> When the input contains supplementary characters, and the stylesheet specifies disable-output-escaping="yes",
there is a good chance you will get an ArrayIndexOutOfBoundsException in WriterToUTF8Buffered.
> javax.xml.transform.TransformerException: java.lang.ArrayIndexOutOfBoundsException: 1024
>     at org.apache.xalan.templates.ElemValueOf.execute(ElemValueOf.java:293)
>     at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
>     at org.apache.xalan.templates.ElemCopy.execute(ElemCopy.java:116)
>     at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
>     at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
>     at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
>     at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
>     at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
>     at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2270)
>     at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1356)
>     at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:709)
>     at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1273)
>     at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1251)
>     at org.apache.qetest.xslwrapper.TraxSystemIdWrapper.transform(TraxSystemIdWrapper.java:181)
>     at org.apache.qetest.xsl.StylesheetTestlet.testDatalet(StylesheetTestlet.java:229)
>     at org.apache.qetest.xsl.StylesheetTestlet.execute(StylesheetTestlet.java:108)
>     at org.apache.qetest.xsl.StylesheetTestletDriver.processFileList(StylesheetTestletDriver.java:441)
>     at org.apache.qetest.xsl.StylesheetTestletDriver.processInputDir(StylesheetTestletDriver.java:397)
>     at org.apache.qetest.xsl.StylesheetTestletDriver.runTestCases(StylesheetTestletDriver.java:285)
>     at org.apache.qetest.TestImpl.runTest(TestImpl.java:205)
>     at org.apache.qetest.FileBasedTest.doMain(FileBasedTest.java:833)
>     at org.apache.qetest.xsl.StylesheetTestletDriver.main(StylesheetTestletDriver.java:951)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:597)
>     at org.apache.qetest.QetestUtils.main(QetestUtils.java:434)
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 1024
>     at org.apache.xml.serializer.WriterToUTF8Buffered.write(WriterToUTF8Buffered.java:290)
>     at org.apache.xml.serializer.ToStream.charactersRaw(ToStream.java:1359)
>     at org.apache.xml.serializer.ToStream.characters(ToStream.java:1432)
>     at org.apache.xml.utils.FastStringBuffer.sendSAXcharacters(FastStringBuffer.java:999)
>     at org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.dispatchCharactersEvents(SAX2DTM.java:557)
>     at org.apache.xpath.axes.LocPathIterator.executeCharsToContentHandler(LocPathIterator.java:247)
>     at org.apache.xalan.templates.ElemValueOf.execute(ElemValueOf.java:274)
>     ... 26 more
> There is a similar bug (XALANJ-2560), except that in that case the output is incorrect,
and no exception is thrown. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xalan.apache.org
For additional commands, e-mail: dev-help@xalan.apache.org


Mime
View raw message