Fix Java compilation error