Skip to content

Conversation

@kushagraThapar
Copy link
Member

@kushagraThapar kushagraThapar commented Mar 25, 2021

Utils.simpleObjectMapper.registerModule(new AfterburnerModule());

There is no need to use this same ObjectMapper for CosmosException, it can use its own ObjectMapper as used by CosmosDiagnostics, ClientSideRequestStatistics, ClientTelemetry, RntbdObjectMapper and so on.

Copy link
Contributor

@moderakh moderakh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kushagraThapar
LGTM.

Copy link
Member

@FabianMeiswinkel FabianMeiswinkel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed offline - I would prefer also renaming Utils.getSimpleObjectMapper to something like Utils.getObjectMapperWithAfterBurner to avoid unintentional regressions in the future.

Otherwise LGTM

@moderakh
Copy link
Contributor

As discussed offline - I would prefer also renaming Utils.getSimpleObjectMapper to something like Utils.getObjectMapperWithAfterBurner to avoid unintentional regressions in the future.

Otherwise LGTM

can we maybe call it Utils.getObjectMapperForPayloadData() or something like that as it is intended to be used for serializing/deserializing data payload and afterburner is intended to optimize that code path only.

Copy link
Member

@xinlian12 xinlian12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT, thanks for the fix Kushagra

@kushagraThapar
Copy link
Member Author

@FabianMeiswinkel @moderakh - I have updated the name to getObjectMapperForPayLoadData.

The reason I didn't choose objectMapperWithAfterBurner is because in near future if we register more modules to this objectmapper, then having afterBurner in the name might not justify the different modules this objectmapper refers to.
Let me know if this makes sense or not.

@kushagraThapar kushagraThapar merged commit ddce9d8 into Azure:master Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]java.lang.IllegalAccessError on error log on starting [BUG] Jackson afterburner warning messages are logged when first exception occurs

4 participants