Skip to content

WRITE_ENUMS_TO_LOWERCASE must use Locale.ROOT for case folding - #6010

Merged
cowtowncoder merged 4 commits into
FasterXML:3.xfrom
dlwldnjs1009:enum-lowercase-locale-root
May 24, 2026
Merged

cowtowncoder merged 4 commits into
FasterXML:3.xfrom
dlwldnjs1009:enum-lowercase-locale-root

Conversation

@dlwldnjs1009

Copy link
Copy Markdown
Contributor

Follow-up to #5994 (same root cause as #5993): EnumFeature.WRITE_ENUMS_TO_LOWERCASE
lower-cased enum names with the JVM default Locale, so under Turkish/Azeri locales
IS_ADMIN serialized as ıs_admın instead of is_admin.

#5994 applied Locale.ROOT to the UPPER_SNAKE_CASE / LOWER_CASE naming strategies;
this extends the same fix to the enum lower-casing path.

Changes

  • EnumValuesToWrite._fetch: fold enum names with Locale.ROOT (live 3.x value/key path)
  • EnumValues._findNameToUse: same fix for the deprecated helper

EnumValues is deprecated on 3.x and no longer used by EnumSerializer directly, but this
keeps the still-public helper locale-stable and matches the 2.x path where EnumValues
remains the live serialization/key path.

Testing

  • EnumSerializationTest.testEnumFeature_WRITE_ENUMS_TO_LOWERCASEUsesRootLocale
  • EnumValuesTest.testConstructFromNameLowerCasedWithRootLocale

@github-actions

Copy link
Copy Markdown

🧪 Code Coverage Report

Metric Coverage Change
Instructions coverage 81.66% 📈 +0.000%
Branches branches 75.06% 📈 +0.000%

Coverage data generated from JaCoCo test results

@github-actions

Copy link
Copy Markdown

🧪 Code Coverage Report

Metric Coverage Change
Instructions coverage 81.66% 📈 +0.000%
Branches branches 75.07% 📈 +0.010%

Coverage data generated from JaCoCo test results

@cowtowncoder cowtowncoder added this to the 2.13.2.1 milestone May 24, 2026
@cowtowncoder cowtowncoder modified the milestones: 2.13.2.1, 3.2.0 May 24, 2026
@github-actions

Copy link
Copy Markdown

🧪 Code Coverage Report

Metric Coverage Change
Instructions coverage 81.65% 📉 -0.010%
Branches branches 75.04% 📉 -0.020%

Coverage data generated from JaCoCo test results

@cowtowncoder

Copy link
Copy Markdown
Member

Whops. Merged concurrent changes that were meant to go in this PR directly in 3.x.
This is why PR may look odd; merging.

@github-actions

Copy link
Copy Markdown

🧪 Code Coverage Report

Metric Coverage Change
Instructions coverage 81.66% 📈 +0.010%
Branches branches 75.07% 📈 +0.030%

Coverage data generated from JaCoCo test results

@cowtowncoder
cowtowncoder merged commit 9486e42 into FasterXML:3.x May 24, 2026
6 checks passed
@cowtowncoder

Copy link
Copy Markdown
Member

Thank you @dlwldnjs1009 !

@dlwldnjs1009
dlwldnjs1009 deleted the enum-lowercase-locale-root branch May 25, 2026 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants