jackson-databind icon indicating copy to clipboard operation
jackson-databind copied to clipboard

Add _externalTypeIdHandler into BeanDeserializerBase constructors or add public method for ExternalTypeHandler creation

Open lazyr1ch opened this issue 2 years ago • 1 comments

Describe the bug I want to create custom BeanDeserializer, but in my case i need create new instance from source: ValidatingBeanDeserializer(BeanDeserializerBase src) { super(src); } Field _externalTypeIdHandler is absent in constructors of BeanDeserializerBase. Please add this field in constructors or add public method that creates ExternalTypeHander from BeanDeserializerBase (like something): public ExternalTypeHandler start() { return new ExternalTypeHandler(this._externalTypeIdHandler ); } I have a problem when deserializing view with JsonTypeInfo.AS.EXTERNAL_PROPERTY. 2.13.1

lazyr1ch avatar Feb 07 '22 21:02 lazyr1ch

Sounds like there perhaps would need to be another constructor overload (taking base and new ExternalTypeHandler); adding new argument to existing constructors would likely be major incompatibility source (or require 2x constructors for redirection).

I am not against such change but may not have time to follow up on this in near future with my own change. But I always try to take time to help anyone who contributes a PR in case you (or anyone else) wants to take a stab?

Change would need to go in 2.14 being change to internal API.

cowtowncoder avatar Feb 28 '22 00:02 cowtowncoder