Switch to Jackson Jr
Turns out that moving to Jackson Jr is too big a breaking change for a minor release. The LambdaContainerHandler currently exposes a static method to get a system ObjectMapper. Removing this method would break backward compatibility. For the time being, I only added the afterburner module to the handler's object mapper.
import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectReader; import com.fasterxml.jackson.databind.ObjectWriter; import com.fasterxml.jackson.module.afterburner.AfterburnerModule;
I was trying to utilize LambdaContainerHandler for RequestHandler but noticed that these are required. Could these dependencies at least be extracted out so that the dependencies don't have to introduced for vain. An abstract base class that would not have objectReader/Writer, proxyStream would be enough and the LambdaContainerHandler would be extended from this base class preserving the backward compatibility.
This would also make it possible to leave s the requestClass, responseClass constructor params out from the base class thus simplifying thing a bit.
It is something we plan to do for a version 2.0. The challenge today is that the LambdaContainerHandler exposes a static method to get the object mapper and customers may rely on it. Removing the method is too big a breaking change for a minor release.