Skip to content

Commit 2d4f84e

Browse files
committed
Switched from 'not null' to 'has'
1 parent 5c91781 commit 2d4f84e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/AbstractRequestService.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -783,8 +783,8 @@ private boolean isRequestBodyParam(RequestMethod requestMethod, ParameterInfo pa
783783
* @return the boolean
784784
*/
785785
private boolean checkRequestBodyAnnotation(MethodParameter methodParameter) {
786-
return methodParameter.getParameterAnnotation(org.springframework.web.bind.annotation.RequestBody.class) != null
787-
|| methodParameter.getParameterAnnotation(io.swagger.v3.oas.annotations.parameters.RequestBody.class) != null
786+
return methodParameter.hasParameterAnnotation(org.springframework.web.bind.annotation.RequestBody.class)
787+
|| methodParameter.hasParameterAnnotation(io.swagger.v3.oas.annotations.parameters.RequestBody.class)
788788
|| AnnotatedElementUtils.isAnnotated(Objects.requireNonNull(methodParameter.getParameter()), io.swagger.v3.oas.annotations.parameters.RequestBody.class)
789789
|| AnnotatedElementUtils.isAnnotated(Objects.requireNonNull(methodParameter.getMethod()), io.swagger.v3.oas.annotations.parameters.RequestBody.class);
790790
}

0 commit comments

Comments
 (0)