Collections.EMPTY_LIST is immutable, possibly causing addBitstream to throw exception.

This commit is contained in:
Mark H. Wood
2021-09-08 13:35:46 -04:00
parent f3175d56d5
commit 35e280019f

View File

@@ -7,7 +7,7 @@
*/
package org.dspace.scripts;
import java.util.Collections;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.persistence.Column;
@@ -181,7 +181,7 @@ public class Process implements ReloadableEntity<Integer> {
*/
public List<Bitstream> getBitstreams() {
if (bitstreams == null) {
bitstreams = Collections.EMPTY_LIST;
bitstreams = new ArrayList<>();
}
return bitstreams;
}