Added a check for utility class constructor which must be private to prevent instantiation

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@810173 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Luc Maisonobe 2009-09-01 19:03:19 +00:00
parent a43d721f85
commit 5444ff3879
2 changed files with 5 additions and 2 deletions

View File

@ -75,6 +75,9 @@
<module name="UnusedImports" /> <module name="UnusedImports" />
<module name="IllegalImport" /> <module name="IllegalImport" />
<!-- Utility class should not be instantiated, they must have a private constructor -->
<module name="HideUtilityClassConstructor" />
</module> </module>
<!-- Require package javadoc --> <!-- Require package javadoc -->

View File

@ -38,9 +38,9 @@ import org.apache.commons.math.fraction.Fraction;
public class MatrixUtils { public class MatrixUtils {
/** /**
* Default constructor. * Private constructor.
*/ */
public MatrixUtils() { private MatrixUtils() {
super(); super();
} }