Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc : Fix broken link for JavaDoc EnumNaming feature and enhance documentation #3840

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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