From e303feb29d6ba7066a2dc911dacc3a990251c9be Mon Sep 17 00:00:00 2001 From: Koziolek Date: Wed, 14 Sep 2022 16:50:21 +0200 Subject: [PATCH] [MSHARED-1145] Remove e.getMessage() duplication when e is passed as object This closes #54 --- .../java/org/apache/maven/shared/invoker/DefaultInvoker.java | 2 +- .../apache/maven/shared/invoker/MavenCommandLineBuilder.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/maven/shared/invoker/DefaultInvoker.java b/src/main/java/org/apache/maven/shared/invoker/DefaultInvoker.java index b545466..7c9b93b 100644 --- a/src/main/java/org/apache/maven/shared/invoker/DefaultInvoker.java +++ b/src/main/java/org/apache/maven/shared/invoker/DefaultInvoker.java @@ -101,7 +101,7 @@ public InvocationResult execute( InvocationRequest request ) } catch ( CommandLineConfigurationException e ) { - throw new MavenInvocationException( "Error configuring command-line. Reason: " + e.getMessage(), e ); + throw new MavenInvocationException( "Error configuring command line", e ); } DefaultInvocationResult result = new DefaultInvocationResult(); diff --git a/src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java b/src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java index 7c7e985..b351d01 100644 --- a/src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java +++ b/src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java @@ -259,7 +259,7 @@ protected void setGoals( InvocationRequest request, Commandline cli ) throws Com } catch ( CommandLineException e ) { - throw new CommandLineConfigurationException( "Problem to set goals: " + e.getMessage(), e ); + throw new CommandLineConfigurationException( "Problem setting goals", e ); } } }