]> source.dussan.org Git - archiva.git/commitdiff
ignore ClosedChannelException
authorOlivier Lamy <olamy@apache.org>
Wed, 18 Dec 2013 04:04:38 +0000 (04:04 +0000)
committerOlivier Lamy <olamy@apache.org>
Wed, 18 Dec 2013 04:04:38 +0000 (04:04 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1551831 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java

index 09008e2a72d5141e8811265f12d5803755c85955..4c4aaab7abe0c939c883e401b812056e12b4e3c8 100644 (file)
@@ -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 );