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

Improve SEL function getAsText to use Locale.US instead of the defaul locale #62

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

jun-he
Copy link
Contributor

@jun-he jun-he commented Jul 29, 2024

Pull Request type

  • Bugfix
  • Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes (Please run ./gradlew build --write-locks to refresh dependencies)
  • Other (please describe):

NOTE: Please remember to run ./gradlew spotlessApply to fix any format violations.

Changes in this PR

The current build will fail if the language is not EN because a unit test makes this assumption. By going over SEL code, it might not handle non-EN well. So update getAsText SEL function to always use Locale.US.

@jun-he
Copy link
Contributor Author

jun-he commented Jul 29, 2024

@HankGuo93 @hskimsky I took another look and proposed another alternative way to fix the locale issue.
can you please help to try it to see if it fixes the issue? Thanks.

@HankGuo93
Copy link
Contributor

@jun-he
This method works correctly as well. However, considering other similar locale issues, do you think it might be better to set the locale in the JVM settings?

@jun-he
Copy link
Contributor Author

jun-he commented Jul 30, 2024

@HankGuo93 This is a good point. Most of places, the locale has been set. This one in SEL is missed. Otherwise, the build and tests seems OK. I would wait to see if anyone has locale issues when running the server. If that is the case, we can put locale to bootRun's jvm args. I will merge this one to fix the test. Thanks.

@jun-he jun-he merged commit 774807e into Netflix:main Jul 30, 2024
1 check passed
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