From: Olivier Lamy Date: Wed, 18 Dec 2013 04:04:38 +0000 (+0000) Subject: ignore ClosedChannelException X-Git-Tag: archiva-2.0.0-RC1~85 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3e6c7ea8316c42f8618fe4e0983ae3806cc0b8d0;p=archiva.git ignore ClosedChannelException git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1551831 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java b/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java index 09008e2a7..4c4aaab7a 100644 --- a/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java +++ b/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java @@ -28,6 +28,7 @@ import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.RandomAccessFile; +import java.nio.channels.ClosedChannelException; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; @@ -35,7 +36,7 @@ import java.util.concurrent.ConcurrentMap; * @author Olivier Lamy * @since 2.0.0 */ -@Service( "fileLockManager#default" ) +@Service("fileLockManager#default") public class DefaultFileLockManager implements FileLockManager { @@ -256,6 +257,11 @@ public class DefaultFileLockManager lockFiles.remove( lock.getFile() ); lock.close(); } + catch ( ClosedChannelException e ) + { + // skip this one + log.debug( "ignore ClosedChannelException: {}", e.getMessage() ); + } catch ( IOException e ) { throw new FileLockException( e.getMessage(), e );