You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Jim Yu (JIRA)" <ji...@apache.org> on 2009/04/27 05:38:30 UTC
[jira] Created: (HARMONY-6181) [classlib][text]
SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
[classlib][text] SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
---------------------------------------------------------------------------------------
Key: HARMONY-6181
URL: https://issues.apache.org/jira/browse/HARMONY-6181
Project: Harmony
Issue Type: Bug
Components: Classlib
Affects Versions: 5.0M9
Reporter: Jim Yu
Fix For: 5.0M10
Currently the testcase test_set2DigitYearStartLjava_util_Date of SimpleDateFormatTest would fail as below[1]. After investigation, I noticed that this failure was caused by the different interpretation for pattern "y" between ICU and RI. In ICU spec, it explicitly mentioned "ICU interprets a single 'y' differently than Java." As ICU's behavior doesn't comply with the Java spec, it results in the Harmony defect in fact. Luckily, I've got a fix by doing a trick to solve this issue.
[1] Failure trace:
junit.framework.AssertionFailedError: Incorrect year 2000 expected:<2000> but was:<2>
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.failNotEquals(Assert.java:277)
at junit.framework.Assert.assertEquals(Assert.java:64)
at junit.framework.Assert.assertEquals(Assert.java:195)
at org.apache.harmony.text.tests.java.text.SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date(SimpleDateFormatTest.java:797)
at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
at java.lang.reflect.Method.invoke(Method.java:258)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:228)
at junit.framework.TestSuite.run(TestSuite.java:223)
at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-6181) [classlib][text]
SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
Posted by "Jim Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12706396#action_12706396 ]
Jim Yu commented on HARMONY-6181:
---------------------------------
Thanks, Tim!
I just found a minor problem here. I think it should be changed as following.
Index: modules/text/src/main/java/java/text/SimpleDateFormat.java
===================================================================
--- modules/text/src/main/java/java/text/SimpleDateFormat.java (revision 772171)
+++ modules/text/src/main/java/java/text/SimpleDateFormat.java (working copy)
@@ -266,7 +266,7 @@
* spec.
*/
String templateForICU = patternForICU(template);
- icuFormat.applyPattern(template);
+ icuFormat.applyPattern(templateForICU);
pattern = template;
}
> [classlib][text] SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
> ---------------------------------------------------------------------------------------
>
> Key: HARMONY-6181
> URL: https://issues.apache.org/jira/browse/HARMONY-6181
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Jim Yu
> Assignee: Tim Ellison
> Fix For: 5.0M10
>
> Attachments: HARMONY-6181.diff, HARMONY-6181_V2.diff
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Currently the testcase test_set2DigitYearStartLjava_util_Date of SimpleDateFormatTest would fail as below[1]. After investigation, I noticed that this failure was caused by the different interpretation for pattern "y" between ICU and RI. In ICU spec, it explicitly mentioned "ICU interprets a single 'y' differently than Java." As ICU's behavior doesn't comply with the Java spec, it results in the Harmony defect in fact. Luckily, I've got a fix by doing a trick to solve this issue.
> [1] Failure trace:
> junit.framework.AssertionFailedError: Incorrect year 2000 expected:<2000> but was:<2>
> at junit.framework.Assert.fail(Assert.java:47)
> at junit.framework.Assert.failNotEquals(Assert.java:277)
> at junit.framework.Assert.assertEquals(Assert.java:64)
> at junit.framework.Assert.assertEquals(Assert.java:195)
> at org.apache.harmony.text.tests.java.text.SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date(SimpleDateFormatTest.java:797)
> at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
> at java.lang.reflect.Method.invoke(Method.java:258)
> at junit.framework.TestCase.runTest(TestCase.java:164)
> at junit.framework.TestCase.runBare(TestCase.java:130)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:120)
> at junit.framework.TestSuite.runTest(TestSuite.java:228)
> at junit.framework.TestSuite.run(TestSuite.java:223)
> at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-6181) [classlib][text]
SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12706408#action_12706408 ]
Tim Ellison commented on HARMONY-6181:
--------------------------------------
Ouch! Good catch!
Fixed in r772196.
> [classlib][text] SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
> ---------------------------------------------------------------------------------------
>
> Key: HARMONY-6181
> URL: https://issues.apache.org/jira/browse/HARMONY-6181
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Jim Yu
> Assignee: Tim Ellison
> Fix For: 5.0M10
>
> Attachments: HARMONY-6181.diff, HARMONY-6181_V2.diff
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Currently the testcase test_set2DigitYearStartLjava_util_Date of SimpleDateFormatTest would fail as below[1]. After investigation, I noticed that this failure was caused by the different interpretation for pattern "y" between ICU and RI. In ICU spec, it explicitly mentioned "ICU interprets a single 'y' differently than Java." As ICU's behavior doesn't comply with the Java spec, it results in the Harmony defect in fact. Luckily, I've got a fix by doing a trick to solve this issue.
> [1] Failure trace:
> junit.framework.AssertionFailedError: Incorrect year 2000 expected:<2000> but was:<2>
> at junit.framework.Assert.fail(Assert.java:47)
> at junit.framework.Assert.failNotEquals(Assert.java:277)
> at junit.framework.Assert.assertEquals(Assert.java:64)
> at junit.framework.Assert.assertEquals(Assert.java:195)
> at org.apache.harmony.text.tests.java.text.SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date(SimpleDateFormatTest.java:797)
> at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
> at java.lang.reflect.Method.invoke(Method.java:258)
> at junit.framework.TestCase.runTest(TestCase.java:164)
> at junit.framework.TestCase.runBare(TestCase.java:130)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:120)
> at junit.framework.TestSuite.runTest(TestSuite.java:228)
> at junit.framework.TestSuite.run(TestSuite.java:223)
> at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HARMONY-6181) [classlib][text]
SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Ellison resolved HARMONY-6181.
----------------------------------
Resolution: Fixed
Assignee: Tim Ellison
Thanks Jim.
Patch applied to TEXT module at repo revision r768920.
Please check it was applied as you expected. I assume the test case will be removed from the exclude list in time.
> [classlib][text] SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
> ---------------------------------------------------------------------------------------
>
> Key: HARMONY-6181
> URL: https://issues.apache.org/jira/browse/HARMONY-6181
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Jim Yu
> Assignee: Tim Ellison
> Fix For: 5.0M10
>
> Attachments: HARMONY-6181.diff
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Currently the testcase test_set2DigitYearStartLjava_util_Date of SimpleDateFormatTest would fail as below[1]. After investigation, I noticed that this failure was caused by the different interpretation for pattern "y" between ICU and RI. In ICU spec, it explicitly mentioned "ICU interprets a single 'y' differently than Java." As ICU's behavior doesn't comply with the Java spec, it results in the Harmony defect in fact. Luckily, I've got a fix by doing a trick to solve this issue.
> [1] Failure trace:
> junit.framework.AssertionFailedError: Incorrect year 2000 expected:<2000> but was:<2>
> at junit.framework.Assert.fail(Assert.java:47)
> at junit.framework.Assert.failNotEquals(Assert.java:277)
> at junit.framework.Assert.assertEquals(Assert.java:64)
> at junit.framework.Assert.assertEquals(Assert.java:195)
> at org.apache.harmony.text.tests.java.text.SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date(SimpleDateFormatTest.java:797)
> at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
> at java.lang.reflect.Method.invoke(Method.java:258)
> at junit.framework.TestCase.runTest(TestCase.java:164)
> at junit.framework.TestCase.runBare(TestCase.java:130)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:120)
> at junit.framework.TestSuite.runTest(TestSuite.java:228)
> at junit.framework.TestSuite.run(TestSuite.java:223)
> at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-6181) [classlib][text]
SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
Posted by "Jim Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jim Yu updated HARMONY-6181:
----------------------------
Attachment: HARMONY-6181_V2.diff
> [classlib][text] SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
> ---------------------------------------------------------------------------------------
>
> Key: HARMONY-6181
> URL: https://issues.apache.org/jira/browse/HARMONY-6181
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Jim Yu
> Assignee: Tim Ellison
> Fix For: 5.0M10
>
> Attachments: HARMONY-6181.diff, HARMONY-6181_V2.diff
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Currently the testcase test_set2DigitYearStartLjava_util_Date of SimpleDateFormatTest would fail as below[1]. After investigation, I noticed that this failure was caused by the different interpretation for pattern "y" between ICU and RI. In ICU spec, it explicitly mentioned "ICU interprets a single 'y' differently than Java." As ICU's behavior doesn't comply with the Java spec, it results in the Harmony defect in fact. Luckily, I've got a fix by doing a trick to solve this issue.
> [1] Failure trace:
> junit.framework.AssertionFailedError: Incorrect year 2000 expected:<2000> but was:<2>
> at junit.framework.Assert.fail(Assert.java:47)
> at junit.framework.Assert.failNotEquals(Assert.java:277)
> at junit.framework.Assert.assertEquals(Assert.java:64)
> at junit.framework.Assert.assertEquals(Assert.java:195)
> at org.apache.harmony.text.tests.java.text.SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date(SimpleDateFormatTest.java:797)
> at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
> at java.lang.reflect.Method.invoke(Method.java:258)
> at junit.framework.TestCase.runTest(TestCase.java:164)
> at junit.framework.TestCase.runBare(TestCase.java:130)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:120)
> at junit.framework.TestSuite.runTest(TestSuite.java:228)
> at junit.framework.TestSuite.run(TestSuite.java:223)
> at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-6181) [classlib][text]
SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
Posted by "Jim Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jim Yu updated HARMONY-6181:
----------------------------
Attachment: (was: HARMONY-6181_V2.diff)
> [classlib][text] SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
> ---------------------------------------------------------------------------------------
>
> Key: HARMONY-6181
> URL: https://issues.apache.org/jira/browse/HARMONY-6181
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Jim Yu
> Assignee: Tim Ellison
> Fix For: 5.0M10
>
> Attachments: HARMONY-6181.diff, HARMONY-6181_V2.diff
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Currently the testcase test_set2DigitYearStartLjava_util_Date of SimpleDateFormatTest would fail as below[1]. After investigation, I noticed that this failure was caused by the different interpretation for pattern "y" between ICU and RI. In ICU spec, it explicitly mentioned "ICU interprets a single 'y' differently than Java." As ICU's behavior doesn't comply with the Java spec, it results in the Harmony defect in fact. Luckily, I've got a fix by doing a trick to solve this issue.
> [1] Failure trace:
> junit.framework.AssertionFailedError: Incorrect year 2000 expected:<2000> but was:<2>
> at junit.framework.Assert.fail(Assert.java:47)
> at junit.framework.Assert.failNotEquals(Assert.java:277)
> at junit.framework.Assert.assertEquals(Assert.java:64)
> at junit.framework.Assert.assertEquals(Assert.java:195)
> at org.apache.harmony.text.tests.java.text.SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date(SimpleDateFormatTest.java:797)
> at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
> at java.lang.reflect.Method.invoke(Method.java:258)
> at junit.framework.TestCase.runTest(TestCase.java:164)
> at junit.framework.TestCase.runBare(TestCase.java:130)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:120)
> at junit.framework.TestSuite.runTest(TestSuite.java:228)
> at junit.framework.TestSuite.run(TestSuite.java:223)
> at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HARMONY-6181) [classlib][text]
SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Ellison resolved HARMONY-6181.
----------------------------------
Resolution: Fixed
Jim,
I applied a slightly modified version of your v2 patch to the TEXT module at repo revision r772140.
The changes were superficial.
Please verify this now fixes the issue.
> [classlib][text] SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
> ---------------------------------------------------------------------------------------
>
> Key: HARMONY-6181
> URL: https://issues.apache.org/jira/browse/HARMONY-6181
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Jim Yu
> Assignee: Tim Ellison
> Fix For: 5.0M10
>
> Attachments: HARMONY-6181.diff, HARMONY-6181_V2.diff
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Currently the testcase test_set2DigitYearStartLjava_util_Date of SimpleDateFormatTest would fail as below[1]. After investigation, I noticed that this failure was caused by the different interpretation for pattern "y" between ICU and RI. In ICU spec, it explicitly mentioned "ICU interprets a single 'y' differently than Java." As ICU's behavior doesn't comply with the Java spec, it results in the Harmony defect in fact. Luckily, I've got a fix by doing a trick to solve this issue.
> [1] Failure trace:
> junit.framework.AssertionFailedError: Incorrect year 2000 expected:<2000> but was:<2>
> at junit.framework.Assert.fail(Assert.java:47)
> at junit.framework.Assert.failNotEquals(Assert.java:277)
> at junit.framework.Assert.assertEquals(Assert.java:64)
> at junit.framework.Assert.assertEquals(Assert.java:195)
> at org.apache.harmony.text.tests.java.text.SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date(SimpleDateFormatTest.java:797)
> at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
> at java.lang.reflect.Method.invoke(Method.java:258)
> at junit.framework.TestCase.runTest(TestCase.java:164)
> at junit.framework.TestCase.runBare(TestCase.java:130)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:120)
> at junit.framework.TestSuite.runTest(TestSuite.java:228)
> at junit.framework.TestSuite.run(TestSuite.java:223)
> at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-6181) [classlib][text]
SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
Posted by "Jim Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12706414#action_12706414 ]
Jim Yu commented on HARMONY-6181:
---------------------------------
Verified at r772209. Thanks, Tim.
> [classlib][text] SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
> ---------------------------------------------------------------------------------------
>
> Key: HARMONY-6181
> URL: https://issues.apache.org/jira/browse/HARMONY-6181
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Jim Yu
> Assignee: Tim Ellison
> Fix For: 5.0M10
>
> Attachments: HARMONY-6181.diff, HARMONY-6181_V2.diff
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Currently the testcase test_set2DigitYearStartLjava_util_Date of SimpleDateFormatTest would fail as below[1]. After investigation, I noticed that this failure was caused by the different interpretation for pattern "y" between ICU and RI. In ICU spec, it explicitly mentioned "ICU interprets a single 'y' differently than Java." As ICU's behavior doesn't comply with the Java spec, it results in the Harmony defect in fact. Luckily, I've got a fix by doing a trick to solve this issue.
> [1] Failure trace:
> junit.framework.AssertionFailedError: Incorrect year 2000 expected:<2000> but was:<2>
> at junit.framework.Assert.fail(Assert.java:47)
> at junit.framework.Assert.failNotEquals(Assert.java:277)
> at junit.framework.Assert.assertEquals(Assert.java:64)
> at junit.framework.Assert.assertEquals(Assert.java:195)
> at org.apache.harmony.text.tests.java.text.SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date(SimpleDateFormatTest.java:797)
> at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
> at java.lang.reflect.Method.invoke(Method.java:258)
> at junit.framework.TestCase.runTest(TestCase.java:164)
> at junit.framework.TestCase.runBare(TestCase.java:130)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:120)
> at junit.framework.TestSuite.runTest(TestSuite.java:228)
> at junit.framework.TestSuite.run(TestSuite.java:223)
> at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-6181) [classlib][text]
SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
Posted by "Jim Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jim Yu updated HARMONY-6181:
----------------------------
Attachment: (was: HARMONY-6181_V2.diff)
> [classlib][text] SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
> ---------------------------------------------------------------------------------------
>
> Key: HARMONY-6181
> URL: https://issues.apache.org/jira/browse/HARMONY-6181
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Jim Yu
> Assignee: Tim Ellison
> Fix For: 5.0M10
>
> Attachments: HARMONY-6181.diff, HARMONY-6181_V2.diff
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Currently the testcase test_set2DigitYearStartLjava_util_Date of SimpleDateFormatTest would fail as below[1]. After investigation, I noticed that this failure was caused by the different interpretation for pattern "y" between ICU and RI. In ICU spec, it explicitly mentioned "ICU interprets a single 'y' differently than Java." As ICU's behavior doesn't comply with the Java spec, it results in the Harmony defect in fact. Luckily, I've got a fix by doing a trick to solve this issue.
> [1] Failure trace:
> junit.framework.AssertionFailedError: Incorrect year 2000 expected:<2000> but was:<2>
> at junit.framework.Assert.fail(Assert.java:47)
> at junit.framework.Assert.failNotEquals(Assert.java:277)
> at junit.framework.Assert.assertEquals(Assert.java:64)
> at junit.framework.Assert.assertEquals(Assert.java:195)
> at org.apache.harmony.text.tests.java.text.SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date(SimpleDateFormatTest.java:797)
> at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
> at java.lang.reflect.Method.invoke(Method.java:258)
> at junit.framework.TestCase.runTest(TestCase.java:164)
> at junit.framework.TestCase.runBare(TestCase.java:130)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:120)
> at junit.framework.TestSuite.runTest(TestSuite.java:228)
> at junit.framework.TestSuite.run(TestSuite.java:223)
> at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (HARMONY-6181) [classlib][text]
SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
Posted by "Jim Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jim Yu closed HARMONY-6181.
---------------------------
> [classlib][text] SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
> ---------------------------------------------------------------------------------------
>
> Key: HARMONY-6181
> URL: https://issues.apache.org/jira/browse/HARMONY-6181
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Jim Yu
> Assignee: Tim Ellison
> Fix For: 5.0M10
>
> Attachments: HARMONY-6181.diff, HARMONY-6181_V2.diff
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Currently the testcase test_set2DigitYearStartLjava_util_Date of SimpleDateFormatTest would fail as below[1]. After investigation, I noticed that this failure was caused by the different interpretation for pattern "y" between ICU and RI. In ICU spec, it explicitly mentioned "ICU interprets a single 'y' differently than Java." As ICU's behavior doesn't comply with the Java spec, it results in the Harmony defect in fact. Luckily, I've got a fix by doing a trick to solve this issue.
> [1] Failure trace:
> junit.framework.AssertionFailedError: Incorrect year 2000 expected:<2000> but was:<2>
> at junit.framework.Assert.fail(Assert.java:47)
> at junit.framework.Assert.failNotEquals(Assert.java:277)
> at junit.framework.Assert.assertEquals(Assert.java:64)
> at junit.framework.Assert.assertEquals(Assert.java:195)
> at org.apache.harmony.text.tests.java.text.SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date(SimpleDateFormatTest.java:797)
> at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
> at java.lang.reflect.Method.invoke(Method.java:258)
> at junit.framework.TestCase.runTest(TestCase.java:164)
> at junit.framework.TestCase.runBare(TestCase.java:130)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:120)
> at junit.framework.TestSuite.runTest(TestSuite.java:228)
> at junit.framework.TestSuite.run(TestSuite.java:223)
> at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-6181) [classlib][text]
SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
Posted by "Jim Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jim Yu updated HARMONY-6181:
----------------------------
Attachment: HARMONY-6181_V2.diff
> [classlib][text] SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
> ---------------------------------------------------------------------------------------
>
> Key: HARMONY-6181
> URL: https://issues.apache.org/jira/browse/HARMONY-6181
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Jim Yu
> Assignee: Tim Ellison
> Fix For: 5.0M10
>
> Attachments: HARMONY-6181.diff, HARMONY-6181_V2.diff
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Currently the testcase test_set2DigitYearStartLjava_util_Date of SimpleDateFormatTest would fail as below[1]. After investigation, I noticed that this failure was caused by the different interpretation for pattern "y" between ICU and RI. In ICU spec, it explicitly mentioned "ICU interprets a single 'y' differently than Java." As ICU's behavior doesn't comply with the Java spec, it results in the Harmony defect in fact. Luckily, I've got a fix by doing a trick to solve this issue.
> [1] Failure trace:
> junit.framework.AssertionFailedError: Incorrect year 2000 expected:<2000> but was:<2>
> at junit.framework.Assert.fail(Assert.java:47)
> at junit.framework.Assert.failNotEquals(Assert.java:277)
> at junit.framework.Assert.assertEquals(Assert.java:64)
> at junit.framework.Assert.assertEquals(Assert.java:195)
> at org.apache.harmony.text.tests.java.text.SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date(SimpleDateFormatTest.java:797)
> at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
> at java.lang.reflect.Method.invoke(Method.java:258)
> at junit.framework.TestCase.runTest(TestCase.java:164)
> at junit.framework.TestCase.runBare(TestCase.java:130)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:120)
> at junit.framework.TestSuite.runTest(TestSuite.java:228)
> at junit.framework.TestSuite.run(TestSuite.java:223)
> at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-6181) [classlib][text]
SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
Posted by "Jim Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jim Yu updated HARMONY-6181:
----------------------------
Attachment: HARMONY-6181_V2.diff
Thanks, Tim. But I found the earlier patch only solved the case for pattern "y". However, there may be complex pattern which contains 'y' as a sub pattern. For that case, we need a general solution to replace the 'y' in a complex pattern with 'yy'. I've attached a new patch HARMONY-6181_V2.diff to provide a general solution.
> [classlib][text] SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
> ---------------------------------------------------------------------------------------
>
> Key: HARMONY-6181
> URL: https://issues.apache.org/jira/browse/HARMONY-6181
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Jim Yu
> Assignee: Tim Ellison
> Fix For: 5.0M10
>
> Attachments: HARMONY-6181.diff, HARMONY-6181_V2.diff
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Currently the testcase test_set2DigitYearStartLjava_util_Date of SimpleDateFormatTest would fail as below[1]. After investigation, I noticed that this failure was caused by the different interpretation for pattern "y" between ICU and RI. In ICU spec, it explicitly mentioned "ICU interprets a single 'y' differently than Java." As ICU's behavior doesn't comply with the Java spec, it results in the Harmony defect in fact. Luckily, I've got a fix by doing a trick to solve this issue.
> [1] Failure trace:
> junit.framework.AssertionFailedError: Incorrect year 2000 expected:<2000> but was:<2>
> at junit.framework.Assert.fail(Assert.java:47)
> at junit.framework.Assert.failNotEquals(Assert.java:277)
> at junit.framework.Assert.assertEquals(Assert.java:64)
> at junit.framework.Assert.assertEquals(Assert.java:195)
> at org.apache.harmony.text.tests.java.text.SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date(SimpleDateFormatTest.java:797)
> at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
> at java.lang.reflect.Method.invoke(Method.java:258)
> at junit.framework.TestCase.runTest(TestCase.java:164)
> at junit.framework.TestCase.runBare(TestCase.java:130)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:120)
> at junit.framework.TestSuite.runTest(TestSuite.java:228)
> at junit.framework.TestSuite.run(TestSuite.java:223)
> at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-6181) [classlib][text]
SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
Posted by "Jim Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703064#action_12703064 ]
Jim Yu commented on HARMONY-6181:
---------------------------------
After solving this failure, there are still four testcase failures for SimpleDateFormatTest. I will continue to investigate for the others.
> [classlib][text] SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
> ---------------------------------------------------------------------------------------
>
> Key: HARMONY-6181
> URL: https://issues.apache.org/jira/browse/HARMONY-6181
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Jim Yu
> Assignee: Tim Ellison
> Fix For: 5.0M10
>
> Attachments: HARMONY-6181.diff, HARMONY-6181_V2.diff
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Currently the testcase test_set2DigitYearStartLjava_util_Date of SimpleDateFormatTest would fail as below[1]. After investigation, I noticed that this failure was caused by the different interpretation for pattern "y" between ICU and RI. In ICU spec, it explicitly mentioned "ICU interprets a single 'y' differently than Java." As ICU's behavior doesn't comply with the Java spec, it results in the Harmony defect in fact. Luckily, I've got a fix by doing a trick to solve this issue.
> [1] Failure trace:
> junit.framework.AssertionFailedError: Incorrect year 2000 expected:<2000> but was:<2>
> at junit.framework.Assert.fail(Assert.java:47)
> at junit.framework.Assert.failNotEquals(Assert.java:277)
> at junit.framework.Assert.assertEquals(Assert.java:64)
> at junit.framework.Assert.assertEquals(Assert.java:195)
> at org.apache.harmony.text.tests.java.text.SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date(SimpleDateFormatTest.java:797)
> at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
> at java.lang.reflect.Method.invoke(Method.java:258)
> at junit.framework.TestCase.runTest(TestCase.java:164)
> at junit.framework.TestCase.runBare(TestCase.java:130)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:120)
> at junit.framework.TestSuite.runTest(TestSuite.java:228)
> at junit.framework.TestSuite.run(TestSuite.java:223)
> at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-6181) [classlib][text]
SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
Posted by "Jim Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jim Yu updated HARMONY-6181:
----------------------------
Attachment: HARMONY-6181.diff
> [classlib][text] SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
> ---------------------------------------------------------------------------------------
>
> Key: HARMONY-6181
> URL: https://issues.apache.org/jira/browse/HARMONY-6181
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Jim Yu
> Fix For: 5.0M10
>
> Attachments: HARMONY-6181.diff
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Currently the testcase test_set2DigitYearStartLjava_util_Date of SimpleDateFormatTest would fail as below[1]. After investigation, I noticed that this failure was caused by the different interpretation for pattern "y" between ICU and RI. In ICU spec, it explicitly mentioned "ICU interprets a single 'y' differently than Java." As ICU's behavior doesn't comply with the Java spec, it results in the Harmony defect in fact. Luckily, I've got a fix by doing a trick to solve this issue.
> [1] Failure trace:
> junit.framework.AssertionFailedError: Incorrect year 2000 expected:<2000> but was:<2>
> at junit.framework.Assert.fail(Assert.java:47)
> at junit.framework.Assert.failNotEquals(Assert.java:277)
> at junit.framework.Assert.assertEquals(Assert.java:64)
> at junit.framework.Assert.assertEquals(Assert.java:195)
> at org.apache.harmony.text.tests.java.text.SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date(SimpleDateFormatTest.java:797)
> at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
> at java.lang.reflect.Method.invoke(Method.java:258)
> at junit.framework.TestCase.runTest(TestCase.java:164)
> at junit.framework.TestCase.runBare(TestCase.java:130)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:120)
> at junit.framework.TestSuite.runTest(TestSuite.java:228)
> at junit.framework.TestSuite.run(TestSuite.java:223)
> at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Reopened: (HARMONY-6181) [classlib][text]
SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
Posted by "Jim Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jim Yu reopened HARMONY-6181:
-----------------------------
Reopen this JIRA as an improved patch is available.
> [classlib][text] SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date would fail
> ---------------------------------------------------------------------------------------
>
> Key: HARMONY-6181
> URL: https://issues.apache.org/jira/browse/HARMONY-6181
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Jim Yu
> Assignee: Tim Ellison
> Fix For: 5.0M10
>
> Attachments: HARMONY-6181.diff, HARMONY-6181_V2.diff
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Currently the testcase test_set2DigitYearStartLjava_util_Date of SimpleDateFormatTest would fail as below[1]. After investigation, I noticed that this failure was caused by the different interpretation for pattern "y" between ICU and RI. In ICU spec, it explicitly mentioned "ICU interprets a single 'y' differently than Java." As ICU's behavior doesn't comply with the Java spec, it results in the Harmony defect in fact. Luckily, I've got a fix by doing a trick to solve this issue.
> [1] Failure trace:
> junit.framework.AssertionFailedError: Incorrect year 2000 expected:<2000> but was:<2>
> at junit.framework.Assert.fail(Assert.java:47)
> at junit.framework.Assert.failNotEquals(Assert.java:277)
> at junit.framework.Assert.assertEquals(Assert.java:64)
> at junit.framework.Assert.assertEquals(Assert.java:195)
> at org.apache.harmony.text.tests.java.text.SimpleDateFormatTest.test_set2DigitYearStartLjava_util_Date(SimpleDateFormatTest.java:797)
> at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
> at java.lang.reflect.Method.invoke(Method.java:258)
> at junit.framework.TestCase.runTest(TestCase.java:164)
> at junit.framework.TestCase.runBare(TestCase.java:130)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:120)
> at junit.framework.TestSuite.runTest(TestSuite.java:228)
> at junit.framework.TestSuite.run(TestSuite.java:223)
> at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.