]> source.dussan.org Git - archiva.git/commitdiff
simplify code
authorolivier lamy <olamy@apache.org>
Mon, 26 Sep 2016 22:35:10 +0000 (08:35 +1000)
committerolivier lamy <olamy@apache.org>
Mon, 26 Sep 2016 22:35:38 +0000 (08:35 +1000)
Signed-off-by: olivier lamy <olamy@apache.org>
archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java

index 8bd5d4d5db29af09ce86d508b1577eb8a46115ff..864d8069041381c3b8c2ad369b26a880b88be116 100644 (file)
@@ -1092,8 +1092,7 @@ public class DefaultRepositoryProxyConnectors
         throws ProxyException
     {
 
-        // TODO file lock library
-        Lock lock = null;
+        Lock lock;
         try
         {
             lock = fileLockManager.writeFileLock( target );
@@ -1131,11 +1130,7 @@ public class DefaultRepositoryProxyConnectors
                 }
             }
         }
-        catch ( FileLockException e )
-        {
-            throw new ProxyException( e.getMessage(), e );
-        }
-        catch ( FileLockTimeoutException e )
+        catch ( FileLockException | FileLockTimeoutException e )
         {
             throw new ProxyException( e.getMessage(), e );
         }