Fix error thrown by javac but not the eclipse compiler