Skip to content

Commit f085e71

Browse files
author
bnasslahsen
committed
code review
1 parent 54510ad commit f085e71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

springdoc-openapi-common/src/main/java/org/springdoc/core/AbstractRequestBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ private void applyBeanValidatorAnnotations(final Parameter parameter, final List
375375
private void applyBeanValidatorAnnotations(final RequestBody requestBody, final List<Annotation> annotations, boolean isOptional) {
376376
Map<String, Annotation> annos = new HashMap<>();
377377
boolean requestBodyRequired = false;
378-
if (annotations != null) {
378+
if (!CollectionUtils.isEmpty(annotations)) {
379379
annotations.forEach(annotation -> annos.put(annotation.annotationType().getName(), annotation));
380380
requestBodyRequired = annotations.stream()
381381
.filter(annotation -> org.springframework.web.bind.annotation.RequestBody.class.equals(annotation.annotationType()))

0 commit comments

Comments
 (0)