OpenMRS

Add a private constructor to FilterUtil

Add the private constructor below, to https://github.com/openmrs/openmrs-core/blob/master/web/src/main/java/org/openmrs/web/filter/util/FilterUtil.java private FilterUtil() { } 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.

Task tags

  • coding

Students who completed this task

Dawid Wąsala

Task type

  • code Code
close

2017