From 8a5a14e88a07665c97638dd81a31fb4e6c336194 Mon Sep 17 00:00:00 2001 From: jcw1031 Date: Sat, 22 Apr 2023 18:52:55 +0900 Subject: [PATCH] Owner class addVisit() method return type void --- .../org/springframework/samples/petclinic/owner/Owner.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/org/springframework/samples/petclinic/owner/Owner.java b/src/main/java/org/springframework/samples/petclinic/owner/Owner.java index a523494..ac55645 100644 --- a/src/main/java/org/springframework/samples/petclinic/owner/Owner.java +++ b/src/main/java/org/springframework/samples/petclinic/owner/Owner.java @@ -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; } }