commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r1585186 - /commons/proper/configuration/branches/immutableNodes/src/main/java/org/apache/commons/configuration/XMLConfiguration.java
Date Sat, 05 Apr 2014 19:46:37 GMT
Author: oheger
Date: Sat Apr  5 19:46:36 2014
New Revision: 1585186

URL: http://svn.apache.org/r1585186
Log:
Fixed a problem with handling of the xml:space attribute.

Modified:
    commons/proper/configuration/branches/immutableNodes/src/main/java/org/apache/commons/configuration/XMLConfiguration.java

Modified: commons/proper/configuration/branches/immutableNodes/src/main/java/org/apache/commons/configuration/XMLConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/immutableNodes/src/main/java/org/apache/commons/configuration/XMLConfiguration.java?rev=1585186&r1=1585185&r2=1585186&view=diff
==============================================================================
--- commons/proper/configuration/branches/immutableNodes/src/main/java/org/apache/commons/configuration/XMLConfiguration.java
(original)
+++ commons/proper/configuration/branches/immutableNodes/src/main/java/org/apache/commons/configuration/XMLConfiguration.java
Sat Apr  5 19:46:36 2014
@@ -197,6 +197,9 @@ public class XMLConfiguration extends Ba
     /** Constant for the name of the space attribute.*/
     private static final String ATTR_SPACE = "xml:space";
 
+    /** Constant for an internally used space attribute. */
+    private static final String ATTR_SPACE_INTERNAL = "config-xml:space";
+
     /** Constant for the xml:space value for preserving whitespace.*/
     private static final String VALUE_PRESERVE = "preserve";
 
@@ -591,7 +594,7 @@ public class XMLConfiguration extends Ba
     {
         boolean trimFlag = shouldTrim(element, trim);
         Map<String, String> attributes = processAttributes(element);
-        attributes.put(ATTR_SPACE, String.valueOf(trimFlag));
+        attributes.put(ATTR_SPACE_INTERNAL, String.valueOf(trimFlag));
         StringBuilder buffer = new StringBuilder();
         NodeList list = element.getChildNodes();
         boolean hasChildren = false;
@@ -609,7 +612,7 @@ public class XMLConfiguration extends Ba
                 Map<String, String> attrmap =
                         constructHierarchy(childNode, refChildValue, child,
                                 elemRefs, trimFlag, level + 1);
-                Boolean childTrim = Boolean.valueOf(attrmap.remove(ATTR_SPACE));
+                Boolean childTrim = Boolean.valueOf(attrmap.remove(ATTR_SPACE_INTERNAL));
                 childNode.addAttributes(attrmap);
                 ImmutableNode newChild =
                         createChildNodeWithValue(node, childNode,



Mime
View raw message