Project

General

Profile

« Previous | Next » 

Revision 6a7ff989

Added by Andreas Müller almost 6 years ago

cleanup

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/AnnotatableEntity.java
52 52
    @OneToMany(fetch=FetchType.LAZY, orphanRemoval=true)
53 53
	@Cascade({CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE})
54 54
	@Merge(MergeMode.ADD_CLONE)
55
	protected Set<Marker> markers = new HashSet<Marker>();
55
	protected Set<Marker> markers = new HashSet<>();
56 56

  
57 57
	@XmlElementWrapper(name = "Annotations", nillable = true)
58 58
	@XmlElement(name = "Annotation")
59 59
    @OneToMany(fetch=FetchType.LAZY, orphanRemoval=true)
60 60
    @Cascade({CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE})
61 61
	@Merge(MergeMode.ADD_CLONE)
62
	protected Set<Annotation> annotations = new HashSet<Annotation>();
62
	protected Set<Annotation> annotations = new HashSet<>();
63 63

  
64 64
	protected AnnotatableEntity() {
65 65
		super();
......
131 131
		AnnotatableEntity result = (AnnotatableEntity)super.clone();
132 132

  
133 133
		//Annotations
134
		result.annotations = new HashSet<Annotation>();
134
		result.annotations = new HashSet<>();
135 135
		for (Annotation annotation : getAnnotations()){
136 136
			Annotation newAnnotation = (Annotation)annotation.clone();
137 137
			result.addAnnotation(newAnnotation);
138 138
		}
139 139

  
140 140
		//Markers
141
		result.markers = new HashSet<Marker>();
141
		result.markers = new HashSet<>();
142 142
		for (Marker marker : getMarkers()){
143 143
			Marker newMarker = (Marker)marker.clone();
144 144
			result.addMarker(newMarker);

Also available in: Unified diff