You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by si...@apache.org on 2011/09/07 22:04:21 UTC
svn commit: r1166361 -
/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/BinaryCompositeBinaryFunction.java
Author: simonetripodi
Date: Wed Sep 7 20:04:20 2011
New Revision: 1166361
URL: http://svn.apache.org/viewvc?rev=1166361&view=rev
Log:
fixed checkstyle violations: '4' is a magic number.
Modified:
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/BinaryCompositeBinaryFunction.java
Modified: commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/BinaryCompositeBinaryFunction.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/BinaryCompositeBinaryFunction.java?rev=1166361&r1=1166360&r2=1166361&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/BinaryCompositeBinaryFunction.java (original)
+++ commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/BinaryCompositeBinaryFunction.java Wed Sep 7 20:04:20 2011
@@ -43,6 +43,9 @@ public class BinaryCompositeBinaryFuncti
*/
private static final long serialVersionUID = 2570517284319064043L;
+ /** Base hash integer used to shift hash */
+ private static final int HASH_SHIFT = 4;
+
/**
* Type-remembering Helper
*
@@ -132,11 +135,11 @@ public class BinaryCompositeBinaryFuncti
*/
public int hashCode() {
int hash = "BinaryCompositeBinaryFunction".hashCode();
- hash <<= 4;
+ hash <<= HASH_SHIFT;
hash ^= helper.f.hashCode();
- hash <<= 4;
+ hash <<= HASH_SHIFT;
hash ^= helper.g.hashCode();
- hash <<= 4;
+ hash <<= HASH_SHIFT;
hash ^= helper.h.hashCode();
return hash;
}