Skip to content

Commit

Permalink
Merge pull request #42195 from geoand/#42159
Browse files Browse the repository at this point in the history
Treat Kotlin's Unit as void for the Quarkus REST scoring system
  • Loading branch information
geoand authored Jul 29, 2024
2 parents b1de140 + 104de69 commit 47e8a54
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -565,8 +565,16 @@ private static void smartInitParameterConverter(int i, ParameterConverter quarku
}

private static boolean isNotVoid(Class<?> rawEffectiveReturnType) {
return rawEffectiveReturnType != Void.class
&& rawEffectiveReturnType != void.class;
if (rawEffectiveReturnType == Void.class) {
return false;
}
if (rawEffectiveReturnType == void.class) {
return false;
}
if ("kotlin.Unit".equals(rawEffectiveReturnType.getName())) {
return false;
}
return true;
}

private void addResponseHandler(ServerResourceMethod method, List<ServerRestHandler> handlers) {
Expand Down

0 comments on commit 47e8a54

Please sign in to comment.