Java: small cleanup