google / google/error-prone

`DefaultLocale` is too coarse-grained

Open
#5,807 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
7.2k
Forks
820
Avg merge
5h 9m
Merged PRs (30d)
50

Description

While I find `DefaultLocale` helpful for methods like `String::toUpperCase`, I find it's an annoyance for methods like `String::formatted` and `String::format`. (Note that the former doesn't even have an overload that takes a `Locale`.) Also, when locale-agnostic is the typical case, it's better to do `Locale.setDefault(Locale.Category.FORMAT, Locale.ROOT)` and specify an explicit `Locale` in the exceptional case.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.