-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Afterburner does not support the new CoercionConfig #120
Comments
Reported upstream: FasterXML/jackson-modules-base#120 The CoercionConfig is fantastic, unfortunately it is not yet supported by the AfterBurner module. Separately we may consider moving to the new Blackbird module on java 11 runtimes. For now I've updated our existing long deserializers for 2.12.0 which has the benefit of rejecting coercion from string to SafeLong.
Yes, it is very likely that this also affects Blackbird; and yes, improvements are needed to get behavior in line with core databind. |
I should be able to contribute something in the next week or so, no rush to review as you take a well deserved break :-) |
@carterkozak cool, glad to hear it has been at least somewhat smooth process! It's good to get a sense of various regressions after release, .1 patch often follows within a month. Many users really only test the .0 and not the rcs anyway. :) I do have my todo-list on https://github.com/FasterXML/jackson-future-ideas/wiki/Jackson-Work-in-Progress and this helps track things that should make it in 2.12.1. |
Starting work on this, bigger than I thought but important to get parity. |
Thanks, I really appreciate it! Sorry I hadn't had a chance to put something together myself. |
@carterkozak no problem at all, this is quite sizable thing. Also beefing up CoercionConfig testing in databind itself, noticing some gaps. Adding tests to Afterburner, Blackbird is actually not super difficult as I can mostly copy-paste from databind (although ideally could refactor create reusable "jackson-base-test" jar or something). |
Ok I think this should work now. Did a sizable detour by first copying quite a bit of handling code from @carterkozak Would appreciate if you could see if snapshot from 2.12 works better at this point. |
I have a project which disables scalar coercion, however allows serialization and deserialization of java
long
,java.lang.Long
, andjava.util.OptionalLong
values as strings to avoid javascript number truncation. Upgrading to 2.12.0 I replaced custom deserializers with CoercionConfig, however optimized accessors fail with:The afterburner module should respect the CoercionConfig, currently it only checks
MapperFeature.ALLOW_COERCION_OF_SCALARS
:jackson-modules-base/afterburner/src/main/java/com/fasterxml/jackson/module/afterburner/deser/OptimizedSettableBeanProperty.java
Lines 402 to 413 in 6876b28
Blackbird appears to be impacted as well (at a glance reading the code, I have not validated with a test yet):
jackson-modules-base/blackbird/src/main/java/com/fasterxml/jackson/module/blackbird/deser/OptimizedSettableBeanProperty.java
Lines 381 to 392 in 6876b28
The text was updated successfully, but these errors were encountered: