Updated code to Java 1.5 syntax.