Merge branch 'spring-projects:main' into main

This commit is contained in:
Neven C 2023-04-29 09:39:37 +02:00 committed by GitHub
commit 51491f53e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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;
}
}