Skip to content

Commit

Permalink
Handle case where method has no parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
kacgal committed Sep 20, 2020
1 parent f73de03 commit d330671
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public class RegisteredCommand<CEC extends CommandExecutionContext<CEC, ? extend
Parameter[] parameters = method.getParameters();

try {
if (method.getParameterTypes()[parameters.length - 1] == Continuation.class) {
if (parameters.length > 0 && method.getParameterTypes()[parameters.length - 1] == Continuation.class) {
this.isKotlinSuspendingFunction = true;
}
} catch (NoClassDefFoundError ignored) {
Expand Down

0 comments on commit d330671

Please sign in to comment.