Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Next release of Java SDK 1.5?



I have opened bug number 4671097 on the Apple Bug
Reports to report a bug fixed in the Sun 1.5 JDK
version _07.  I know that Apple is notoriously slow in
releasing Java fixes/releases.

Does anyone know when this will becoming, or a work
around for this:

07-Aug-2006 09:21 PM Steve Rogers:
Summary:

In Sun Java bug 5103041. A regression error in
1.5.0_06 version of the Sun J2SDK contains a bug which
will always result in a ClassCastException.  This has
been fixed in 1.5.0_07 of the Sun J2SDK.

Steps to Reproduce:
1.  Using JDK 5.0 Release 4 on MacOSX, create a
project in Eclipse (or any other tool)
2.  Write the following Java main class:

package scratch;

import java.sql.Timestamp;
import java.util.Date;

public class TestDateCompare
{
   public static void main(String argsp[])
   {
      Date now = new java.util.Date();
      Timestamp ts = new Timestamp(now.getTime());
      Date later = new Date();
      if (ts.compareTo(later) == 0)
      {
         System.out.println("The Timestamp equals the
Date.");
      }
      else
      {
         System.out.println("The Timestamp does not
equal the Date.");
      }
   }
}

3.  Excecute:  java scratch.TestDateCompare

Expected Results:
One of two messages println on console

Actual Results (this happens EVERY TIME):
Exception in thread "main"
java.lang.ClassCastException: java.util.Date
	at java.sql.Timestamp.compareTo(Timestamp.java:474)
	at
scratch.TestDateCompare.main(TestDateCompare.java:13)

Regression:
This does not occur in 1.4.2_07 on Mac OSX.  It has
also been fixed by SUn in 1.5.0_07, see Sun Bug Number
5103041.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.