'AWS Lambda and Abstract classes - RequestHandler

I have a general question about AWS lambda and abstract classes in Java.

I've recently upgraded an AWS lambda project to Java 11 and now my handleRequest call is getting the response

"{}"

It seems to be due to my output object being an abstract class as we return different children objects depending on business logic.

MyLambdaClass implements
    RequestHandler<InputObject, OutputAbstractObject> 

My question is, how come this is now an issue with Java 11. I'm aware I can use RequestStreamHandler and do the serialisation myself but ideally I'd like to keep as much code the same with the upgrade.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source