Permalink
Browse files

Edited DocNode.java via GitHub

  • Loading branch information...
1 parent 4d7540a commit 2b8d0143c751b70f09fa2dc84908f32d5925aa9e @hasanein committed May 10, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 DocNode.java
View
@@ -282,7 +282,7 @@ public void addAttribute(Attribute<T> attribute)
clonnedDocNode.attributesHashMap = new HashMap<String, Attribute<T>>(attributesHashMap);
clonnedDocNode.childNodes = new ArrayList<DocNode<T>>(childNodes);
clonnedDocNode.isRootElement = isRootElement; // No need for a defensive copy, it is a primitive and primitves passed by value.
- clonnedDocNode.textContent = textContent; // No need for a defensive copy, it is already an immutable class.
+ clonnedDocNode.textContent = textContent; // No need for a defensive copy, the textContent is of type String and String class is an immutable class in java.
return clonnedDocNode;
}

0 comments on commit 2b8d014

Please sign in to comment.