ignore ClosedChannelException

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1551831 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2013-12-18 04:04:38 +00:00
parent f948d2044b
commit 3e6c7ea831
1 changed files with 7 additions and 1 deletions

View File

@ -28,6 +28,7 @@ import java.io.File;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;
import java.io.RandomAccessFile; import java.io.RandomAccessFile;
import java.nio.channels.ClosedChannelException;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentMap;
@ -256,6 +257,11 @@ public class DefaultFileLockManager
lockFiles.remove( lock.getFile() ); lockFiles.remove( lock.getFile() );
lock.close(); lock.close();
} }
catch ( ClosedChannelException e )
{
// skip this one
log.debug( "ignore ClosedChannelException: {}", e.getMessage() );
}
catch ( IOException e ) catch ( IOException e )
{ {
throw new FileLockException( e.getMessage(), e ); throw new FileLockException( e.getMessage(), e );