commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebo...@apache.org
Subject svn commit: r787008 - /commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/plist/XMLPropertyListConfiguration.java
Date Sun, 21 Jun 2009 13:13:06 GMT
Author: ebourg
Date: Sun Jun 21 13:13:05 2009
New Revision: 787008

URL: http://svn.apache.org/viewvc?rev=787008&view=rev
Log:
Restored the priority to the children if the node has children and a value

Modified:
    commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/plist/XMLPropertyListConfiguration.java

Modified: commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/plist/XMLPropertyListConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/plist/XMLPropertyListConfiguration.java?rev=787008&r1=787007&r2=787008&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/plist/XMLPropertyListConfiguration.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/plist/XMLPropertyListConfiguration.java
Sun Jun 21 13:13:05 2009
@@ -297,37 +297,33 @@
             out.println(padding + "<key>" + StringEscapeUtils.escapeXml(node.getName())
+ "</key>");
         }
 
-        if (node.getValue() == null)
+        List<ConfigurationNode> children = node.getChildren();
+        if (!children.isEmpty())
         {
-            List<ConfigurationNode> children = node.getChildren();
-            
-            if (children.isEmpty())
-            {
-                out.println(padding + "<dict/>");
-            }
-            else
+            out.println(padding + "<dict>");
+
+            Iterator<ConfigurationNode> it = children.iterator();
+            while (it.hasNext())
             {
-                out.println(padding + "<dict>");
+                ConfigurationNode child = it.next();
+                printNode(out, indentLevel + 1, child);
 
-                Iterator<ConfigurationNode> it = children.iterator();
-                while (it.hasNext())
+                if (it.hasNext())
                 {
-                    ConfigurationNode child = it.next();
-                    printNode(out, indentLevel + 1, child);
-
-                    if (it.hasNext())
-                    {
-                        out.println();
-                    }
+                    out.println();
                 }
-
-                out.println(padding + "</dict>");
             }
+
+            out.println(padding + "</dict>");
+        }
+        else if (node.getValue() == null)
+        {
+            out.println(padding + "<dict/>");
         }
         else
         {
             Object value = node.getValue();
-            printValue(out, indentLevel, value);
+            printValue(out, indentLevel, value);            
         }
     }
 



Mime
View raw message