Skip to content

Commit 47fe048

Browse files
committed
Merge branch '1.2.x'
2 parents c0ae004 + 001fb38 commit 47fe048

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

spring-restdocs-core/src/main/java/org/springframework/restdocs/payload/JsonContentHandler.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,10 @@ private boolean isMissing(FieldDescriptor candidate, Object payload) {
8484
if (!this.fieldProcessor.hasField(candidate.getPath(), payload)) {
8585
return true;
8686
}
87-
try {
88-
ExtractedField extracted = this.fieldProcessor.extract(candidate.getPath(),
89-
payload);
90-
return extracted.getValue() instanceof Collection
91-
&& ((Collection<?>) extracted.getValue()).isEmpty();
92-
}
93-
catch (FieldDoesNotExistException ex) {
94-
return true;
95-
}
87+
ExtractedField extracted = this.fieldProcessor.extract(candidate.getPath(),
88+
payload);
89+
return extracted.getValue() instanceof Collection
90+
&& ((Collection<?>) extracted.getValue()).isEmpty();
9691
}
9792

9893
@Override

0 commit comments

Comments
 (0)