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

Enforce noninstantiability to all Utility classes

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Implemented
    • Trunk
    • 16.11.01
    • ALL COMPONENTS
    • None
    • Community Day 2 - 2016, OFBiz Community Day (May 2020)

    Description

      I have discusses this in past on mailing list, that Utility, helper, worker classes which contains only static methods should not be instantiable. Also we can restrict it by adding a private constructor.

      Currently OFBiz has many such classes which should have private constructor. Identify all the *Worker.java, *.Helper.java, and *Util.java which do not have any non static method/member are eligible for having a private constructor.

      Reference why we should do this : http://www.informit.com/articles/article.aspx?p=1216151&seqNum=4

      Attachments

        1. OFBIZ-7272.patch
          54 kB
          Chinmay Patidar

        Issue Links

          There are no Sub-Tasks for this issue.

          Activity

            People

              surajk Suraj Khurana
              rishisolankii Rishi Solanki
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: