Skip to content

Commit 63af35e

Browse files
committed
Fix #2880 by reverting part of change for #2715 (reintroduce deprecated constants)
1 parent bb15151 commit 63af35e

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

release-notes/VERSION-2.x

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Project: jackson-databind
99

1010
#2878: Revert change initially made to fix #2805: change in signature
1111
of `ObjectMapper.treeToValue()` regarding exceptions
12+
#2880: Revert removal of 2.7-deprecated `PropertyNamingStrategy` constants
13+
(reported by brettkail-wk@github)
1214

1315
2.12.0-rc1 (12-Oct-2020)
1416

src/main/java/com/fasterxml/jackson/databind/PropertyNamingStrategy.java

+30
Original file line numberDiff line numberDiff line change
@@ -387,4 +387,34 @@ public String translate(String input){
387387
return translateLowerCaseWithSeparator(input, '.');
388388
}
389389
}
390+
391+
/*
392+
/**********************************************************
393+
/* Deprecated variants, aliases
394+
/**********************************************************
395+
*/
396+
397+
/**
398+
* @deprecated Since 2.7 use {@link PropertyNamingStrategies#SNAKE_CASE} instead.
399+
*/
400+
@Deprecated // since 2.7
401+
public static final PropertyNamingStrategy CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES = SNAKE_CASE;
402+
403+
/**
404+
* @deprecated Since 2.7 use {@link PropertyNamingStrategies#UPPER_CAMEL_CASE} instead;
405+
*/
406+
@Deprecated // since 2.7
407+
public static final PropertyNamingStrategy PASCAL_CASE_TO_CAMEL_CASE = UPPER_CAMEL_CASE;
408+
409+
/**
410+
* @deprecated In 2.7 use {@link PropertyNamingStrategies#SnakeCaseStrategy} instead
411+
*/
412+
@Deprecated // since 2.7
413+
public static class LowerCaseWithUnderscoresStrategy extends SnakeCaseStrategy {}
414+
415+
/**
416+
* @deprecated In 2.7 use {@link PropertyNamingStrategies#UpperCamelCaseStrategy} instead
417+
*/
418+
@Deprecated // since 2.7
419+
public static class PascalCaseStrategy extends UpperCamelCaseStrategy { }
390420
}

0 commit comments

Comments
 (0)