JDK-5024487 : jit/symcjit/4139729/Calendar/CalendarTest throws java.lang.RuntimeException
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Not an Issue
  • OS: solaris_9
  • CPU: sparc
  • Submitted: 2004-03-31
  • Updated: 2004-04-01
  • Resolved: 2004-04-01
Related Reports
Relates :  
Relates :  
Description
The test jit/symcjit/4139729/Calendar/CalendarTest throws
java.lang.RuntimeException starting with b28 SDK.
I used -Xint to avoid compilation of java methods.
It also throws exception when I used VM from b26 with SDK b28.
There were changes in the GregorianCalendar. 

jaberwocky% uname -a
SunOS jaberwocky 5.9 Generic_112233-11 sun4u sparc SUNW,Ultra-60
jaberwocky% cat rerun.bug
$TESTBASE/testbase/testbase_vm/src/jit/symcjit/4139729/Calendar/CalendarTest CalendarTest
jaberwocky% /java/re/jdk/1.5.0/promoted/all/b28/binaries/solaris-sparc/bin/java -Xint -classpath /net/vmsqe.sfbay/export/backup/testbase/runThese/classes runThese  -D:TESTBASE=/net/vmsqe.sfbay/export/backup/testbase/runThese/tests -runList rerun.bug
......................................
[Enter:CalendarTest]
CalendarTest {
  TestFieldSet4781 Passed
  TestGenericAPI Passed
  TestDisambiguation765 {
    Uncaught exception thrown in test method TestDisambiguation765
java.lang.RuntimeException: Uncaught exception thrown in test method TestDisambiguation765

        at IntlTest.err(IntlTest.java:160)
        at IntlTest.errln(IntlTest.java:165)
        at IntlTest.run(IntlTest.java:113)
        at CalendarTest.main(CalendarTest.java:13)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:326)
        at runThese$TestRunner.runTest(runThese.java:577)
        at runThese$TestRunner.run(runThese.java:501)
#Failed - Exception: [java.lang.RuntimeException]; CalendarTest; (1,0,1,0,0)
[Exit:CalendarTest]
runThese Finished
#  START: Wed Mar 31 11:10:27 PST 2004
#    END: Wed Mar 31 11:10:35 PST 2004
#ELAPSED: 0 0:0:7
......................................................
#  TESTS: 1
# PASSED: 0 0.0%
# FAILED: 0 0.0%
# EXCPTN: 1 100.0%
# ??????: 0 0.0%

jaberwocky% /java/re/jdk/1.5.0/promoted/all/b26/binaries/solaris-sparc/bin/java -Xint -classpath /net/vmsqe.sfbay/export/backup/testbase/runThese/classes runThese  -D:TESTBASE=/net/vmsqe.sfbay/export/backup/testbase/runThese/tests -runList rerun.bug
......................................
[Enter:CalendarTest]
CalendarTest {
  TestFieldSet4781 Passed
  TestGenericAPI Passed
  TestDisambiguation765 Passed
  TestRoll Passed
  TestAddSetOrder621 Passed
  TestGregorianChange768 Passed
  TestSerialize337 Passed
  TestAddSetGet0610 Passed
  TestActualMinMax Passed
  TestEpochStartFields Passed
  TestGMTvsLocal4064654 Passed
  TestAdd520 Passed
  TestRog Passed
  TestClonesUnique908 Passed
  TestFields060 Passed
  TestDOWProgression Passed
  TestGregorianChangeover Passed
  TestSecondsZero121 Passed
  TestDOW943 Passed
  TestMapping Passed
} Passed
#Passed; CalendarTest; (1,1,0,0,0)
[Exit:CalendarTest]
runThese Finished
#  START: Wed Mar 31 11:10:49 PST 2004
#    END: Wed Mar 31 11:11:00 PST 2004
#ELAPSED: 0 0:0:10
......................................................
#  TESTS: 1
# PASSED: 1 100.0%
# FAILED: 0 0.0%
# EXCPTN: 0 0.0%
# ??????: 0 0.0%

jaberwocky% 
jaberwocky% /java/re/jdk/1.5.0/latest/binaries/solaris-sparc/bin/java -Xint -classpath /net/vmsqe.sfbay/export/backup/testbase/runThese/classes runThese  -D:TESTBASE=/net/vmsqe.sfbay/export/backup/testbase/runThese/tests -runList rerun.bug
......................................
[Enter:CalendarTest]
CalendarTest {
  TestFieldSet4781 Passed
  TestGenericAPI Passed
  TestDisambiguation765 {
    Uncaught exception thrown in test method TestDisambiguation765
java.lang.RuntimeException: Uncaught exception thrown in test method TestDisambiguation765

        at IntlTest.err(IntlTest.java:160)
        at IntlTest.errln(IntlTest.java:165)
        at IntlTest.run(IntlTest.java:113)
        at CalendarTest.main(CalendarTest.java:13)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:495)
        at runThese$TestRunner.runTest(runThese.java:577)
        at runThese$TestRunner.run(runThese.java:501)
#Failed - Exception: [java.lang.RuntimeException]; CalendarTest; (1,0,1,0,0)
[Exit:CalendarTest]
runThese Finished
#  START: Wed Mar 31 11:25:55 PST 2004
#    END: Wed Mar 31 11:26:06 PST 2004
#ELAPSED: 0 0:0:11
......................................................
#  TESTS: 1
# PASSED: 0 0.0%
# FAILED: 0 0.0%
# EXCPTN: 1 100.0%
# ??????: 0 0.0%


Comments
EVALUATION The calendar fields validation in GregorianCalendar has been improved as bug fixes to provide more robust validation. The test case assumes the previous validation code which didn't detect some inconsistent calendar values. The test program appears to be copied from the Calendar regression tests. So I don't think it's necessary to run the old buggy one. I'd recommend to eliminate the test program or refer to test/java/util/Calendar/CalendarTest.java to make the same fixes for the test cases. Unless it's required to be bug-for-bug compatibility, GregorianCalendar will not be changed. ###@###.### 2004-04-01
01-04-2004