From: Javen O'Neal Date: Fri, 4 Dec 2015 10:54:21 +0000 (+0000) Subject: FindBugs warning: ExcelStyleDateFormatter doesn't override java.text.SimpleDAtaFormat... X-Git-Tag: REL_3_14_BETA1~15 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=83398660de4521428a693aacbfe66c89547ed2e4;p=poi.git FindBugs warning: ExcelStyleDateFormatter doesn't override java.text.SimpleDAtaFormat.equals(Object) git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1717930 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/poi/ss/usermodel/ExcelStyleDateFormatter.java b/src/java/org/apache/poi/ss/usermodel/ExcelStyleDateFormatter.java index 2ea273f951..3e40fe5c7d 100644 --- a/src/java/org/apache/poi/ss/usermodel/ExcelStyleDateFormatter.java +++ b/src/java/org/apache/poi/ss/usermodel/ExcelStyleDateFormatter.java @@ -179,4 +179,14 @@ public class ExcelStyleDateFormatter extends SimpleDateFormat { return new StringBuffer(s); } + + @Override + public boolean equals(Object o) { + if (!(o instanceof ExcelStyleDateFormatter)) { + return false; + } + + ExcelStyleDateFormatter other = (ExcelStyleDateFormatter) o; + return dateToBeFormatted == other.dateToBeFormatted; + } }