logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r1416093 - /logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Node.java
Date Sun, 02 Dec 2012 01:04:43 GMT
Author: rgoers
Date: Sun Dec  2 01:04:42 2012
New Revision: 1416093

URL: http://svn.apache.org/viewvc?rev=1416093&view=rev
Log:
Do a deep copy when cloning the Node

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Node.java

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Node.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Node.java?rev=1416093&r1=1416092&r2=1416093&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Node.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Node.java
Sun Dec  2 01:04:42 2012
@@ -63,7 +63,9 @@ public class Node {
         this.type = node.type;
         this.attributes.putAll(node.getAttributes());
         this.value = node.getValue();
-        this.children.addAll(node.getChildren());
+        for (Node child : node.getChildren()) {
+            this.children.add(new Node(child));
+        }
         this.object = node.object;
     }
 



Mime
View raw message