You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue does not seem to be Java 8 vs Java 11 per-se, but rather the Java 8 lambda runtime vs the Java 11 lambda runtime. So I am not expecting the test to pass simply using a Java 8 JRE.
I'm not sure if the code in this library even existed in the Java 8 lambda runtime, but nevertheless the code in this library does behave differently to the equivalent code in the Java 8 runtime.
Unfortunately in my real application there is more than one child type, and which type will be used is not known until runtime - so it is not possible to statically declare the child type.
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 ofTestChild
: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:
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!
The text was updated successfully, but these errors were encountered: