mirror of https://github.com/apache/poi.git
Bugzilla 53369 fixed TestCellFormatPart.testDateFormat failing on jdk 1.7
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1364058 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
681d7bd1b8
commit
00831d3c5b
|
@ -34,6 +34,7 @@
|
||||||
|
|
||||||
<changes>
|
<changes>
|
||||||
<release version="3.9-beta1" date="2012-??-??">
|
<release version="3.9-beta1" date="2012-??-??">
|
||||||
|
<action dev="poi-developers" type="fix">53369 - Fixed tests failing on JDK 1.7</action>
|
||||||
<action dev="poi-developers" type="fix">53360 - Fixed SXSSF to correctly write text before escaped Unicode control character</action>
|
<action dev="poi-developers" type="fix">53360 - Fixed SXSSF to correctly write text before escaped Unicode control character</action>
|
||||||
<action dev="poi-developers" type="add">Change HSMF Types to have full data on ID, Name and Length, rather than just being a simple ID</action>
|
<action dev="poi-developers" type="add">Change HSMF Types to have full data on ID, Name and Length, rather than just being a simple ID</action>
|
||||||
<action dev="poi-developers" type="add">48469 - Updated case study</action>
|
<action dev="poi-developers" type="add">48469 - Updated case study</action>
|
||||||
|
|
|
@ -150,7 +150,10 @@ public class CellDateFormatter extends CellFormatter {
|
||||||
StringBuffer descBuf = CellFormatPart.parseFormat(format,
|
StringBuffer descBuf = CellFormatPart.parseFormat(format,
|
||||||
CellFormatType.DATE, partHandler);
|
CellFormatType.DATE, partHandler);
|
||||||
partHandler.finish(descBuf);
|
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))(?<!yy)", "yy");
|
||||||
|
dateFmt = new SimpleDateFormat(ptrn, LOCALE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
|
@ -214,4 +217,4 @@ public class CellDateFormatter extends CellFormatter {
|
||||||
public void simpleValue(StringBuffer toAppendTo, Object value) {
|
public void simpleValue(StringBuffer toAppendTo, Object value) {
|
||||||
SIMPLE_DATE.formatValue(toAppendTo, value);
|
SIMPLE_DATE.formatValue(toAppendTo, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue