Skip to content

Commit

Permalink
Minor straightening of code post merge
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Nov 8, 2024
1 parent 440dc47 commit 1d9fff5
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/main/java/com/fasterxml/jackson/databind/util/EnumValues.java
Original file line number Diff line number Diff line change
Expand Up @@ -244,21 +244,18 @@ protected static Enum<?>[] _enumConstants(Class<?> enumCls) {
}

protected static String _findNameToUse(String explicitName, String otherName, boolean toLowerCase) {
String name;
// If explicitly named, like @JsonProperty-annotated, then use it
if (explicitName != null) {
name = explicitName;
} else {
name = otherName;
// [databind#4788] Since 2.18.2 : EnumFeature.WRITE_ENUMS_TO_LOWERCASE should not
// override @JsonProperty values
if (toLowerCase) {
name = name.toLowerCase();
}
return explicitName;
}
// [databind#4788] Since 2.18.2 : EnumFeature.WRITE_ENUMS_TO_LOWERCASE should not
// override @JsonProperty values
if (toLowerCase) {
return otherName.toLowerCase();
}
return name;
return otherName;
}

/*
/**********************************************************************
/* Public API
Expand Down

0 comments on commit 1d9fff5

Please sign in to comment.