You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by "Andreas Beeker (Jira)" <ji...@apache.org> on 2021/06/28 21:30:00 UTC

[jira] [Resolved] (XMLBEANS-487) Entity replacement in wrong place when expansion coincides with buffer growth

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

Andreas Beeker resolved XMLBEANS-487.
-------------------------------------
    Fix Version/s: Version 5.0.1
         Assignee: Andreas Beeker
       Resolution: Fixed

Thank you for providing the patch - applied via [r1891120|https://svn.apache.org/viewvc?view=revision&revision=1891120]

> Entity replacement in wrong place when expansion coincides with buffer growth
> -----------------------------------------------------------------------------
>
>                 Key: XMLBEANS-487
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-487
>             Project: XMLBeans
>          Issue Type: Bug
>          Components: XmlObject
>    Affects Versions: Version 2.6
>            Reporter: Jesper Steen Møller
>            Assignee: Andreas Beeker
>            Priority: Major
>             Fix For: Version 5.0.1
>
>         Attachments: TestEntityNearBufferGrowth.java, patch.txt
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> When serializing an object to XML using newReader(), some of the entity replacements for '&' appear in the wrong places, giving invalid XML.
> Example:
> <a q='aaaaaaaaaaaaaaaaa'><t>Hall &amp; Oates</t></a>
> could be serialized as:
> <a q='aaaaaaaa&amp;aaaaaaaa'><t>Hall & Oates</t></a>
> The bug depends on the sequence of the read()-calls, the size of the requested buffer, and the content. We're using the newReader to feed a Xalan transformation, and in some tens of millions different transformations, this has happened just a few times -- but this time, we've isolated the problem, which is attached as a stand-alone test case.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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