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:11:41 UTC
svn commit: r1166374 -
/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/CompositeUnaryFunction.java
Author: simonetripodi
Date: Wed Sep 7 20:11:41 2011
New Revision: 1166374
URL: http://svn.apache.org/viewvc?rev=1166374&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/CompositeUnaryFunction.java
Modified: commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/CompositeUnaryFunction.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/CompositeUnaryFunction.java?rev=1166374&r1=1166373&r2=1166374&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/CompositeUnaryFunction.java (original)
+++ commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/CompositeUnaryFunction.java Wed Sep 7 20:11:41 2011
@@ -55,6 +55,9 @@ public class CompositeUnaryFunction<A, T
*/
private static final long serialVersionUID = 4945193629275757281L;
+ /** Base hash integer used to shift hash */
+ private static final int HASH_SHIFT = 4;
+
/**
* Encapsulates a double function evaluation.
* @param <A> argument type
@@ -182,7 +185,7 @@ public class CompositeUnaryFunction<A, T
*/
public final int hashCode() {
// by construction, list is never null
- return ("CompositeUnaryFunction".hashCode() << 4) ^ function.hashCode();
+ return ("CompositeUnaryFunction".hashCode() << HASH_SHIFT) ^ function.hashCode();
}
/**