diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..981c582 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/.idea/ +/target/ \ No newline at end of file diff --git a/build_and_run_docker.sh b/build_and_run_docker.sh new file mode 100755 index 0000000..9c4ec58 --- /dev/null +++ b/build_and_run_docker.sh @@ -0,0 +1,15 @@ +mvn clean verify + +echo "Java 8:" +docker run \ + -e DOCKER_LAMBDA_DEBUG=true \ + -v "$PWD/target/classes:/var/task:ro,delegated" \ + lambci/lambda:java8 \ + "com.garethdanielsmith.TestLambda" "null" + +echo "Java 11:" +docker run \ + -e DOCKER_LAMBDA_DEBUG=true \ + -v "$PWD/target/classes:/var/task:ro,delegated" \ + lambci/lambda:java11 \ + "com.garethdanielsmith.TestLambda" "null" \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..0688730 --- /dev/null +++ b/pom.xml @@ -0,0 +1,24 @@ + + + 4.0.0 + + com.garethdanielsmith + java-11-lambda-missing-fields-poc + 1.0-SNAPSHOT + + + 8 + 8 + + + + + com.amazonaws + aws-lambda-java-core + 1.2.1 + + + + \ No newline at end of file diff --git a/src/main/java/com/garethdanielsmith/TestChild.java b/src/main/java/com/garethdanielsmith/TestChild.java new file mode 100644 index 0000000..7844a88 --- /dev/null +++ b/src/main/java/com/garethdanielsmith/TestChild.java @@ -0,0 +1,6 @@ +package com.garethdanielsmith; + +public class TestChild extends TestParent { + + public String testChild = "_testChild"; +} diff --git a/src/main/java/com/garethdanielsmith/TestLambda.java b/src/main/java/com/garethdanielsmith/TestLambda.java new file mode 100644 index 0000000..cee102d --- /dev/null +++ b/src/main/java/com/garethdanielsmith/TestLambda.java @@ -0,0 +1,12 @@ +package com.garethdanielsmith; + +import com.amazonaws.services.lambda.runtime.Context; +import com.amazonaws.services.lambda.runtime.RequestHandler; + +public class TestLambda implements RequestHandler { + + @Override + public TestParent handleRequest(String input, Context context) { + return new TestChild(); + } +} diff --git a/src/main/java/com/garethdanielsmith/TestParent.java b/src/main/java/com/garethdanielsmith/TestParent.java new file mode 100644 index 0000000..eb1d53c --- /dev/null +++ b/src/main/java/com/garethdanielsmith/TestParent.java @@ -0,0 +1,6 @@ +package com.garethdanielsmith; + +public class TestParent { + + public String parentField = "_parentField"; +}