JDK-4402792 : api/java_util/serialization/descriptions.html, Merlin, Sparc, x86, B46, JCK13
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 1.4.0
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS:
    linux,solaris_2.6,solaris_7,windows_2000 linux,solaris_2.6,solaris_7,windows_2000
  • CPU: x86,sparc
  • Submitted: 2001-01-08
  • Updated: 2001-02-12
  • Resolved: 2001-02-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.0 betaFixed
Related Reports
Relates :  
Description
The following tests failed on merlin build 46 and passed on build 44. 

Failing Test:
=============

1) api/java_util/serialization/descriptions.html#Calendar
2) api/java_util/serialization/descriptions.html#GregorianCalendar
3) api/java_util/serialization/descriptions.html#TimeZone 

Test source location:
=====================

1)/net/jdk/export/disk8/local.java/jck1.3/JCK-runtime-13fcs/tests/api/java_util/serialization/CalendarTests.java
2)/net/jdk/export/disk8/local.java/jck1.3/JCK-runtime-13fcs/tests/api/java_util/serialization/GregorianCalendarTests.java
3)/net/jdk/export/disk8/local.java/jck1.3/JCK-runtime-13fcs/tests/api/java_util/serialization/TimeZoneTests.java

Platforms:
=============
Failed on x86 5.6 and on sparc S7. 
Haven't checked on other OSs.

JDK, switches Info:
===================
jdk1.4.0/bin/java -version
java version "1.4.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b46)
Java HotSpot(TM) Client VM (build 1.4beta-B45, mixed mode)

Failed for -client.

jtr file location:
==================

1)file:/net/jtg-i104/export/home/jtg-test/JH_jdk14_b46_jck13/workDir/api/java_util/serialization/descriptions_Calendar.jtr 
2)file:/net/jtg-i104/export/home/jtg-test/JH_jdk14_b46_jck13/workDir/api/java_util/serialization/descriptions_GregorianCalendar.jtr 
3)file:/net/jtg-i104/export/home/jtg-test/JH_jdk14_b46_jck13/workDir/api/java_util/serialization/descriptions_TimeZone.jtr

(These jtr files are also in the attachment.)

How to reproduce:
=================
Run the attached script:

1) serializationCalendar.ksh
2) serializationGregorianCalendar.ksh
3) serializationTimeZone.ksh

ERROR MESSAGE:
==============
1) api/java_util/serialization/descriptions.html#Calendar

----------log:(3/1192)----------
testRead: Failed. Equals test, expected: java.util.GregorianCalendar[time=0,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="GMT",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=1970,MONTH=0,WEEK_OF_YEAR=1,WEEK_OF_MONTH=1,DAY_OF_MONTH=1,DAY_OF_YEAR=1,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0], received: java.util.GregorianCalendar[time=0,areFieldsSet=true,areAllFieldsSet=false,lenient=true,zone=java.util.SimpleTimeZone[id=GMT,offset=0,dstSavings=3600000,useDaylight=false,startYear=0,startMode=0,startMonth=0,startDay=0,startDayOfWeek=0,startTime=0,startTimeMode=0,endMode=0,endMonth=0,endDay=0,endDayOfWeek=0,endTime=0,endTimeMode=0],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=1970,MONTH=0,WEEK_OF_YEAR=1,WEEK_OF_MONTH=1,DAY_OF_MONTH=1,DAY_OF_YEAR=1,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]
testWrite: Passed. OKAY
STATUS:Failed. tests: 2; passed: 1; failed: 1; first test case failure: testRead
result: Failed. tests: 2; passed: 1; failed: 1; first test case failure: testRead

2) api/java_util/serialization/descriptions.html#GregorianCalendar

----------log:(3/1192)----------
testRead: Failed. Equals test, expected: java.util.GregorianCalendar[time=0,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="GMT",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=1970,MONTH=0,WEEK_OF_YEAR=1,WEEK_OF_MONTH=1,DAY_OF_MONTH=1,DAY_OF_YEAR=1,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0], received: java.util.GregorianCalendar[time=0,areFieldsSet=true,areAllFieldsSet=false,lenient=true,zone=java.util.SimpleTimeZone[id=GMT,offset=0,dstSavings=3600000,useDaylight=false,startYear=0,startMode=0,startMonth=0,startDay=0,startDayOfWeek=0,startTime=0,startTimeMode=0,endMode=0,endMonth=0,endDay=0,endDayOfWeek=0,endTime=0,endTimeMode=0],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=1970,MONTH=0,WEEK_OF_YEAR=1,WEEK_OF_MONTH=1,DAY_OF_MONTH=1,DAY_OF_YEAR=1,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]
testWrite: Passed. OKAY
STATUS:Failed. tests: 2; passed: 1; failed: 1; first test case failure: testRead
result: Failed. tests: 2; passed: 1; failed: 1; first test case failure: testRead

