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

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

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Done
    • 16.11.03
    • 17.12.01
    • framework
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            deepak Deepak Dixit
            PradhanYashSharma Pradhan Yash Sharma
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment