Using Java 1.5 to get rid of compiler error