Skip to content
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

Use Reflection to Configure Jackson 2.12 Features #19918

Conversation

alzimmermsft
Copy link
Member

Fixes #19897

This PR updates azure-core and azure-core-serializer-json-jackson to use MethodHandles when configuring Jackson 2.12 features. The change prevents Core from throwing MethodNotFoundExceptions and ClassNotFoundExceptions if Jackson is resolved to 2.11.

@alzimmermsft alzimmermsft added Client This issue points to a problem in the data-plane of the library. Azure.Core azure-core labels Mar 17, 2021
@alzimmermsft alzimmermsft self-assigned this Mar 17, 2021
@alzimmermsft
Copy link
Member Author

@saragluna, @mrm9084, this should resolve the issues where method and class not found exceptions are being thrown if Jackson resolves to 2.11.

@srnagar, @anuchandy, could you take a look at this change.

@g2vinay
Copy link
Member

g2vinay commented Mar 17, 2021

Let's add an unreleased tag in version_client.txt for azure-core, so that spring poms can pick it up and validate the azure-core before we patch release.

@stliu
Copy link
Member

stliu commented Mar 18, 2021

@alzimmermsft Thanks, I really appreciate this change.

Copy link

@chenrujun chenrujun left a comment

Choose a reason for hiding this comment

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

LGTM.

@alzimmermsft alzimmermsft merged commit a6d18ae into Azure:master Mar 18, 2021
@alzimmermsft alzimmermsft deleted the AzCore_ReflectivelyAccessJackson212Features branch March 18, 2021 01:34
alzimmermsft added a commit to alzimmermsft/azure-sdk-for-java that referenced this pull request Mar 18, 2021
Use MethodHandles when using Jackson 2.12 Features to Prevent Errors when Jackson 2.11 is Resolved
alzimmermsft added a commit that referenced this pull request Mar 19, 2021
Use MethodHandles when using Jackson 2.12 Features to Prevent Errors when Jackson 2.11 is Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Core azure-core Client This issue points to a problem in the data-plane of the library.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Azure Core 1.14.0 incompatible with Spring Boot 2.3/2.4
5 participants