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

Warnings emitted when used with Jackson >= 2.16.0 due to use of deprecated PropertyNamingStrategy subclasses #110

Closed
kurtraschke opened this issue Dec 29, 2023 · 2 comments · Fixed by #113

Comments

@kurtraschke
Copy link

This is a continuation of #81, #88, and #95 due to FasterXML/jackson-databind#4144 which now logs a warning whenever any of the deprecated subclasses of PropertyNamingStrategy are invoked.

When used with Jackson >= 2.16.0, warnings such as the following are emitted:

2023-12-28 23:54:07 WARNING PropertyNamingStrategy.PropertyNamingStrategyWrapper is used but it has been deprecated due to risk of deadlock. Consider using PropertyNamingStrategies.PropertyNamingStrategyWrapper instead. See https://github.com/FasterXML/jackson-databind/issues/2715 for more details.
2023-12-28 23:54:07 WARNING PropertyNamingStrategy.NamingBaseAdapter is used but it has been deprecated due to risk of deadlock. Consider using PropertyNamingStrategies.NamingBaseAdapter instead. See https://github.com/FasterXML/jackson-databind/issues/2715 for more details.

Per FasterXML/jackson-databind#4136, these deprecated classes may be dropped entirely in Jackson 2.17.

@cowtowncoder
Copy link

To help with the context: Jackson project would normally not drop any 2.x classes during 2.x lifecycle, but due to severity of the issue we are considering that. Anyone wishing to add question, feedback, suggestions, opinions please feel free to add not on issue mentioned above.

@jhaber
Copy link
Member

jhaber commented Dec 30, 2023

👍 should be resolved by #113. One of the reasons that we don't just use PropertyNamingStrategy is that our introspection is based on a protobuf descriptor rather than the fields/methods of a Java class, so constructing the arguments needed for PropertyNamingStrategy is not easy/possible. Special-casing PropertyNamingStrategyBase/NamingBase avoids this issue because it's a simple string->string mapping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants