ACE-4765: fixed "schema comparison tool" XML parsing bug.

Element text content was being trimmed, in sax parser's characters(...) method - but this method may be called multiple times with chunked data (due to buffering) and trim should not be applied until after the entire text has been parsed for that element.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@119689 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Matt Ward
2015-12-04 17:16:31 +00:00
parent 4028bb28a2
commit 380d6a6f3a

View File

@@ -286,7 +286,7 @@ public class XMLToSchema extends DefaultHandler
@Override
public void characters(char[] ch, int start, int length) throws SAXException
{
String text = new String(ch, start, length).trim();
String text = new String(ch, start, length);
if (text.length() > 0)
{
lastText.append(text);