I noticed this issue when updating my lambda function from Java 8 to Java 11, and it seems to be related to the code in this repository.
The problematic situation occurs when a lambda function declares that it returns TestParent, but actually returns an instance of TestChild:
  public class TestParent {
    public String parentField = "parentField";
  }
  public class TestChild extends TestParent {
    public String childField = "childField";
  }To reproduce the issue, please run the attached test case (maven project): aws-lambda-json-child-field-bug.zip
It should fail with an error like below:
org.junit.ComparisonFailure: 
Expected :{"parentField":"parentField","childField":"childField"}
Actual   :{"parentField":"parentField"}
You can see that the fields from TestChild are missing. This is the issue, and this seems to be new -- in the Java 8 lambda runtime this worked ok.
Thanks for any help!