mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
Merged 5.1.N (5.1.2) to 5.2.N (5.2.1)
125591 mward: ACE-5052: close FileInputStream git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@125773 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -3,6 +3,7 @@ package org.alfresco.filesys.repo;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.channels.FileChannel;
|
||||
import java.util.List;
|
||||
|
||||
@@ -286,10 +287,11 @@ public class CommandExecutorImpl implements CommandExecutor
|
||||
* find anything awry.
|
||||
* There are reported Windows JVM bugs such as 4715154 ...
|
||||
*/
|
||||
FileOutputStream fos = new FileOutputStream(file);
|
||||
FileChannel outChan = null;
|
||||
try
|
||||
{
|
||||
outChan = new FileOutputStream(file).getChannel();
|
||||
outChan = fos.getChannel();
|
||||
outChan.truncate(0);
|
||||
}
|
||||
catch (IOException e)
|
||||
@@ -306,6 +308,7 @@ public class CommandExecutorImpl implements CommandExecutor
|
||||
}
|
||||
catch(IOException e){}
|
||||
}
|
||||
fos.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user