Skip to content

Commit

Permalink
Fixed potential NPE in XMLCompletions.java
Browse files Browse the repository at this point in the history
Signed-off-by: Fred Bricon <fbricon@gmail.com>
  • Loading branch information
fbricon authored and angelozerr committed Mar 20, 2023
1 parent c09d7f9 commit 43cf664
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -565,7 +565,7 @@ public AutoCloseTagResponse doTagComplete(DOMDocument xmlDocument, Position posi
}
} else if (cBefore == '<' && c == '/') { // Case: <a> </|
DOMNode node = xmlDocument.findNodeBefore(offset);
while ((node != null && node.isClosed()) || (node.isElement() && ((DOMElement) node).isOrphanEndTag())) {
while (node != null && (node.isClosed() || (node.isElement() && ((DOMElement) node).isOrphanEndTag()))) {
node = node.getParentNode();
}
if (node != null && node.isElement() && ((DOMElement) node).getTagName() != null) {
Expand Down

0 comments on commit 43cf664

Please sign in to comment.