jackson-module-scala does not compile with latest master (3.0.0-SNAPSHOT) jackson-databind

7 views
Skip to first unread message

PJ Fanning

unread,
Jun 8, 2020, 12:47:14 PM6/8/20
to jackson-dev
I had this module compiling but a lot of tests were broken. There is 1 compile problem now (after a recent jackson-databind change).


There is an instance where I only have access to a DeserializationConfig but then need the full DeserializationContext to call a method. Any suggestions about how I can get a context from a config or how I could refactor the code to store a context?

Tatu Saloranta

unread,
Jun 8, 2020, 12:52:54 PM6/8/20
to jacks...@googlegroups.com
Since `DeserializationContext` is per-call (i.e. no stateful instance
created for each `readValue()`) but `DeserializationConfig` is not (it
is immutable already in 2.x), latter can not contain reference to
former, so that is unfortunately not possible.

I think I'd need to understand usage bit better -- could you create an
issue for `jackson-databind`, adding references from your link, so I
can have a look at it? AnnotationIntrospector is similar to
`DeserializationConfig` and lacks access to `DeserializationContext`
(nor should expect one), but there should be a way to refactor things.

-+ Tatu +-
Reply all
Reply to author
Forward
0 new messages