Correct Java compiler warnings