[Java]: Fixed code warnings.