3) api/java_util/serialization/descriptions.html#TimeZone

----------log:(3/503)----------
testRead: Failed. Equals test, expected: sun.util.calendar.ZoneInfo[id="GMT",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null], received: java.util.SimpleTimeZone[id=GMT,offset=0,dstSavings=3600000,useDaylight=false,startYear=0,startMode=0,startMonth=0,startDay=0,startDayOfWeek=0,startTime=0,startTimeMode=0,endMode=0,endMonth=0,endDay=0,endDayOfWeek=0,endTime=0,endTimeMode=0]
testWrite: Passed. OKAY
STATUS:Failed. tests: 2; passed: 1; failed: 1; first test case failure: testRead
result: Failed. tests: 2; passed: 1; failed: 1; first test case failure: testRead

System Info:
============
x86:
----
jtg-i104% uname -a
SunOS jtg-i104 5.6 Generic_105182-20 i86pc i386 i86pc
jtg-i104% psrinfo -v
Status of processor 0 as of: 12/19/00 12:26:41
  Processor has been on-line since 12/13/00 16:50:54.
  The i386 processor operates at 234 MHz,
        and has an i387 compatible floating point processor.
Status of processor 1 as of: 12/19/00 12:26:41
  Processor has been on-line since 12/13/00 16:50:54.
  The i386 processor operates at 234 MHz,
        and has an i387 compatible floating point processor.

SPARC:
-------
jtg-s117% uname -a
SunOS jtg-s117 5.7 Generic_106541-12 sun4u sparc SUNW,Ultra-60
jtg-s117% psrinfo -v
Status of processor 0 as of: 12/21/00 16:16:07
  Processor has been on-line since 12/20/00 10:44:13.
  The sparcv9 processor operates at 296 MHz,
        and has a sparcv9 floating point processor.
Status of processor 2 as of: 12/21/00 16:16:07
  Processor has been on-line since 12/20/00 10:44:14.
  The sparcv9 processor operates at 296 MHz,
        and has a sparcv9 floating point processor.


Additional JCK related info:
============================
URL to find JCK test owners: http://javaweb.eng/jck/usr/owners.jto


srilakshmi.chappidi@Eng 2001-01-08

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: merlin-beta FIXED IN: merlin-beta INTEGRATED IN: merlin-beta VERIFIED IN: merlin-beta
14-06-2004

SUGGESTED FIX *** /tmp/geta27786 Mon Jan 8 21:13:29 2001 --- Calendar.java Mon Jan 8 21:02:24 2001 *************** *** 1593,1597 **** --- 1593,1609 ---- } serialVersionOnStream = currentSerialVersion; + + // If the deserialized object has a SimpleTimeZone, try + // to replace it with a ZoneInfo equivalent in order to + // be compatible with the SimpleTimeZone-based + // implementation as much as possible. + TimeZone tz = getTimeZone(); + if (tz instanceof SimpleTimeZone) { + TimeZone zi = TimeZone.getTimeZone(tz.getID()); + if (zi != null && zi.hasSameRules(tz)) { + setTimeZone(zi); + } + } } } masayoshi.okutsu@Eng 2001-01-09
09-01-2001

EVALUATION SimpleTimeZone is no longer the default TimeZone implementation class from b45. (See 4230123) To workaround this compatibility problem, Calendar needs the same workaround as SimpleDateFormat. For TimeZoneTest, it can no longer assume that the implementation class for the TimeZone factory methods is the same (SimpleTimeZone) between releases. The JCK test has to be changed to deal with the implementation change. I filed a new bug report, 4402968, on this issue. masayoshi.okutsu@Eng 2001-01-09 Fixed this JCK Calendar serialization problem. masayoshi.okutsu@Eng 2001-01-15
09-01-2001