Skip to content

use Locale.ROOT in CharSequenceValue.toEnum#2570

Open
netliomax25-code wants to merge 1 commit into
apache:masterfrom
netliomax25-code:json-enum-locale-root
Open

use Locale.ROOT in CharSequenceValue.toEnum#2570
netliomax25-code wants to merge 1 commit into
apache:masterfrom
netliomax25-code:json-enum-locale-root

Conversation

@netliomax25-code
Copy link
Copy Markdown

Noticed the fallback in CharSequenceValue.toEnum uppercases the token text with the JVM default locale before matching the enum constant. Under tr_TR a value like id folds to İD, so Enum.valueOf throws and a valid JSON value never resolves. Fold with Locale.ROOT so the lookup stays locale-independent.

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.

1 participant