Fix Java warnings