GH-639 Fix NPE for when using Supplier with AWS API Gateway

Resolves #639
This commit is contained in:
Oleg Zhurakousky
2021-02-08 10:36:00 +01:00
parent c4dfffe0ba
commit 5485cc33ca
2 changed files with 24 additions and 1 deletions

View File

@@ -202,7 +202,7 @@ final class AWSLambdaUtils {
}
private static boolean isTypeAnApiGatewayRequest(Type type) {
return isAPIGatewayProxyRequestEventPresent()
return type != null && isAPIGatewayProxyRequestEventPresent()
? type.getTypeName().endsWith(APIGatewayProxyRequestEvent.class.getSimpleName())
: false;
}