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

Fix #4788 : WRITE_ENUMS_TO_LOWERCASE overrides @JsonProperty #4789

Merged
merged 2 commits into from
Nov 8, 2024

Conversation

JooHyukKim
Copy link
Member

resolves 4788

@@ -267,6 +241,22 @@ protected static Enum<?>[] _enumConstants(Class<?> enumCls) {
}
return enumValues;
}

protected static String _findNameToUse(String explicitName, String otherName, boolean toLowerCase) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I questioned for a second whether to lazy-initialize otherName param by passing a functional interface or something, but thought it would be overkill to start with.

Copy link
Member

@cowtowncoder cowtowncoder Nov 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, I think it's ok to eagerly process things in this case. Should not be on critical path.

But also: good idea to think about that, to potentially avoid unnecessary computation.

Copy link
Member

@cowtowncoder cowtowncoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Will merge, add release notes.

@cowtowncoder cowtowncoder merged commit 45b2dac into FasterXML:2.18 Nov 8, 2024
9 checks passed
@JooHyukKim
Copy link
Member Author

Thanks! May I ask you to remove this comment also along the way @cowtowncoder ? I was a few seconds late 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants