From: Javen O'Neal Date: Tue, 24 Nov 2015 01:10:47 +0000 (+0000) Subject: FindBug warning: EQ_SELF_USE_OBJECT: class defines equals(Region) and uses Object... X-Git-Tag: REL_3_14_BETA1~96 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=72e5b443af8740d8edb954e5c4cbfa4dad64326b;p=poi.git FindBug warning: EQ_SELF_USE_OBJECT: class defines equals(Region) and uses Object.equals(Object) git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1716004 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/poi/ss/util/Region.java b/src/java/org/apache/poi/ss/util/Region.java index b39681917a..a94e6f5505 100644 --- a/src/java/org/apache/poi/ss/util/Region.java +++ b/src/java/org/apache/poi/ss/util/Region.java @@ -159,12 +159,19 @@ public class Region implements Comparable { return false; } + @Override + public boolean equals(Object o) { + if (this instanceof Region) + return equals((Region) o); + else + return false; + } + public boolean equals(Region r) { return (compareTo(r) == 0); } - @Override public int hashCode() { assert false : "hashCode not designed";