Fix java 1.8 compiler warnings