Skip to content

Commit

Permalink
Doc : Fix broken link for JavaDoc EnumNaming feature and enhance do…
Browse files Browse the repository at this point in the history
…cumentation (#3840)
  • Loading branch information
JooHyukKim authored Mar 26, 2023
1 parent 688ae66 commit ac2f154
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ protected static EnumValues constructEnumNamingStrategyValues(SerializationConfi
annotatedClass);
EnumNamingStrategy enumNamingStrategy = EnumNamingStrategyFactory.createEnumNamingStrategyInstance(
namingDef, config.canOverrideAccessModifiers());
return enumNamingStrategy == null ? null : EnumValues.constructUsingEnumNaming(
return enumNamingStrategy == null ? null : EnumValues.constructUsingEnumNamingStrategy(
config, enumClass, enumNamingStrategy);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.fasterxml.jackson.databind.DeserializationConfig;
import com.fasterxml.jackson.databind.MapperFeature;
import com.fasterxml.jackson.databind.EnumNamingStrategy;
import com.fasterxml.jackson.databind.cfg.MapperConfig;
import com.fasterxml.jackson.databind.introspect.AnnotatedMember;

/**
Expand Down Expand Up @@ -153,6 +154,8 @@ private static EnumResolver _constructUsingIndex(Class<Enum<?>> enumCls0, Annota
* Factory method for constructing resolver that maps the name of enums converted to external property
* names into Enum value using an implementation of {@link EnumNamingStrategy}.
*
* The output {@link EnumResolver} should contain values that are symmetric to
* {@link EnumValues#constructUsingEnumNamingStrategy(MapperConfig, Class, EnumNamingStrategy)}.
* @since 2.15
*/
public static EnumResolver constructUsingEnumNamingStrategy(DeserializationConfig config,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,13 @@ public static EnumValues constructFromToString(MapperConfig<?> config, Class<Enu

/**
* Returns String serializations of Enum name using an instance of {@link EnumNamingStrategy}.
*
* The output {@link EnumValues} should contain values that are symmetric to
* {@link EnumResolver#constructUsingEnumNaming(DeserializationConfig, Class, EnumNamingStrategy)}.
* {@link EnumResolver#constructUsingEnumNamingStrategy(DeserializationConfig, Class, EnumNamingStrategy)}.
*
* @since 2.15
*/
public static EnumValues constructUsingEnumNaming(MapperConfig<?> config, Class<Enum<?>> enumClass, EnumNamingStrategy namingStrategy) {
public static EnumValues constructUsingEnumNamingStrategy(MapperConfig<?> config, Class<Enum<?>> enumClass, EnumNamingStrategy namingStrategy) {
Class<? extends Enum<?>> cls = ClassUtil.findEnumType(enumClass);
Enum<?>[] values = cls.getEnumConstants();
if (values == null) {
Expand Down

0 comments on commit ac2f154

Please sign in to comment.