You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2012/06/06 05:32:59 UTC
[Bug 53369] New:
testDateFormat(org.apache.poi.ss.format.TestCellFormatPart)junit.framework.ComparisonFailure: format "org.apache.poi.ss.format.CellFormatPart@dbcd0e" expected:<"11-10-[]52"> but was:<"11-10-[19]52">
https://issues.apache.org/bugzilla/show_bug.cgi?id=53369
Priority: P2
Bug ID: 53369
Assignee: dev@poi.apache.org
Summary: testDateFormat(org.apache.poi.ss.format.TestCellFormat
Part)junit.framework.ComparisonFailure: format
"org.apache.poi.ss.format.CellFormatPart@dbcd0e"
expected:<"11-10-[]52"> but was:<"11-10-[19]52">
Severity: normal
Classification: Unclassified
OS: Linux
Reporter: orion@cora.nwra.com
Hardware: PC
Status: NEW
Version: 3.8
Component: XSSF
Product: POI
Trying to build apache-poi 3.8 for Fedora 17 with openjdk 1.7.0 I'm getting the
following failure:
compile-ooxml-lite:
[java] Collecting unit tests from
/export/home/orion/fedora/apache-poi/poi-3.8/build/ooxml-test-classes
[java] ......F...................................
[java] .........................................
[java] .........................................
[java] .........................................
[java] .........................................
[java] .........................................
[java] .........................................
[java] .........................................
[java] .........................................
[java] .........................................
[java] .........................................
[java] .........................................
[java] .........................................
[java] .........................................
[java] .........................................
[java] .........................................
[java] .........................................
[java] .........................................
[java] .........................................
[java] ...................................
[java] Time: 163.944
[java] There was 1 failure:
[java] 1)
testDateFormat(org.apache.poi.ss.format.TestCellFormatPart)junit.framework.ComparisonFailure:
format "org.apache.poi.ss.format.CellFormatPart@dbcd0e" expected:<"11-10-[]52">
but was:<"11-10-[19]52">
[java] at
org.apache.poi.ss.format.CellFormatTestBase$CellValue.equivalent(CellFormatTestBase.java:95)
[java] at
org.apache.poi.ss.format.CellFormatTestBase.tryColor(CellFormatTestBase.java:247)
[java] at
org.apache.poi.ss.format.CellFormatTestBase.tryFormat(CellFormatTestBase.java:221)
[java] at
org.apache.poi.ss.format.CellFormatTestBase.runFormatTests(CellFormatTestBase.java:130)
[java] at
org.apache.poi.ss.format.TestCellFormatPart.testDateFormat(TestCellFormatPart.java:77)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at org.apache.poi.util.OOXMLLite.build(OOXMLLite.java:103)
[java] at org.apache.poi.util.OOXMLLite.main(OOXMLLite.java:78)
[java]
[java] FAILURES!!!
[java] Tests run: 814, Failures: 1, Errors: 0
[junit] Running org.apache.poi.ss.format.TestCellFormatPart
[junit] Tests run: 2, Failures: 1, Errors: 0, Time elapsed: 1.732 sec
Let me know if there is anything else I can provide.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 53369]
testDateFormat(org.apache.poi.ss.format.TestCellFormatPart)junit.framework.ComparisonFailure: format "org.apache.poi.ss.format.CellFormatPart@dbcd0e" expected:<"11-10-[]52"> but was:<"11-10-[19]52">
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53369
--- Comment #6 from Orion Poplawski <or...@cora.nwra.com> ---
Created attachment 29059
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29059&action=edit
jdk17 patch
That fixes the build for me. Attached a patch.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 53369]
testDateFormat(org.apache.poi.ss.format.TestCellFormatPart)junit.framework.ComparisonFailure: format "org.apache.poi.ss.format.CellFormatPart@dbcd0e" expected:<"11-10-[]52"> but was:<"11-10-[19]52">
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53369
--- Comment #1 from Yegor Kozlov <ye...@dinom.ru> ---
It looks like POI does not build on JDK 1.7
I was able to reproduce the trouble with Oracle JDK 1.7.01. Same test fails,
only the message is a bit different:
[java] There was 1 failure:
[java] 1)
testDateFormat(org.apache.poi.ss.format.TestCellFormatPart)junit.framework.ComparisonFailure:
format "org
apache.poi.ss.format.CellFormatPart@289e637e" expected:<......> but
was:<...19...>
[java] at
org.apache.poi.ss.format.CellFormatTestBase$CellValue.equivalent(CellFormatTestBase.java:95)
[java] at
org.apache.poi.ss.format.CellFormatTestBase.tryColor(CellFormatTestBase.java:247)
[java] at
org.apache.poi.ss.format.CellFormatTestBase.tryFormat(CellFormatTestBase.java:221)
[java] at
org.apache.poi.ss.format.CellFormatTestBase.runFormatTests(CellFormatTestBase.java:130)
[java] at
org.apache.poi.ss.format.TestCellFormatPart.testDateFormat(TestCellFormatPart.java:77)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at org.apache.poi.util.OOXMLLite.build(OOXMLLite.java:103)
[java] at org.apache.poi.util.OOXMLLite.main(OOXMLLite.java:78)
[java]
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 53369]
testDateFormat(org.apache.poi.ss.format.TestCellFormatPart)junit.framework.ComparisonFailure: format "org.apache.poi.ss.format.CellFormatPart@dbcd0e" expected:<"11-10-[]52"> but was:<"11-10-[19]52">
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53369
Yegor Kozlov <ye...@dinom.ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
--- Comment #3 from Yegor Kozlov <ye...@dinom.ru> ---
I put this bug in my punch list.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 53369]
testDateFormat(org.apache.poi.ss.format.TestCellFormatPart)junit.framework.ComparisonFailure: format "org.apache.poi.ss.format.CellFormatPart@dbcd0e" expected:<"11-10-[]52"> but was:<"11-10-[19]52">
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53369
--- Comment #5 from jack <ma...@gmail.com> ---
I fixed it simply by change
dateFmt = new SimpleDateFormat(descBuf.toString());
to
dateFmt = new SimpleDateFormat(
descBuf.toString().replaceAll("((y)(?!y))(?<!yy)", "yy"),LOCALE.US);
in org.apache.poi.ss.format.CellDateFormatter at line 153.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 53369]
testDateFormat(org.apache.poi.ss.format.TestCellFormatPart)junit.framework.ComparisonFailure: format "org.apache.poi.ss.format.CellFormatPart@dbcd0e" expected:<"11-10-[]52"> but was:<"11-10-[19]52">
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53369
Yegor Kozlov <ye...@dinom.ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Yegor Kozlov <ye...@dinom.ru> ---
Thanks for the patch, applied in r1364058
Regards,
Yegor
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 53369]
testDateFormat(org.apache.poi.ss.format.TestCellFormatPart)junit.framework.ComparisonFailure: format "org.apache.poi.ss.format.CellFormatPart@dbcd0e" expected:<"11-10-[]52"> but was:<"11-10-[19]52">
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53369
Nick Burch <ni...@alfresco.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #2 from Nick Burch <ni...@alfresco.com> ---
I can confirm the same issue with OpenJDK 1.7
java version "1.7.0_03"
OpenJDK Runtime Environment (IcedTea7 2.1.1pre) (7~u3-2.1.1~pre1-1ubuntu3)
OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)
[junit] Running org.apache.poi.ss.format.TestCellFormatPart
[junit] Tests run: 3, Failures: 1, Errors: 0, Time elapsed: 0.247 sec
junit.framework.ComparisonFailure: format
"org.apache.poi.ss.format.CellFormatPart@416ba050" expected:<......> but
was:<...19...>
Is anyone able to get their IDE running with Java 1.7, and debug / step in to
work out exactly what is going wrong and where?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 53369]
testDateFormat(org.apache.poi.ss.format.TestCellFormatPart)junit.framework.ComparisonFailure: format "org.apache.poi.ss.format.CellFormatPart@dbcd0e" expected:<"11-10-[]52"> but was:<"11-10-[19]52">
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53369
--- Comment #4 from jack <ma...@gmail.com> ---
I can confirm the same issue with JDK1.7
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
It's coused by SimpleDateFormat format.
new java.text.SimpleDateFormat("d-M-y").format(new Date())
is "12-7-2012",
but in excel the format result is "12-7-12".
Could fixed in DatePartHandler(org.apache.poi.ss.format.CellDateFormatter).
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org