Skip to content

Commit 53aa478

Browse files
committed
[bugfix] process feedback from human code analyzer
1 parent 1a1ed4d commit 53aa478

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

exist-core/src/main/java/org/exist/dom/memtree/NodeImpl.java

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -139,22 +139,18 @@ public String getLocalName() {
139139

140140
@Override
141141
public String getNamespaceURI() {
142-
switch (getNodeType()) {
142+
return switch (getNodeType()) {
143143
case Node.ELEMENT_NODE, Node.ATTRIBUTE_NODE -> {
144144
final String nsUri = getQName().getNamespaceURI();
145145
if (nsUri.equals(XMLConstants.NULL_NS_URI)) {
146-
return null;
146+
yield null;
147147
} else {
148-
return nsUri;
148+
yield nsUri;
149149
}
150150
}
151-
case NodeImpl.NAMESPACE_NODE -> {
152-
return XMLConstants.XMLNS_ATTRIBUTE_NS_URI;
153-
}
154-
default -> {
155-
return null;
156-
}
157-
}
151+
case NodeImpl.NAMESPACE_NODE -> XMLConstants.XMLNS_ATTRIBUTE_NS_URI;
152+
default -> null;
153+
};
158154
}
159155

160156
@Override

0 commit comments

Comments
 (0)