commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r810173 - in /commons/proper/math/trunk: checkstyle.xml src/main/java/org/apache/commons/math/linear/MatrixUtils.java
Date Tue, 01 Sep 2009 19:03:20 GMT
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();
     }
     



Mime
View raw message