maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From khmarba...@apache.org
Subject [maven-verifier] 01/01: Code improvements.
Date Sun, 04 Mar 2018 14:16:15 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit 9e62e0904c7db21445a3dff484166c25063174ba
Author: Karl Heinz Marbaise <khmarbaise@apache.org>
AuthorDate: Sun Mar 4 13:56:47 2018 +0100

    Code improvements.
---
 src/main/java/org/apache/maven/it/Embedded3xLauncher.java     | 8 ++++----
 src/main/java/org/apache/maven/it/LauncherException.java      | 6 ++++++
 src/main/java/org/apache/maven/it/VerificationException.java  | 5 +++++
 src/main/java/org/apache/maven/it/util/ResourceExtractor.java | 2 ++
 4 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/apache/maven/it/Embedded3xLauncher.java b/src/main/java/org/apache/maven/it/Embedded3xLauncher.java
index 67c006a..dae440d 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", null );
-            Object classWorld = getWorld.invoke( launcher, null );
+            Method getWorld = launcherClass.getMethod( "getWorld", (Class<?>) null
);
+            Object classWorld = getWorld.invoke( launcher, (Class<?>) null );
 
-            Method getMainClass = launcherClass.getMethod( "getMainClass", null );
-            Class<?> cliClass = (Class<?>) getMainClass.invoke( launcher, null
);
+            Method getMainClass = launcherClass.getMethod( "getMainClass", (Class<?>)
null );
+            Class<?> cliClass = (Class<?>) getMainClass.invoke( launcher, (Class<?>)
null );
 
             Constructor<?> newMavenCli = cliClass.getConstructor( new Class[] { classWorld.getClass()
} );
             Object mavenCli = newMavenCli.newInstance( new Object[] { classWorld } );
diff --git a/src/main/java/org/apache/maven/it/LauncherException.java b/src/main/java/org/apache/maven/it/LauncherException.java
index 6b3a19d..cfc4a56 100644
--- a/src/main/java/org/apache/maven/it/LauncherException.java
+++ b/src/main/java/org/apache/maven/it/LauncherException.java
@@ -31,6 +31,12 @@ class LauncherException
     private static final long serialVersionUID = 1L;
 
     LauncherException( String message )
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 1L;
+
+    public LauncherException( String message )
     {
         super( message );
     }
diff --git a/src/main/java/org/apache/maven/it/VerificationException.java b/src/main/java/org/apache/maven/it/VerificationException.java
index cd81448..e014488 100644
--- a/src/main/java/org/apache/maven/it/VerificationException.java
+++ b/src/main/java/org/apache/maven/it/VerificationException.java
@@ -26,6 +26,11 @@ package org.apache.maven.it;
 public class VerificationException
     extends Exception
 {
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 1L;
+
     public VerificationException()
     {
     }
diff --git a/src/main/java/org/apache/maven/it/util/ResourceExtractor.java b/src/main/java/org/apache/maven/it/util/ResourceExtractor.java
index 5ea6330..d2913b7 100644
--- a/src/main/java/org/apache/maven/it/util/ResourceExtractor.java
+++ b/src/main/java/org/apache/maven/it/util/ResourceExtractor.java
@@ -141,6 +141,7 @@ public class ResourceExtractor
                         finally
                         {
                             IOUtil.close( fos );
+                            z.close();
                         }
                     }
                 }
@@ -156,6 +157,7 @@ public class ResourceExtractor
             finally
             {
                 IOUtil.close( fos );
+                z.close();
             }
         }
     }

-- 
To stop receiving notification emails like this one, please contact
khmarbaise@apache.org.

Mime
View raw message