Author: rfscholte
Date: Sat Jun 13 22:12:06 2015
New Revision: 1685337

URL: http://svn.apache.org/r1685337
Log:
Same mistake twice today :( Keep code Java6 compatible

Modified:
    
maven/shared/trunk/maven-common-artifact-filters/src/main/java/org/apache/maven/shared/artifact/filter/collection/ArtifactTransitivityFilter.java
    
maven/shared/trunk/maven-common-artifact-filters/src/main/java/org/apache/maven/shared/artifact/filter/collection/Invoker.java

Modified: 
maven/shared/trunk/maven-common-artifact-filters/src/main/java/org/apache/maven/shared/artifact/filter/collection/ArtifactTransitivityFilter.java
URL: 
http://svn.apache.org/viewvc/maven/shared/trunk/maven-common-artifact-filters/src/main/java/org/apache/maven/shared/artifact/filter/collection/ArtifactTransitivityFilter.java?rev=1685337&r1=1685336&r2=1685337&view=diff
==============================================================================
--- 
maven/shared/trunk/maven-common-artifact-filters/src/main/java/org/apache/maven/shared/artifact/filter/collection/ArtifactTransitivityFilter.java
 (original)
+++ 
maven/shared/trunk/maven-common-artifact-filters/src/main/java/org/apache/maven/shared/artifact/filter/collection/ArtifactTransitivityFilter.java
 Sat Jun 13 22:12:06 2015
@@ -19,6 +19,7 @@ package org.apache.maven.shared.artifact
  * under the License.    
  */
 
+import java.lang.reflect.InvocationTargetException;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
@@ -97,7 +98,17 @@ public class ArtifactTransitivityFilter
                         transitiveArtifacts.add( 
mavenArtifact.getDependencyConflictId() );
                     }
                 }
-                catch ( ReflectiveOperationException e )
+                catch ( IllegalAccessException e )
+                {
+                    // don't want to pollute method signature with 
ReflectionExceptions
+                    throw new RuntimeException( e.getMessage(), e );
+                }
+                catch ( InvocationTargetException e )
+                {
+                    // don't want to pollute method signature with 
ReflectionExceptions
+                    throw new RuntimeException( e.getMessage(), e );
+                }
+                catch ( NoSuchMethodException e )
                 {
                     // don't want to pollute method signature with 
ReflectionExceptions
                     throw new RuntimeException( e.getMessage(), e );
@@ -122,7 +133,17 @@ public class ArtifactTransitivityFilter
                         transitiveArtifacts.add( 
mavenArtifact.getDependencyConflictId() );
                     }
                 }
-                catch ( ReflectiveOperationException e )
+                catch ( IllegalAccessException e )
+                {
+                    // don't want to pollute method signature with 
ReflectionExceptions
+                    throw new RuntimeException( e.getMessage(), e );
+                }
+                catch ( InvocationTargetException e )
+                {
+                    // don't want to pollute method signature with 
ReflectionExceptions
+                    throw new RuntimeException( e.getMessage(), e );
+                }
+                catch ( NoSuchMethodException e )
                 {
                     // don't want to pollute method signature with 
ReflectionExceptions
                     throw new RuntimeException( e.getMessage(), e );

Modified: 
maven/shared/trunk/maven-common-artifact-filters/src/main/java/org/apache/maven/shared/artifact/filter/collection/Invoker.java
URL: 
http://svn.apache.org/viewvc/maven/shared/trunk/maven-common-artifact-filters/src/main/java/org/apache/maven/shared/artifact/filter/collection/Invoker.java?rev=1685337&r1=1685336&r2=1685337&view=diff
==============================================================================
--- 
maven/shared/trunk/maven-common-artifact-filters/src/main/java/org/apache/maven/shared/artifact/filter/collection/Invoker.java
 (original)
+++ 
maven/shared/trunk/maven-common-artifact-filters/src/main/java/org/apache/maven/shared/artifact/filter/collection/Invoker.java
 Sat Jun 13 22:12:06 2015
@@ -1,5 +1,7 @@
 package org.apache.maven.shared.artifact.filter.collection;
 
+import java.lang.reflect.InvocationTargetException;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -31,21 +33,21 @@ final class Invoker
     }
 
     public static Object invoke( Object object, String method )
-        throws ReflectiveOperationException
+        throws IllegalAccessException, InvocationTargetException, 
NoSuchMethodException
     {
         return invoke( object.getClass(), object, method );
     }
 
     public static Object invoke( Class<?> objectClazz, Object object, String 
method )
-                    throws ReflectiveOperationException
+        throws IllegalAccessException, InvocationTargetException, 
NoSuchMethodException
     {
-            return objectClazz.getMethod( method ).invoke( object );
+        return objectClazz.getMethod( method ).invoke( object );
     }
 
     public static Object invoke( Object object, String method, Class<?> clazz, 
Object arg )
-                    throws ReflectiveOperationException
+        throws IllegalAccessException, InvocationTargetException, 
NoSuchMethodException
     {
-            final Class<?> objectClazz = object.getClass();
-            return objectClazz.getMethod( method, clazz ).invoke( object, arg 
);
+        final Class<?> objectClazz = object.getClass();
+        return objectClazz.getMethod( method, clazz ).invoke( object, arg );
     }
 }


Reply via email to