File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed
src/main/java/com/fasterxml/jackson/databind/util Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -244,21 +244,18 @@ protected static Enum<?>[] _enumConstants(Class<?> enumCls) {
244244 }
245245
246246 protected static String _findNameToUse (String explicitName , String otherName , boolean toLowerCase ) {
247- String name ;
248247 // If explicitly named, like @JsonProperty-annotated, then use it
249248 if (explicitName != null ) {
250- name = explicitName ;
251- } else {
252- name = otherName ;
253- // [databind#4788] Since 2.18.2 : EnumFeature.WRITE_ENUMS_TO_LOWERCASE should not
254- // override @JsonProperty values
255- if (toLowerCase ) {
256- name = name .toLowerCase ();
257- }
249+ return explicitName ;
250+ }
251+ // [databind#4788] Since 2.18.2 : EnumFeature.WRITE_ENUMS_TO_LOWERCASE should not
252+ // override @JsonProperty values
253+ if (toLowerCase ) {
254+ return otherName .toLowerCase ();
258255 }
259- return name ;
256+ return otherName ;
260257 }
261-
258+
262259 /*
263260 /**********************************************************************
264261 /* Public API
You can’t perform that action at this time.
0 commit comments