Updating using GitHub API 2025-06-19-15:31

This commit is contained in:
nidhi-vm 2025-06-19 15:31:19 -04:00
parent 28225fed73
commit df938fa402

View file

@ -134,10 +134,8 @@ public class Owner extends Person {
public Pet getPet(String name, boolean ignoreNew) {
for (Pet pet : getPets()) {
String compName = pet.getName();
if (compName != null && compName.equalsIgnoreCase(name)) {
if (!ignoreNew || !pet.isNew()) {
return pet;
}
if (compName != null && compName.equalsIgnoreCase(name) && (!ignoreNew || !pet.isNew())) {
return pet;
}
}
return null;
@ -172,4 +170,4 @@ public class Owner extends Person {
pet.addVisit(visit);
}
}
}