You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by on...@apache.org on 2015/11/24 01:08:22 UTC

svn commit: r1715998 - /poi/trunk/src/java/org/apache/poi/ss/util/CellRangeAddressBase.java

Author: onealj
Date: Tue Nov 24 00:08:22 2015
New Revision: 1715998

URL: http://svn.apache.org/viewvc?rev=1715998&view=rev
Log:
fix normal priority FindBugs warning: DMI_INVOKING_HASHCODE_ON_ARRAY

Modified:
    poi/trunk/src/java/org/apache/poi/ss/util/CellRangeAddressBase.java

Modified: poi/trunk/src/java/org/apache/poi/ss/util/CellRangeAddressBase.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/util/CellRangeAddressBase.java?rev=1715998&r1=1715997&r2=1715998&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/util/CellRangeAddressBase.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/util/CellRangeAddressBase.java Tue Nov 24 00:08:22 2015
@@ -233,7 +233,10 @@ public abstract class CellRangeAddressBa
 	
 	@Override
 	public int hashCode() {
-		final int[] values = new int[]{getMinRow(), getMaxRow(), getMinColumn(), getMaxColumn()};
-		return values.hashCode();
+		int code = (getMinColumn() +
+		(getMaxColumn() << 8) +
+		(getMinRow() << 16) +
+		(getMaxRow() << 24));
+		return code;
 	}
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org