mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-16 04:35:49 +00:00
Owner class addVisit() method return type void
This commit is contained in:
parent
6e71aaa44c
commit
8a5a14e88a
1 changed files with 1 additions and 3 deletions
|
@ -160,7 +160,7 @@ public class Owner extends Person {
|
||||||
* @param petId the identifier of the {@link Pet}, must not be {@literal null}.
|
* @param petId the identifier of the {@link Pet}, must not be {@literal null}.
|
||||||
* @param visit the visit to add, 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(petId, "Pet identifier must not be null!");
|
||||||
Assert.notNull(visit, "Visit 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!");
|
Assert.notNull(pet, "Invalid Pet identifier!");
|
||||||
|
|
||||||
pet.addVisit(visit);
|
pet.addVisit(visit);
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue