JDK 1.5 Beta 1

Just build with 1.5, everything built and ran. Did get a warning because show() has been deperecated for Dialog and PropertiesDialog uses it. But that’s it. Speed seems about the same, things feel like they load up faster. I feel, use it if you want, but do not use any 1.5 features (auto-boxing, generics, etc). We want jME to build with 1.4 until 1.5 is official and out of beta.



Supposively vecmath is substantially faster. Garbage collector is faster as well, so we should see some improvements.

wont we have to change to the new generics?

No, all new features are optional. We should change to generics in the future after it’s out of beta.

would it make any improvements to the speed of the code?

No, byte code resulting from generics is exactly the same. Just makes the code much cleaner and easier to write in the long run.



I.e. instead of:



ArrayList list = new ArrayList();
String s = "Hi";
list.add(s);
//...
int index = ((String)list.get(0)).indexOf("i");



You can do:


ArrayList<String> list = new ArrayList<String>();
String s = "Hi";
list.add(s);
//...
int index = list.get(0).indexOf("i");



And that's a pretty dumb example, but you can see where it will be useful.

But there are no bytecode changes.

Some ‘light’ reading:



Policy based design… based on templates, all C++. But may now be useful with the Java context.



http://www.informit.com/articles/article.asp?p=167842&redir=1