Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Oct 20, 2024
1 parent 0e0af8d commit a21efe1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main/java/org/htmlunit/html/DomNamespaceNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,14 @@ protected DomNamespaceNode(final String namespaceURI, final String qualifiedName
super(page);
WebAssert.notNull("qualifiedName", qualifiedName);
qualifiedName_ = qualifiedName;
namespaceURI_ = namespaceURI;

if (qualifiedName.indexOf(':') == -1) {
namespaceURI_ = namespaceURI;
final int colonPosition = qualifiedName_.indexOf(':');
if (colonPosition == -1) {
localName_ = qualifiedName_;
prefix_ = null;
}
else {
namespaceURI_ = namespaceURI;
final int colonPosition = qualifiedName_.indexOf(':');
localName_ = qualifiedName_.substring(colonPosition + 1);
prefix_ = qualifiedName_.substring(0, colonPosition);
}
Expand Down

0 comments on commit a21efe1

Please sign in to comment.