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 authored and holly-cummins committed Jul 31, 2024
1 parent f5fd4dd commit c2ce5ca
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 c2ce5ca

Please sign in to comment.