Skip to content

Conversation

@antagoony
Copy link
Contributor

🤔 What's changed?

As a side-effect of your response within #376 I took a deeper look to all positions where the Locale information is stored. Doing so, I found a custom Locale cache even though the Locale class already provides an internal caching mechanism (Locale#LOCALECACHE). Admittedly, this cache will not be used when creating Locale instances by any of the Locale constructors. Instead, one must use the Locale.Builder.

This PR removes the custom Locale cache and reuses the Java built-in cache mechanism.

⚡️ What's your motivation?

I like the idea of having "a single source of truth", and this PR removes one of the code positions where the current Locale information is stored a second time.

🏷️ What kind of change is this?

  • 🏦 Refactoring/debt/DX (improvement to code design, tooling, etc. without changing behaviour)

♻️ Anything particular you want feedback on?

No.

📋 Checklist:

@mpkorstanje mpkorstanje merged commit 5c4bac9 into cucumber:main Nov 24, 2025
6 checks passed
@mpkorstanje
Copy link
Contributor

Cheers!

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