Skip to content

Commit df1df6e

Browse files
author
bnasslahsen
committed
Random null pointer exception in 1.3.1. Fixes springdoc#545
1 parent 3313f3c commit df1df6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

springdoc-openapi-common/src/main/java/org/springdoc/api/AbstractOpenApiResource.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public static void addDeprecatedType(Class<?> cls) {
122122
DEPRECATED_TYPES.add(cls);
123123
}
124124

125-
protected OpenAPI getOpenApi() {
125+
protected synchronized OpenAPI getOpenApi() {
126126
OpenAPI openApi;
127127
if (openAPIBuilder.getCachedOpenAPI() == null || springDocConfigProperties.isCacheDisabled()) {
128128
Instant start = Instant.now();

0 commit comments

Comments
 (0)