Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Edited DocNode.java via GitHub

  • Loading branch information...
commit 2b8d0143c751b70f09fa2dc84908f32d5925aa9e 1 parent 4d7540a
@hasanein authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  DocNode.java
View
2  DocNode.java
@@ -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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.