diff --git a/src/java/org/apache/poi/ss/usermodel/ExcelStyleDateFormatter.java b/src/java/org/apache/poi/ss/usermodel/ExcelStyleDateFormatter.java index 2ea273f95..3e40fe5c7 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; + } }