Skip to content

Commit

Permalink
Fix check of XPath evaluation result
Browse files Browse the repository at this point in the history
A failure to find the path returns and empty string rather than a
null.
  • Loading branch information
colecu committed Feb 8, 2024
1 parent ef9974e commit b061c21
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ private void readIsoSmapMetadataFile(String s3Location, Document doc, XPath xpat
}

String boundingBoxInformation = xpath.evaluate(IsoSmapXPath.BOUNDING_BOX, doc);
if (boundingBoxInformation != null) {
if (!boundingBoxInformation.trim().isEmpty()) {
String north = xpath.evaluate(IsoSmapXPath.NORTH_BOUNDING_COORDINATE, doc);
String south = xpath.evaluate(IsoSmapXPath.SOUTH_BOUNDING_COORDINATE, doc);
String east = xpath.evaluate(IsoSmapXPath.EAST_BOUNDING_COORDINATE, doc);
Expand Down

0 comments on commit b061c21

Please sign in to comment.