[Task 71405] fixed the Process Files endpoints and added two tests for them

This commit is contained in:
Raf Ponsaerts
2020-06-16 09:46:01 +02:00
parent b32c461006
commit 31c87c2ba1
5 changed files with 56 additions and 15 deletions

View File

@@ -206,10 +206,12 @@ public class ProcessServiceImpl implements ProcessService {
if (type == null) {
return null;
} else {
for (Bitstream bitstream : allBitstreams) {
if (StringUtils.equals(bitstreamService.getMetadata(bitstream, Process.BITSTREAM_TYPE_METADATAFIELD),
type)) {
return bitstream;
if (allBitstreams != null) {
for (Bitstream bitstream : allBitstreams) {
if (StringUtils.equals(bitstreamService.getMetadata(bitstream,
Process.BITSTREAM_TYPE_METADATAFIELD), type)) {
return bitstream;
}
}
}
}