From ad32bd832c949b9bd452b94a5192a815b444042a Mon Sep 17 00:00:00 2001 From: bijomutta Date: Thu, 13 Jul 2023 05:18:07 +0200 Subject: [PATCH] applying spring -javaformant --- .../springframework/samples/petclinic/owner/PetController.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/org/springframework/samples/petclinic/owner/PetController.java b/src/main/java/org/springframework/samples/petclinic/owner/PetController.java index 1e978e735..c3334bab8 100644 --- a/src/main/java/org/springframework/samples/petclinic/owner/PetController.java +++ b/src/main/java/org/springframework/samples/petclinic/owner/PetController.java @@ -116,10 +116,9 @@ class PetController { String petName = pet.getName(); - //checking if the pet name already exist for the owner + // checking if the pet name already exist for the owner if (StringUtils.hasLength(petName)) { Pet existingPet = owner.getPet(petName.toLowerCase(), false); - //adding error if pet name already exist if (existingPet != null && existingPet.getId() != pet.getId()) { result.rejectValue("name", "duplicate", "already exists"); }