Skip to content

Commit 59f10e1

Browse files
fix: only add entity types which are not null AND not empty
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent c23df4f commit 59f10e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/edu/kit/datamanager/ro_crate/entities/AbstractEntity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ public T addType(String type) {
443443
if (this.types == null) {
444444
this.types = new HashSet<>();
445445
}
446-
if (type != null || !type.isEmpty()) {
446+
if (type != null && !type.isEmpty()) {
447447
this.types.add(type);
448448
}
449449
return self();

0 commit comments

Comments
 (0)