From: olivier lamy Date: Mon, 26 Sep 2016 22:35:10 +0000 (+1000) Subject: simplify code X-Git-Tag: without_jdo~18 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=85be2b77aff90ec03e1eec2ab8ed562763c7caf5;p=archiva.git simplify code Signed-off-by: olivier lamy --- diff --git a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java index 8bd5d4d5d..864d80690 100644 --- a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java +++ b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java @@ -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 ); }