Owner class addVisit() method return type void

This commit is contained in:
jcw1031 2023-04-22 18:52:55 +09:00 committed by Dave Syer
parent 6e71aaa44c
commit 8a5a14e88a

View file

@ -160,7 +160,7 @@ public class Owner extends Person {
* @param petId the identifier of the {@link Pet}, must not be {@literal null}.
* @param visit the visit to add, must not be {@literal null}.
*/
public Owner addVisit(Integer petId, Visit visit) {
public void addVisit(Integer petId, Visit visit) {
Assert.notNull(petId, "Pet identifier must not be null!");
Assert.notNull(visit, "Visit must not be null!");
@ -170,8 +170,6 @@ public class Owner extends Person {
Assert.notNull(pet, "Invalid Pet identifier!");
pet.addVisit(visit);
return this;
}
}