Skip to content

Commit 89bc57b

Browse files
authored
Merge pull request #29 from TeamCodeStream/feature/more-stack-frames
Add another layer to this error for clickable stack
2 parents 90b5613 + 993837e commit 89bc57b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/java/org/springframework/samples/petclinic/owner/PetController.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ public Collection<PetType> populatePetTypes() {
6060
public Owner findOwner(@PathVariable("ownerId") int ownerId) {
6161

6262
Owner owner = this.owners.findById(ownerId);
63-
if (owner == null) {
64-
throw new IllegalArgumentException("Owner ID not found: " + ownerId);
65-
}
63+
ControllerValidation.ValidateNotNull(owner, "Owner");
6664
return owner;
6765
}
6866

0 commit comments

Comments
 (0)