Fixed the java formatting issue in the files VisitControlelr and PetController.

This commit is contained in:
Abdurraffay 2024-12-11 01:45:50 +05:00
parent 274301e0e6
commit 64e049fe96
2 changed files with 2 additions and 2 deletions

View file

@ -69,7 +69,7 @@ class PetController {
@ModelAttribute("pet")
public Pet findPet(@PathVariable("ownerId") int ownerId,
@PathVariable(name = "petId", required = false) Integer petId) {
@PathVariable(name = "petId", required = false) Integer petId) {
if (petId == null) {
return new Pet();

View file

@ -64,7 +64,7 @@ class VisitController {
*/
@ModelAttribute("visit")
public Visit loadPetWithVisit(@PathVariable("ownerId") int ownerId, @PathVariable("petId") int petId,
Map<String, Object> model) {
Map<String, Object> model) {
Optional<Owner> optionalOwner = owners.findById(ownerId);
Owner owner = optionalOwner.orElseThrow(() -> new IllegalArgumentException(
"Owner not found with id: " + ownerId + ". Please ensure the ID is correct "));