Skip to content

Commit

Permalink
fix: NPE for empty values
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominick Leppich committed Jan 20, 2025
1 parent ccebeb2 commit 8c7e9d0
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2843,9 +2843,12 @@ private IEadEntry getNodeWithId(String strNodeId, IEadEntry node) {
}

private boolean findMatchingNode(String strNodeId, IMetadataField field) {
if (field.getName().equals(identifierNodeName)) {
if (strNodeId == null) {
return false;
}
if (identifierNodeName.equals(field.getName())) {
for (IFieldValue fv : field.getValues()) {
if (fv.getValue().equals(strNodeId)) {
if (strNodeId.equals(fv.getValue())) {
return true;
}
}
Expand Down

0 comments on commit 8c7e9d0

Please sign in to comment.