Clean code to compile with Java5