Error-prone has UnsafeLocaleUsage, detecting the use of the Locale constructors and Locale.toString.
https://errorprone.info/bugpattern/UnsafeLocaleUsage
All good...
But JDK 19 deprecated the constructors and added the static methods Locale.of:
The methods have the exact same problems as the constructors.
So it would be nice if error-prone would also detect them.
Error-prone has
UnsafeLocaleUsage, detecting the use of theLocaleconstructors andLocale.toString.https://errorprone.info/bugpattern/UnsafeLocaleUsage
All good...
But JDK 19 deprecated the constructors and added the static methods
Locale.of:static Locale Locale.of(String language)static Locale Locale.of(String language, String country)static Locale Locale.of(String language, String country, String variant)The methods have the exact same problems as the constructors.
So it would be nice if error-prone would also detect them.