Warnings emitted when used with Jackson >= 2.16.0 due to use of deprecated PropertyNamingStrategy subclasses
Closed this issue · 2 comments
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.
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.
👍 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