5
5
import com .fasterxml .jackson .databind .introspect .AnnotatedMethod ;
6
6
import com .fasterxml .jackson .databind .introspect .AnnotatedParameter ;
7
7
8
+ import java .util .logging .Logger ;
9
+
8
10
/**
9
11
* Class that defines how names of JSON properties ("external names")
10
12
* are derived from names of POJO methods and fields ("internal names"),
@@ -318,6 +320,14 @@ public String translate(String input)
318
320
@ Deprecated // since 2.12
319
321
public static class UpperCamelCaseStrategy extends PropertyNamingStrategyBase
320
322
{
323
+ public UpperCamelCaseStrategy () {
324
+ Logger .getLogger (UpperCamelCaseStrategy .class .getName ())
325
+ .warning (
326
+ "PropertyNamingStrategy.UpperCamelCaseStrategy is used but it has been deprecated due to " +
327
+ "risk of deadlock. Consider using PropertyNamingStrategies.UpperCamelCaseStrategy instead. " +
328
+ "See https://github.com/FasterXML/jackson-databind/issues/2715 for more details." );
329
+ }
330
+
321
331
/**
322
332
* Converts camelCase to PascalCase
323
333
*
@@ -353,6 +363,14 @@ public String translate(String input) {
353
363
@ Deprecated // since 2.12
354
364
public static class LowerCaseStrategy extends PropertyNamingStrategyBase
355
365
{
366
+ public LowerCaseStrategy () {
367
+ Logger .getLogger (LowerCaseStrategy .class .getName ())
368
+ .warning (
369
+ "PropertyNamingStrategy.LowerCaseStrategy is used but it has been deprecated " +
370
+ "due to risk of deadlock. Consider using PropertyNamingStrategies.LowerCaseStrategy instead. " +
371
+ "See https://github.com/FasterXML/jackson-databind/issues/2715 for more details." );
372
+ }
373
+
356
374
@ Override
357
375
public String translate (String input ) {
358
376
return input .toLowerCase ();
@@ -368,6 +386,14 @@ public String translate(String input) {
368
386
@ Deprecated // since 2.12
369
387
public static class KebabCaseStrategy extends PropertyNamingStrategyBase
370
388
{
389
+ public KebabCaseStrategy () {
390
+ Logger .getLogger (KebabCaseStrategy .class .getName ())
391
+ .warning (
392
+ "PropertyNamingStrategy.KebabCaseStrategy is used but it has been deprecated" +
393
+ "due to risk of deadlock. Consider using PropertyNamingStrategies.KebabCaseStrategy instead. " +
394
+ "See https://github.com/FasterXML/jackson-databind/issues/2715 for more details." );
395
+ }
396
+
371
397
@ Override
372
398
public String translate (String input ) {
373
399
return translateLowerCaseWithSeparator (input , '-' );
@@ -381,7 +407,16 @@ public String translate(String input) {
381
407
* for reason for deprecation)
382
408
*/
383
409
@ Deprecated // since 2.12
384
- public static class LowerDotCaseStrategy extends PropertyNamingStrategyBase {
410
+ public static class LowerDotCaseStrategy extends PropertyNamingStrategyBase
411
+ {
412
+ public LowerDotCaseStrategy () {
413
+ Logger .getLogger (LowerDotCaseStrategy .class .getName ())
414
+ .warning (
415
+ "PropertyNamingStrategy.LowerDotCaseStrategy is used but it has been deprecated" +
416
+ "due to risk of deadlock. Consider using PropertyNamingStrategies.LowerDotCaseStrategy instead. " +
417
+ "See https://github.com/FasterXML/jackson-databind/issues/2715 for more details." );
418
+ }
419
+
385
420
@ Override
386
421
public String translate (String input ){
387
422
return translateLowerCaseWithSeparator (input , '.' );
0 commit comments