mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-18 07:23:08 +00:00
Explicitly close InputStreams to avoid large numbers of open files awaiting GC.
(Ran out of file handles.) git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5932 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -438,11 +438,15 @@ public abstract class AbstractMETSDisseminator
|
||||
zip.putNextEntry(ze);
|
||||
if (auth)
|
||||
{
|
||||
Utils.copy(bitstreams[k].retrieve(), zip);
|
||||
InputStream input = bitstreams[k].retrieve();
|
||||
Utils.copy(input, zip);
|
||||
input.close();
|
||||
}
|
||||
else
|
||||
{
|
||||
log.warn("Adding zero-length file for Bitstream, SID=" + String.valueOf(bitstreams[k].getSequenceID()) + ", not authorized for READ.");
|
||||
log.warn("Adding zero-length file for Bitstream, SID="
|
||||
+ String.valueOf(bitstreams[k].getSequenceID())
|
||||
+ ", not authorized for READ.");
|
||||
}
|
||||
zip.closeEntry();
|
||||
}
|
||||
|
Reference in New Issue
Block a user