commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1166351 - /commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/comparator/IsWithinRange.java
Date Wed, 07 Sep 2011 19:52:50 GMT
Author: simonetripodi
Date: Wed Sep  7 19:52:49 2011
New Revision: 1166351

URL: http://svn.apache.org/viewvc?rev=1166351&view=rev
Log:
fixed checkstyle violations: '29' is a magic number.

Modified:
    commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/comparator/IsWithinRange.java

Modified: commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/comparator/IsWithinRange.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/comparator/IsWithinRange.java?rev=1166351&r1=1166350&r2=1166351&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/comparator/IsWithinRange.java
(original)
+++ commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/comparator/IsWithinRange.java
Wed Sep  7 19:52:49 2011
@@ -37,6 +37,9 @@ public class IsWithinRange<A extends Com
     /** Hashcode of the name of this Predicate. */
     private static final int NAME_HASH_CODE = "IsWithinRange".hashCode();
 
+    /** Base Hashcode. */
+    private static final int BASE_HASH_CODE = 29;
+
     /***************************************************
      *  Instance variables
      ***************************************************/
@@ -97,7 +100,7 @@ public class IsWithinRange<A extends Com
      * {@inheritDoc}
      */
     public final int hashCode() {
-        return 29 * min.hashCode() + max.hashCode() + NAME_HASH_CODE;
+        return BASE_HASH_CODE * min.hashCode() + max.hashCode() + NAME_HASH_CODE;
     }
 
     /**



Mime
View raw message