Skip to content

Commit

Permalink
Simpler empty test
Browse files Browse the repository at this point in the history
  • Loading branch information
jhy committed Nov 23, 2023
1 parent 73d4506 commit 4b91adf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/jsoup/nodes/Element.java
Original file line number Diff line number Diff line change
Expand Up @@ -1822,7 +1822,7 @@ public Element clone() {
public Element shallowClone() {
// simpler than implementing a clone version with no child copy
String baseUri = baseUri();
if (baseUri.equals("")) baseUri = null; // saves setting a blank internal attribute
if (baseUri.isEmpty()) baseUri = null; // saves setting a blank internal attribute
return new Element(tag, baseUri, attributes == null ? null : attributes.clone());
}

Expand Down

0 comments on commit 4b91adf

Please sign in to comment.