Uploaded image for project: 'Google Code-in'
  1. Google Code-in
  2. GCI-202

Add a private constructor to WebConstants

    XMLWordPrintable

    Details

      Description

      Add the private constructor below, to https://github.com/openmrs/openmrs-core/blob/master/web/src/main/java/org/openmrs/web/WebConstants.java

      private WebConstants() {
      }
      

      Background information:

      Utility classes should not have public constructors
      Utility classes, which are a collection of static members, are not meant to be instantiated. Even abstract utility classes, which can be extended, should not have public constructors.
      Java adds an implicit public constructor to every class which does not define at least one explicitly. Hence, at least one non-public constructor should be defined.
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              ziyaointl Ziyao Zhang
              Reporter:
              dkayiwa Daniel Kayiwa
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 5 minutes Original Estimate - 5 minutes
                  5m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 30 minutes
                  30m