mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
ALF-4860 - Content stream not being closed when retrieving log file from transfer target
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22681 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -72,10 +72,14 @@ public class ReportCommandProcessor implements CommandProcessor
|
||||
try
|
||||
{
|
||||
OutputStream out = resp.getOutputStream();
|
||||
try
|
||||
{
|
||||
resp.setContentType("text/xml");
|
||||
resp.setContentEncoding("utf-8");
|
||||
|
||||
BufferedInputStream br = new BufferedInputStream(receiver.getProgressMonitor().getLogInputStream(transferId));
|
||||
try
|
||||
{
|
||||
byte[] buffer = new byte[1000];
|
||||
int i = br.read(buffer);
|
||||
while(i > 0)
|
||||
@@ -83,8 +87,17 @@ public class ReportCommandProcessor implements CommandProcessor
|
||||
out.write(buffer, 0, i);
|
||||
i = br.read(buffer);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
br.close();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
out.flush();
|
||||
out.close();
|
||||
}
|
||||
|
||||
return Status.STATUS_OK;
|
||||
}
|
||||
|
Reference in New Issue
Block a user