From 85be2b77aff90ec03e1eec2ab8ed562763c7caf5 Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Tue, 27 Sep 2016 08:35:10 +1000 Subject: [PATCH] simplify code Signed-off-by: olivier lamy --- .../archiva/proxy/DefaultRepositoryProxyConnectors.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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 ); } -- 2.39.5