Merge pull request #525 from Johnny Lim

* gh-525:
  Remove unnecessary FieldDoesNotExistException handling
This commit is contained in:
Andy Wilkinson
2018-07-16 17:06:32 +01:00

View File

@@ -84,15 +84,10 @@ class JsonContentHandler implements ContentHandler {
if (!this.fieldProcessor.hasField(candidate.getPath(), payload)) {
return true;
}
try {
ExtractedField extracted = this.fieldProcessor.extract(candidate.getPath(),
payload);
return extracted.getValue() instanceof Collection
&& ((Collection<?>) extracted.getValue()).isEmpty();
}
catch (FieldDoesNotExistException ex) {
return true;
}
ExtractedField extracted = this.fieldProcessor.extract(candidate.getPath(),
payload);
return extracted.getValue() instanceof Collection
&& ((Collection<?>) extracted.getValue()).isEmpty();
}
@Override