JDK-4771597 : Y2k test TZ_useDaylightTime_y2k fails
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 1.4.2
  • Priority: P5
  • Status: Closed
  • Resolution: Not an Issue
  • OS: solaris_10
  • CPU: sparc
  • Submitted: 2002-10-30
  • Updated: 2002-11-18
  • Resolved: 2002-11-18
Related Reports
Relates :  
Description
Y2k test  TZ_useDaylightTime_y2k fails with both server and client VM in all the modes. I can reproduce this failure with 1.4.1.FCS- JDK too.

Test failed : misc/y2k/TZ_useDaylightTime_y2k execute_positive
Platforms failed : Solx86, Solsparc (5.10 & 5.8)

To reproduce : 
* Go to /net/jano.sfbay/export/disk20/GammaBase/Bugs/<BugId>
* Execute the rerun script as "sh rerun.sh $JAVA_HOME"

$JAVA_HOME --> JDK to be tested {for eg: /net/alpheridies/export/VM/hopper/weekly/JDK/b04/solaris-sparcv9 }


Failure : ##Exit status of execution step=1
##!checkExitCode


#Exception in thread "main" java.lang.ClassCastException
#       at TZ_useDaylightTime_y2k.<init>(TZ_useDaylightTime_y2k.java:65)
#       at TZ_useDaylightTime_y2k.main(TZ_useDaylightTime_y2k.java:102)



Comments
EVALUATION PLease update bug to give valid path to run testcase. Dir does not exist. ###@###.### 2002-10-31 JDK 1.3.1_06 TimeZone.getTimeZone(America/Los_Angeles); returns: java.util.SimpleTimeZone[id=America/Los_Angeles,offset=-28800000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=3,startDay=1,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=7200000,endTimeMode=0] JDK 1.4.2 TimeZone.getTimeZone(America/Los_Angeles); returns: sun.util.calendar.ZoneInfo[id="America/Los_Angeles",offset=-28800000,dstSavings=3600000,useDaylight=true,transitions=185,lastRule=java.util.SimpleTimeZone[id=America/Los_Angeles,offset=-28800000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=3,startDay=1,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]] I'm sure if this testcase is valid or JDK api is invalid. Need API team to look into this more. ###@###.### 2002-11-15 import java.util.*; import java.io.*; import java.text.*; class Test { public static void main(String[] args) { try { SimpleTimeZone tz = (SimpleTimeZone)TimeZone.getTimeZone("EST"); System.out.println("Test Passed"); System.exit(0); } catch (ClassCastException cce){ System.out.println(cce); System.out.println("Test Failed: The following line Failed to execute"); System.out.println("SimpleTimeZone tz = (SimpleTimeZone)TimeZone.getTimeZone(\"EST\")"); System.exit(1); } } } ================== I added the following line to the above: System.out.println("returned... " + (TimeZone.getTimeZone("EST")).getClass()); and got returned... class sun.util.calendar.ZoneInfo so the ClassCastException is correct. The class hierarchy appears to be TimeZone / SimpleTimeZone ZoneInfo so we cannot cast a ZoneInfo to a SimpleTimeZone. Reassigning this bug to the libraries group for further evaluation; perhaps there are compatibility issues here? ###@###.### 2002-11-15 TimeZone.getTimeZone() returns TimeZone, not SimpleTimeZone. See 4230123 for the 1.4.0 change. ###@###.### 2002-11-18
15-11-2002