Wednesday, November 17, 2004

J2SE 6.0 Snapshot Releases

Sun released a snapshot release of Mustang. You can download binaries and Source bundle too. Detailed list of changes is available (Thanks to Graham Hamilton for quickly providing a change list).

java -version output:
java version "1.6.0-ea"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b12)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b12, mixed mode, sharing)

This snapshot release mostly contains bug fixes. One of my favourite bug fix in 1.6 is:
4921296:ClassCastException needs more verbose detailMessage

Consider the following code:

1 public class ExceptionTest {
2     public static void main(String args[]) {
3         String s = (Stringnew Object();
4     }
5 }

This used to give a not so useful message till mustang:

Exception in thread "main" java.lang.ClassCastException
at ExceptionTest.main(

Mustang includes both target and object class names in the message:

Exception in thread "main" java.lang.ClassCastException: java.lang.Object cannot be cast to java.lang.String
at ExceptionTest.main(

1 comment:

Anonymous said...

That was really qucik response from sun.

- Chris.