commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcar...@apache.org
Subject svn commit: r1509703 - /commons/proper/proxy/branches/version-2.0-work/core/src/main/java/org/apache/commons/proxy2/impl/AbstractProxyFactory.java
Date Fri, 02 Aug 2013 13:38:57 GMT
Author: jcarman
Date: Fri Aug  2 13:38:56 2013
New Revision: 1509703

URL: http://svn.apache.org/r1509703
Log:
Fixing Sonar issues.

Modified:
    commons/proper/proxy/branches/version-2.0-work/core/src/main/java/org/apache/commons/proxy2/impl/AbstractProxyFactory.java

Modified: commons/proper/proxy/branches/version-2.0-work/core/src/main/java/org/apache/commons/proxy2/impl/AbstractProxyFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/branches/version-2.0-work/core/src/main/java/org/apache/commons/proxy2/impl/AbstractProxyFactory.java?rev=1509703&r1=1509702&r2=1509703&view=diff
==============================================================================
--- commons/proper/proxy/branches/version-2.0-work/core/src/main/java/org/apache/commons/proxy2/impl/AbstractProxyFactory.java
(original)
+++ commons/proper/proxy/branches/version-2.0-work/core/src/main/java/org/apache/commons/proxy2/impl/AbstractProxyFactory.java
Fri Aug  2 13:38:56 2013
@@ -57,9 +57,7 @@ public abstract class AbstractProxyFacto
      */
     public <T> T createDelegatorProxy( ObjectProvider<?> delegateProvider, Class<?>...
proxyClasses )
     {
-        @SuppressWarnings("unchecked")
-        final T result = (T) createDelegatorProxy(Thread.currentThread().getContextClassLoader(),
delegateProvider, proxyClasses);
-        return result;
+        return createDelegatorProxy(Thread.currentThread().getContextClassLoader(), delegateProvider,
proxyClasses);
     }
 
     /**
@@ -75,10 +73,8 @@ public abstract class AbstractProxyFacto
     public <T> T createInterceptorProxy( Object target, Interceptor interceptor,
                                           Class<?>... proxyClasses )
     {
-        @SuppressWarnings("unchecked")
-        final T result = (T) createInterceptorProxy(Thread.currentThread().getContextClassLoader(),
target, interceptor,
+        return createInterceptorProxy(Thread.currentThread().getContextClassLoader(), target,
interceptor,
                                       proxyClasses);
-        return result;
     }
 
     /**
@@ -91,10 +87,8 @@ public abstract class AbstractProxyFacto
      */
     public <T> T createInvokerProxy( Invoker invoker, Class<?>... proxyClasses
)
     {
-        @SuppressWarnings("unchecked")
-        final T result = (T) createInvokerProxy(Thread.currentThread().getContextClassLoader(),
invoker,
+        return createInvokerProxy(Thread.currentThread().getContextClassLoader(), invoker,
                                   proxyClasses);
-        return result;
     }
 
 }



Mime
View raw message