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

Enforce noninstantiability to all Utility classes

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Trunk
    • Fix Version/s: 16.11.01
    • Component/s: ALL COMPONENTS
    • Labels:
      None
    • Sprint:
      Community Day 2 - 2016

      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

              • Assignee:
                arunpati Arun Patidar
                Reporter:
                rishisolankii Rishi Solanki
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: