onami-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From as...@apache.org
Subject svn commit: r1610127 - in /onami/trunk/autobind/aop/src/main/java/org/apache/onami/autobind/aop: GuiceMethodInterceptor.java feature/InterceptorFeature.java
Date Sun, 13 Jul 2014 06:49:52 GMT
Author: ash2k
Date: Sun Jul 13 06:49:52 2014
New Revision: 1610127

URL: http://svn.apache.org/r1610127
Log:
Idea inspection: redundant vararg array creation

No functional changes

Modified:
    onami/trunk/autobind/aop/src/main/java/org/apache/onami/autobind/aop/GuiceMethodInterceptor.java
    onami/trunk/autobind/aop/src/main/java/org/apache/onami/autobind/aop/feature/InterceptorFeature.java

Modified: onami/trunk/autobind/aop/src/main/java/org/apache/onami/autobind/aop/GuiceMethodInterceptor.java
URL: http://svn.apache.org/viewvc/onami/trunk/autobind/aop/src/main/java/org/apache/onami/autobind/aop/GuiceMethodInterceptor.java?rev=1610127&r1=1610126&r2=1610127&view=diff
==============================================================================
--- onami/trunk/autobind/aop/src/main/java/org/apache/onami/autobind/aop/GuiceMethodInterceptor.java
(original)
+++ onami/trunk/autobind/aop/src/main/java/org/apache/onami/autobind/aop/GuiceMethodInterceptor.java
Sun Jul 13 06:49:52 2014
@@ -42,9 +42,9 @@ public abstract class GuiceMethodInterce
         try
         {
             CLASS_MATCHER_TYPE =
-                GuiceMethodInterceptor.class.getMethod( "getClassMatcher", new Class<?>[0]
).getGenericReturnType();
+                GuiceMethodInterceptor.class.getMethod( "getClassMatcher" ).getGenericReturnType();
             METHOD_MATCHER_TYPE =
-                GuiceMethodInterceptor.class.getMethod( "getMethodMatcher", new Class<?>[0]
).getGenericReturnType();
+                GuiceMethodInterceptor.class.getMethod( "getMethodMatcher" ).getGenericReturnType();
         }
         catch ( Exception e )
         {

Modified: onami/trunk/autobind/aop/src/main/java/org/apache/onami/autobind/aop/feature/InterceptorFeature.java
URL: http://svn.apache.org/viewvc/onami/trunk/autobind/aop/src/main/java/org/apache/onami/autobind/aop/feature/InterceptorFeature.java?rev=1610127&r1=1610126&r2=1610127&view=diff
==============================================================================
--- onami/trunk/autobind/aop/src/main/java/org/apache/onami/autobind/aop/feature/InterceptorFeature.java
(original)
+++ onami/trunk/autobind/aop/src/main/java/org/apache/onami/autobind/aop/feature/InterceptorFeature.java
Sun Jul 13 06:49:52 2014
@@ -81,8 +81,7 @@ public class InterceptorFeature extends 
 					Method method = methods.get(ClassMatcher.class);
 					Type genericReturnType = method.getGenericReturnType();
 					if (GuiceMethodInterceptor.CLASS_MATCHER_TYPE.equals(genericReturnType)) {
-						classMatcher = (Matcher<? super Class<?>>) method.invoke(
-							possibleInterceptor, new Object[0]);
+						classMatcher = (Matcher<? super Class<?>>) method.invoke( possibleInterceptor
);
 					} else {
 						_logger.log(Level.WARNING,
 							"Return Type of the annotated @ClassMatcher-Method, does not return: "
@@ -95,8 +94,7 @@ public class InterceptorFeature extends 
 					Method method = methods.get(MethodMatcher.class);
 					Type genericReturnType = method.getGenericReturnType();
 					if (GuiceMethodInterceptor.METHOD_MATCHER_TYPE.equals(genericReturnType)) {
-						methodMatcher = (Matcher<? super Method>) method.invoke(
-							possibleInterceptor, new Object[0]);
+						methodMatcher = (Matcher<? super Method>) method.invoke( possibleInterceptor
);
 					} else {
 						_logger.log(Level.WARNING,
 							"Return Type of the annotated @MethodMatcher-Method, does not return: "



Mime
View raw message