You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by oh...@apache.org on 2015/05/10 22:18:44 UTC

svn commit: r1678628 - /commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/event/EventListenerRegistrationData.java

Author: oheger
Date: Sun May 10 20:18:43 2015
New Revision: 1678628

URL: http://svn.apache.org/r1678628
Log:
Checkstyle: Magic number.

Modified:
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/event/EventListenerRegistrationData.java

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/event/EventListenerRegistrationData.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/event/EventListenerRegistrationData.java?rev=1678628&r1=1678627&r2=1678628&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/event/EventListenerRegistrationData.java (original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/event/EventListenerRegistrationData.java Sun May 10 20:18:43 2015
@@ -37,6 +37,9 @@ package org.apache.commons.configuration
  */
 public final class EventListenerRegistrationData<T extends Event>
 {
+    /** Constant for the factor used by the calculation of the hash code. */
+    private static final int HASH_FACTOR = 31;
+
     /** The event type. */
     private final EventType<T> eventType;
 
@@ -91,7 +94,7 @@ public final class EventListenerRegistra
     public int hashCode()
     {
         int result = eventType.hashCode();
-        result = 31 * result + listener.hashCode();
+        result = HASH_FACTOR * result + listener.hashCode();
         return result;
     }