From f8f263321ab70119eebb16b426e3a38833fa0e42 Mon Sep 17 00:00:00 2001 From: Koziolek Date: Wed, 14 Sep 2022 22:05:57 +0200 Subject: [PATCH] [MSHARED-1143] Remove e.getMessage() duplication when e is passed as object This closes #17 --- .../shared/io/download/DefaultDownloadManager.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/apache/maven/shared/io/download/DefaultDownloadManager.java b/src/main/java/org/apache/maven/shared/io/download/DefaultDownloadManager.java index a349599..887f204 100644 --- a/src/main/java/org/apache/maven/shared/io/download/DefaultDownloadManager.java +++ b/src/main/java/org/apache/maven/shared/io/download/DefaultDownloadManager.java @@ -113,7 +113,7 @@ public File download( String url, List transferListeners, Mess } catch ( UnsupportedProtocolException e ) { - throw new DownloadFailedException( url, "Download failed.", e ); + throw new DownloadFailedException( url, "Download failed", e ); } messageHolder.addMessage( "Using wagon: " + wagon + " to download: " + url ); @@ -155,11 +155,11 @@ public File download( String url, List transferListeners, Mess } catch ( ConnectionException e ) { - throw new DownloadFailedException( url, "Download failed.", e ); + throw new DownloadFailedException( url, "Download failed", e ); } catch ( AuthenticationException e ) { - throw new DownloadFailedException( url, "Download failed.", e ); + throw new DownloadFailedException( url, "Download failed", e ); } messageHolder.addMessage( "Getting: " + remotePath ); @@ -175,15 +175,15 @@ public File download( String url, List transferListeners, Mess } catch ( TransferFailedException e ) { - throw new DownloadFailedException( url, "Download failed.", e ); + throw new DownloadFailedException( url, "Download failed", e ); } catch ( ResourceDoesNotExistException e ) { - throw new DownloadFailedException( url, "Download failed.", e ); + throw new DownloadFailedException( url, "Download failed", e ); } catch ( AuthorizationException e ) { - throw new DownloadFailedException( url, "Download failed.", e ); + throw new DownloadFailedException( url, "Download failed", e ); } finally {