Fix Java warnings.