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

Set Locale to English when uppercasing strings to match Enums #5184

Closed
wants to merge 1 commit into from

Conversation

jin
Copy link
Member

@jin jin commented May 10, 2018

Fixes #5157

If a user's default system locale is not en, en_US or en_UK, there may be a chance that String#toUpperCase will result in a string that does not exist in the Enum declaration. This is the case in #5157.

To fix this, it's either

  1. setting the Locale in the individual toUpperCase calls or
  2. set Locale to English by default from Bazel.java.

I chose the first because it seemed less intrusive, but I'm open to suggestions.

@jin jin requested a review from ulfjack May 10, 2018 14:23
@bazel-io bazel-io closed this in 91b867f May 11, 2018
@jin jin deleted the fix_locale branch May 11, 2018 16:13
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.

Invalid License Error While Running bazel build
3 participants