From 72e5b443af8740d8edb954e5c4cbfa4dad64326b Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Tue, 24 Nov 2015 01:10:47 +0000 Subject: [PATCH] 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 --- src/java/org/apache/poi/ss/util/Region.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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"; -- 2.39.5