Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-5845 Search and fix minor errors and typos
  3. TRUNK-5935

Utility classes should not have public constructors

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Could
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Core 2.5.0
    • Component/s: None
    • Labels:
    • Complexity:
      Low

      Description

      Following the SonarQube:

      Utility classes, which are collections of static members, are not meant to be instantiated. Even abstract utility classes, which can be extended, should not have public constructors.

      First case:

      Second case:

      Solution:
      In all cases, add a private parameterless constructor.

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              sacull Lukasz Debicki
              Reporter:
              sacull Lukasz Debicki
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: