Skip to content

Commit

Permalink
Treat Kotlin's Unit as void for the Quarkus REST scoring system
Browse files Browse the repository at this point in the history
  • Loading branch information
geoand committed Jul 29, 2024
1 parent 99162f6 commit 104de69
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 104de69

Please sign in to comment.