Skip to content

Commit f7b5799

Browse files
committed
Fix Amazon Lambda handler discovery fallback
Add fallback to use root implementor when no matching handleRequest method is found in the class hierarchy. Closes #49413
1 parent 8ee7f64 commit f7b5799

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

extensions/amazon-lambda/deployment/src/main/java/io/quarkus/amazon/lambda/deployment/AmazonLambdaProcessor.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ List<AmazonLambdaBuildItem> discover(CombinedIndexBuildItem combinedIndexBuildIt
159159
.reason(getClass().getName()
160160
+ ": reflectively accessed in io.quarkus.amazon.lambda.runtime.AmazonLambdaRecorder.discoverHandlerMethod")
161161
.build());
162+
} else {
163+
// Fall back to the root implementor if a matching `handleRequest` is not found in the class hierarchy
164+
ret.add(new AmazonLambdaBuildItem(lambda, cdiName, streamHandler));
162165
}
163166
}
164167
additionalBeanBuildItemBuildProducer.produce(builder.build());

0 commit comments

Comments
 (0)