Skip to content

Commit 3d40726

Browse files
Review comment fixes
1 parent 04412ca commit 3d40726

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

sormas-api/src/main/java/de/symeda/sormas/api/environment/EnvironmentDto.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,12 @@ public void setVectorType(VectorType vectorType) {
266266
}
267267

268268
public void addEventReference(EventReferenceDto eventReferenceDto) {
269-
if (eventReferenceDto != null && !eventReferenceDtos.contains(eventReferenceDto)) {
270-
this.eventReferenceDtos.add(eventReferenceDto);
269+
if (eventReferenceDto != null) {
270+
if (!eventReferenceDtos.contains(eventReferenceDto)) {
271+
this.eventReferenceDtos.add(eventReferenceDto);
272+
}
271273
} else {
272-
throw new IllegalArgumentException("event UUID " + eventReferenceDto.getUuid() + " is already added");
274+
throw new IllegalArgumentException("eventReferenceDto is " + eventReferenceDto);
273275
}
274276
}
275277

0 commit comments

Comments
 (0)