]> source.dussan.org Git - poi.git/commitdiff
fix normal priority FindBugs warning: DMI_INVOKING_HASHCODE_ON_ARRAY
authorJaven O'Neal <onealj@apache.org>
Tue, 24 Nov 2015 00:08:22 +0000 (00:08 +0000)
committerJaven O'Neal <onealj@apache.org>
Tue, 24 Nov 2015 00:08:22 +0000 (00:08 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1715998 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/ss/util/CellRangeAddressBase.java

index b1f24b099a7ab757d6eba4665aac5e8fcd698913..98378f0b77f9e688fcab59878ebc7f4bb1cfad43 100644 (file)
@@ -233,7 +233,10 @@ public abstract class CellRangeAddressBase {
        
        @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;
        }
 }