You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by lu...@apache.org on 2009/09/01 21:03:20 UTC
svn commit: r810173 - in /commons/proper/math/trunk: checkstyle.xml
src/main/java/org/apache/commons/math/linear/MatrixUtils.java
Author: luc
Date: Tue Sep 1 19:03:19 2009
New Revision: 810173
URL: http://svn.apache.org/viewvc?rev=810173&view=rev
Log:
Added a check for utility class constructor which must be private to prevent instantiation
Modified:
commons/proper/math/trunk/checkstyle.xml
commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/MatrixUtils.java
Modified: commons/proper/math/trunk/checkstyle.xml
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/checkstyle.xml?rev=810173&r1=810172&r2=810173&view=diff
==============================================================================
--- commons/proper/math/trunk/checkstyle.xml (original)
+++ commons/proper/math/trunk/checkstyle.xml Tue Sep 1 19:03:19 2009
@@ -75,6 +75,9 @@
<module name="UnusedImports" />
<module name="IllegalImport" />
+ <!-- Utility class should not be instantiated, they must have a private constructor -->
+ <module name="HideUtilityClassConstructor" />
+
</module>
<!-- Require package javadoc -->
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/MatrixUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/MatrixUtils.java?rev=810173&r1=810172&r2=810173&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/MatrixUtils.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/MatrixUtils.java Tue Sep 1 19:03:19 2009
@@ -38,9 +38,9 @@
public class MatrixUtils {
/**
- * Default constructor.
+ * Private constructor.
*/
- public MatrixUtils() {
+ private MatrixUtils() {
super();
}