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, 29 Apr 2018 19:22:32 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 cc4d1cb0d20ba9c7e019c47790eec63106775424
Author: Karl Heinz Marbaise <khmarbaise@apache.org>
AuthorDate: Sun Mar 4 13:56:47 2018 +0100

    Code improvements.
---
 .../java/org/apache/maven/shared/verifier/Embedded3xLauncher.java | 8 ++++----
 .../org/apache/maven/shared/verifier/VerificationException.java   | 5 +++++
 .../org/apache/maven/shared/verifier/util/ResourceExtractor.java  | 2 ++
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/apache/maven/shared/verifier/Embedded3xLauncher.java b/src/main/java/org/apache/maven/shared/verifier/Embedded3xLauncher.java
index 1e6548d..699be36 100644
--- a/src/main/java/org/apache/maven/shared/verifier/Embedded3xLauncher.java
+++ b/src/main/java/org/apache/maven/shared/verifier/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/shared/verifier/VerificationException.java b/src/main/java/org/apache/maven/shared/verifier/VerificationException.java
index e17121d..016eded 100644
--- a/src/main/java/org/apache/maven/shared/verifier/VerificationException.java
+++ b/src/main/java/org/apache/maven/shared/verifier/VerificationException.java
@@ -26,6 +26,11 @@ package org.apache.maven.shared.verifier;
 public class VerificationException
     extends Exception
 {
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 1L;
+
     public VerificationException()
     {
     }
diff --git a/src/main/java/org/apache/maven/shared/verifier/util/ResourceExtractor.java b/src/main/java/org/apache/maven/shared/verifier/util/ResourceExtractor.java
index 57aee6b..c5431e4 100644
--- a/src/main/java/org/apache/maven/shared/verifier/util/ResourceExtractor.java
+++ b/src/main/java/org/apache/maven/shared/verifier/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