Skip to content

Commit 0de4c39

Browse files
committed
Add null check
1 parent 6e2c8a4 commit 0de4c39

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dspace-api/src/main/java/org/dspace/access/status/DefaultAccessStatusHelper.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@ public String getEmbargoFromItem(Context context, Item item)
198198
.orElse(null);
199199
}
200200

201+
if (bitstream == null) {
202+
return null;
203+
}
204+
201205
embargoDate = this.retrieveLongestEmbargo(context, bitstream);
202206

203207
return embargoDate != null ? embargoDate.toString() : null;

0 commit comments

Comments
 (0)