Description
Usage of factory method or Builder pattern for Locale object creation and usage.
Locale aLocale = Locale.forLanguageTag("en-US");
Locale bLocale = new Locale.Builder().setLanguage("en").setRegion("US").build();
https://docs.oracle.com/javase/tutorial/i18n/locale/index.html
There are many instances on which new Locale() is used instead of this we can use UtilMisc.ensureLocale()
Attachments
Attachments
1.
|
Use well-formed IETF BCP 47 language tag for setVariant method. | Closed | Unassigned |