Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-9488

Usage of factory method or Builder pattern for Locale object creation and usage.

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 16.11.03
    • Fix Version/s: 17.12.01
    • Component/s: framework
    • Labels:
      None

      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

        1. OFBIZ-9488.patch
          1 kB
          Pradhan Yash Sharma
        2. OFBIZ-9488.patch
          2 kB
          Pradhan Yash Sharma

          Activity

            People

            • Assignee:
              deepak.dixit Deepak Dixit
              Reporter:
              PradhanYashSharma Pradhan Yash Sharma
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: