Migrate code to Java 6.