mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-29 18:55:49 +00:00
add null point-2
This commit is contained in:
parent
46c2356a51
commit
6376681ec3
2 changed files with 6 additions and 5 deletions
|
@ -57,8 +57,9 @@ class OwnerController {
|
|||
|
||||
@GetMapping("/owners/new")
|
||||
public String initCreationForm(Map<String, Object> model) {
|
||||
Owner owner = new Owner();
|
||||
model.put("owner", owner);
|
||||
//Owner owner = new Owner();
|
||||
Owner owner = null;
|
||||
model.put("owner", owner);
|
||||
return VIEWS_OWNER_CREATE_OR_UPDATE_FORM;
|
||||
}
|
||||
|
||||
|
|
|
@ -88,9 +88,9 @@ public class Pet extends NamedEntity {
|
|||
}
|
||||
|
||||
protected Set<Visit> getVisitsInternal() {
|
||||
// if (this.visits == null) {
|
||||
// this.visits = new HashSet<>();
|
||||
// }
|
||||
if (this.visits == null) {
|
||||
this.visits = new HashSet<>();
|
||||
}
|
||||
return this.visits;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue