Merge pull request #525 from Johnny Lim
* gh-525: Remove unnecessary FieldDoesNotExistException handling
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user