You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rg...@apache.org on 2012/12/02 02:04:43 UTC
svn commit: r1416093 -
/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Node.java
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;
}