Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5160A8048 for ; Wed, 7 Sep 2011 20:04:45 +0000 (UTC) Received: (qmail 98920 invoked by uid 500); 7 Sep 2011 20:04:44 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 98845 invoked by uid 500); 7 Sep 2011 20:04:44 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 98838 invoked by uid 99); 7 Sep 2011 20:04:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Sep 2011 20:04:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Sep 2011 20:04:41 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 2954623888FE for ; Wed, 7 Sep 2011 20:04:21 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1166361 - /commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/BinaryCompositeBinaryFunction.java Date: Wed, 07 Sep 2011 20:04:21 -0000 To: commits@commons.apache.org From: simonetripodi@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110907200421.2954623888FE@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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; }