From 42863c89112678dabdfcc99a2b90f5889c0347fe Mon Sep 17 00:00:00 2001 From: Raluca Munteanu Date: Mon, 7 Dec 2015 10:00:42 +0000 Subject: [PATCH] 119707 rmunteanu: Merged HEAD (5.1) to 5.1.N (5.1.1) 119689 mward: 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/BRANCHES/DEV/5.1.N/root@119707 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- source/java/org/alfresco/util/schemacomp/XMLToSchema.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/java/org/alfresco/util/schemacomp/XMLToSchema.java b/source/java/org/alfresco/util/schemacomp/XMLToSchema.java index 95ae9ab302..226e2329ec 100644 --- a/source/java/org/alfresco/util/schemacomp/XMLToSchema.java +++ b/source/java/org/alfresco/util/schemacomp/XMLToSchema.java @@ -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);