Skip to content

Commit

Permalink
Fix NPE scenario i noticed on the qa-refapp server
Browse files Browse the repository at this point in the history
  • Loading branch information
mherman22 committed Dec 31, 2023
1 parent 0004537 commit 8ab2b7e
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -391,14 +391,13 @@ protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse
}

private Node findChild(Node parent, String name) {
if (parent == null) {
return null;
}
NodeList list = parent.getChildNodes();
for (int i = 0; i < list.getLength(); ++i) {
Node node = list.item(i);
if (node.getNodeName().equals(name))
return node;
if (parent != null) {
NodeList list = parent.getChildNodes();
for (int i = 0; i < list.getLength(); ++i) {
Node node = list.item(i);
if (node.getNodeName().equals(name))
return node;
}
}
return null;
}
Expand Down

0 comments on commit 8ab2b7e

Please sign in to comment.