Merge pull request #10511 from jameswsullivan/oai-bitstream-null-check

Add bitstream null check to XOAI.java
This commit is contained in:
Tim Donohue
2025-03-24 09:57:45 -05:00
committed by GitHub

View File

@@ -112,7 +112,7 @@ public class XOAI {
try {
for (Bundle b : itemService.getBundles(item, "ORIGINAL")) {
for (Bitstream bs : b.getBitstreams()) {
if (!formats.contains(bs.getFormat(context).getMIMEType())) {
if (bs != null && !formats.contains(bs.getFormat(context).getMIMEType())) {
formats.add(bs.getFormat(context).getMIMEType());
}
}