You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2020/04/03 16:12:13 UTC

[maven-verifier] 01/01: [MSHARED-872] Embedded3xLauncher cannot be initialized

This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch MSHARED-872
in repository https://gitbox.apache.org/repos/asf/maven-verifier.git

commit ab29a9d823d09b8988b094e6cfb8d2909609fea8
Author: rfscholte <rf...@apache.org>
AuthorDate: Fri Apr 3 18:11:59 2020 +0200

    [MSHARED-872] Embedded3xLauncher cannot be initialized
---
 src/main/java/org/apache/maven/it/Embedded3xLauncher.java | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/main/java/org/apache/maven/it/Embedded3xLauncher.java b/src/main/java/org/apache/maven/it/Embedded3xLauncher.java
index 76e2c6e..55b69b3 100644
--- a/src/main/java/org/apache/maven/it/Embedded3xLauncher.java
+++ b/src/main/java/org/apache/maven/it/Embedded3xLauncher.java
@@ -93,11 +93,11 @@ class Embedded3xLauncher
 
             configure.invoke( launcher, new Object[] { new FileInputStream( config ) } );
 
-            Method getWorld = launcherClass.getMethod( "getWorld", (Class<?>) null );
-            Object classWorld = getWorld.invoke( launcher, (Class<?>) null );
+            Method getWorld = launcherClass.getMethod( "getWorld" );
+            Object classWorld = getWorld.invoke( launcher );
 
-            Method getMainClass = launcherClass.getMethod( "getMainClass", (Class<?>) null );
-            Class<?> cliClass = (Class<?>) getMainClass.invoke( launcher, (Class<?>) null );
+            Method getMainClass = launcherClass.getMethod( "getMainClass" );
+            Class<?> cliClass = (Class<?>) getMainClass.invoke( launcher );
 
             Constructor<?> newMavenCli = cliClass.getConstructor( new Class[] { classWorld.getClass() } );
             Object mavenCli = newMavenCli.newInstance( new Object[] { classWorld } );
@@ -109,7 +109,7 @@ class Embedded3xLauncher
         }
         catch ( ReflectiveOperationException | IOException e )
         {
-            throw new LauncherException( "Invalid Maven home directory " + mavenHome, e );
+            throw new LauncherException( "Failed to initialize Laucher", e );
         }
         finally
         {