Skip to content

Commit 99de5e0

Browse files
committed
fix null handling
1 parent db40f7b commit 99de5e0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/edu/harvard/iq/dataverse/DatasetAuthor.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
import java.util.Comparator;
1010

11+
import org.apache.commons.lang3.StringUtils;
12+
1113
/**
1214
*
1315
* @author skraffmiller
@@ -81,8 +83,8 @@ public void setIdValue(String idValue) {
8183
}
8284

8385
public boolean isEmpty() {
84-
return ( (affiliation==null || affiliation.getValue().trim().equals(""))
85-
&& (name==null || name.getValue().trim().equals(""))
86+
return ( (affiliation==null || StringUtils.isBlank(affiliation.getValue()))
87+
&& (name==null || StringUtils.isBlank(name.getValue()))
8688
);
8789
}
8890

0 commit comments

Comments
 (0)