implement issue #6168 configure jackson 3 mapper#6183
Conversation
|
Any chance that this is merged/released any time soon? It does block Jackson3 adaptation for us. |
|
i think this PR has problems .. because it changes the objectmapper for the rest of the test suite. the clean solution would be to instantiate the mapper correctly, but that wasnt possible for jackson2 as well, so i thought i go for the low hanging fruit. |
|
@phile314 I'm currently not happy modifying this on the fly and need to think about a proper way to implement this what is your use case ? |
|
perhaps we could make it available statically like the jackson 2 data bind codec class does |
|
We register custom modules with Jackson (special datatype conversions, null handling). As the Object Mapper is immutable with Jackson3, I do not see any way to do that with Vertx and Jackson 3 right now. Maybe I am missing something? In the end, we probably will just call Jackson directly ourselves without the detour via Vertx to work around this issue. |
|
@phile314 makes sense to do like that, however I think that doing that the field then should not be final anymore but should be volatile instead to ensure visibility |
| public class DatabindCodec extends JacksonCodec { | ||
|
|
||
| private static final ObjectMapper mapper = JsonMapper | ||
| private static ObjectMapper mapper = JsonMapper |
There was a problem hiding this comment.
this field should be come volatile
| return mapper; | ||
| } | ||
|
|
||
| public static void updateMapper(Function<MapperBuilder<ObjectMapper, ?>, ObjectMapper> f) { |
There was a problem hiding this comment.
rather name it rebuildMapper as this is what it does
| return mapper; | ||
| } | ||
|
|
||
| public static void updateMapper(Function<MapperBuilder<ObjectMapper, ?>, ObjectMapper> f) { |
There was a problem hiding this comment.
add javadoc also explaining what the method does
|
like with all static things i see problems when running the testsuite in parallel |
|
we don't run test suite in parallel at the moment
…On Wed, Jul 8, 2026 at 10:13 AM Sascha Sadat-Guscheh < ***@***.***> wrote:
*bitkid* left a comment (eclipse-vertx/vert.x#6183)
<#6183 (comment)>
like with all static things i see problems when running the testsuite in
parallel
—
Reply to this email directly, view it on GitHub
<#6183?email_source=notifications&email_token=AABXDCQJBAZKV5CVXRQYC3T5DX7D5A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIOJRGI3TIMRVGY32M4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-4912742567>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABXDCUSGGDXKFSWTA2XXH35DX7D5AVCNFSNUABDKJSXA33TNF2G64TZHMYTSMJRGUZDGO2JONZXKZJ3GQ3DGOBVHAZTONJZUF3AE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
|
updated the PR |
Motivation:
this was not possible before.