We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3082a4f commit 4fcd4f8Copy full SHA for 4fcd4f8
src/main/java/org/jsoup/select/Elements.java
@@ -52,16 +52,14 @@ public Elements(Element... elements) {
52
* @return a deep copy
53
*/
54
@Override
55
- public Elements clone() {
+ public Elements clone() {
56
Elements clone = new Elements(size());
57
+ for (Element e : this)
58
+ clone.add(e.clone());
59
+ return clone;
60
+ }
61
- for(Element e : this)
- clone.add(e.clone());
-
- return clone;
62
- }
63
64
- // attribute methods
+ // attribute methods
65
/**
66
Get an attribute value from the first matched element that has the attribute.
67
@param attributeKey The attribute key.
0 commit comments