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

Change EnumNamingStrategy.convertEnumToExternalName() to take MapperConfig argument #4664

Closed
cowtowncoder opened this issue Aug 16, 2024 · 1 comment
Labels
3.0 Issue planned for initial 3.0 release enum Related to handling of Enum values

Comments

@cowtowncoder
Copy link
Member

Describe your Issue

For some reason there is an oversight in EnumNamingStrategy such that configuration is not passed to it. We should fix that for 3.0 (cannot change due to compatibility requirements in 2.x).

@cowtowncoder cowtowncoder added 3.0 Issue planned for initial 3.0 release enum Related to handling of Enum values labels Aug 16, 2024
@yihtserns
Copy link
Contributor

yihtserns commented Aug 28, 2024

I wonder if it wasn't a EnumNamingStrategy.convertEnumToExternalName method parameter because any custom implementation can get it here if they need it:

class SomeCustomAnnotationIntrospector extends NopAnnotationIntrospector {
   ...

   @Override
   public Object findEnumNamingStrategy(MapperConfig<?> config, ...) {
      return new CustomEnumNamingStrategy(config);
   }
}

🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0 Issue planned for initial 3.0 release enum Related to handling of Enum values
Projects
None yet
Development

No branches or pull requests

2 participants