Update code to use Java 7 syntax