Removed warnings in java code