diff --git a/src/documentation/content/xdocs/status.xml b/src/documentation/content/xdocs/status.xml index 01c8b0891..092abdbfc 100644 --- a/src/documentation/content/xdocs/status.xml +++ b/src/documentation/content/xdocs/status.xml @@ -34,6 +34,7 @@ + 53369 - Fixed tests failing on JDK 1.7 53360 - Fixed SXSSF to correctly write text before escaped Unicode control character Change HSMF Types to have full data on ID, Name and Length, rather than just being a simple ID 48469 - Updated case study diff --git a/src/java/org/apache/poi/ss/format/CellDateFormatter.java b/src/java/org/apache/poi/ss/format/CellDateFormatter.java index 33a9118b1..e45fa267d 100644 --- a/src/java/org/apache/poi/ss/format/CellDateFormatter.java +++ b/src/java/org/apache/poi/ss/format/CellDateFormatter.java @@ -150,7 +150,10 @@ public class CellDateFormatter extends CellFormatter { StringBuffer descBuf = CellFormatPart.parseFormat(format, CellFormatType.DATE, partHandler); partHandler.finish(descBuf); - dateFmt = new SimpleDateFormat(descBuf.toString()); + // tweak the format pattern to pass tests on JDK 1.7, + // See https://issues.apache.org/bugzilla/show_bug.cgi?id=53369 + String ptrn = descBuf.toString().replaceAll("((y)(?!y))(?