We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 90b5613 + 993837e commit 89bc57bCopy full SHA for 89bc57b
src/main/java/org/springframework/samples/petclinic/owner/PetController.java
@@ -60,9 +60,7 @@ public Collection<PetType> populatePetTypes() {
60
public Owner findOwner(@PathVariable("ownerId") int ownerId) {
61
62
Owner owner = this.owners.findById(ownerId);
63
- if (owner == null) {
64
- throw new IllegalArgumentException("Owner ID not found: " + ownerId);
65
- }
+ ControllerValidation.ValidateNotNull(owner, "Owner");
66
return owner;
67
}
68
0 commit comments