We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a403a5 commit fc5ef23Copy full SHA for fc5ef23
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/HateoasHalProvider.java
@@ -94,8 +94,8 @@ private static boolean isHalEnabled(@NonNull HateoasProperties hateoasProperties
94
var method = ReflectionUtils.findMethod(HateoasProperties.class, methodName);
95
if (method != null) {
96
var result = ReflectionUtils.invokeMethod(method, hateoasProperties);
97
- if (result instanceof Boolean) {
98
- return (boolean) result;
+ if (result instanceof Boolean halEnabled) {
+ return halEnabled;
99
}
100
101
throw new IllegalStateException("Method " + methodName + " did not return a boolean value");
0 commit comments