Project

General

Profile

Revision cf43c570

IDcf43c57034f832320ed5a1aa4a8a0b4cc1f5af30
Parent e0a36187
Child 0a5c3377

Added by Andreas Kohlbecker over 3 years ago

ref #6258 satisfying @NonNull annotations for collection properties

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/name/Registration.java
8 8
*/
9 9
package eu.etaxonomy.cdm.model.name;
10 10

  
11
import java.util.HashSet;
11 12
import java.util.Set;
12 13

  
13 14
import javax.persistence.Basic;
......
121 122
    @ManyToMany(fetch = FetchType.LAZY)
122 123
    @Cascade({CascadeType.SAVE_UPDATE,CascadeType.MERGE})
123 124
    @NotNull
124
    private Set<TypeDesignationBase> typeDesignations;
125
    private Set<TypeDesignationBase> typeDesignations = new HashSet<>();
125 126

  
126 127
    @XmlElementWrapper(name = "BlockingRegistrations")
127 128
    @XmlElement(name = "BlockedBy")
......
130 131
    @ManyToMany(fetch = FetchType.LAZY)
131 132
    @Cascade({CascadeType.SAVE_UPDATE,CascadeType.MERGE})
132 133
    @NotNull
133
    private Set<Registration> blockedBy;
134
    private Set<Registration> blockedBy = new HashSet<>();
134 135

  
135 136
    @XmlElement (name = "Submitter")
136 137
    @XmlIDREF

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)