Skip to content

Commit

Permalink
Fixed #2114 - Missing application archive marker for lambda events, m…
Browse files Browse the repository at this point in the history
…issing reflection for lamdba return type
  • Loading branch information
marcinczeczko committed Apr 17, 2019
1 parent a41e984 commit 705c943
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@

@SuppressWarnings("unchecked")
public final class AmazonLambdaProcessor {
public static final String AWS_LAMBDA_EVENTS_ARCHIVE_MARKERS = "com/amazonaws/services/lambda/runtime/events";

private static final DotName REQUEST_HANDLER = DotName.createSimple(RequestHandler.class.getName());

@BuildStep
@BuildStep(applicationArchiveMarkers = { AWS_LAMBDA_EVENTS_ARCHIVE_MARKERS })
List<AmazonLambdaClassNameBuildItem> discover(CombinedIndexBuildItem combinedIndexBuildItem,
BuildProducer<ReflectiveHierarchyBuildItem> reflectiveClasses) {
List<AmazonLambdaClassNameBuildItem> ret = new ArrayList<>();
Expand All @@ -52,6 +54,7 @@ List<AmazonLambdaClassNameBuildItem> discover(CombinedIndexBuildItem combinedInd
&& method.parameters().size() == 2
&& !method.parameters().get(0).name().equals(DotName.createSimple(Object.class.getName()))) {
reflectiveClasses.produce(new ReflectiveHierarchyBuildItem(method.parameters().get(0)));
reflectiveClasses.produce(new ReflectiveHierarchyBuildItem(method.returnType()));
done = true;
break;
}
Expand Down

0 comments on commit 705c943

Please sign in to comment.