commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcar...@apache.org
Subject svn commit: r320805 - in /jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy: ProxyUtils.java factory/javassist/JavassistProxyFactory.java
Date Thu, 13 Oct 2005 17:01:30 GMT
Author: jcarman
Date: Thu Oct 13 10:01:27 2005
New Revision: 320805

URL: http://svn.apache.org/viewcvs?rev=320805&view=rev
Log:
Removed unnecessary helper methods.

Modified:
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyUtils.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistProxyFactory.java

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyUtils.java?rev=320805&r1=320804&r2=320805&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyUtils.java
(original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyUtils.java
Thu Oct 13 10:01:27 2005
@@ -77,16 +77,6 @@
         return ( Class[] ) interfaces.toArray( new Class[interfaces.size()] );
     }
 
-    public static Class[] toClassArray( Class c0 )
-    {
-        return new Class[] { c0 };
-    }
-
-    public static Object[] toObjectArray( Object o0 )
-    {
-        return new Object[] { o0 };
-    }
-
     private static List getAllInterfacesImpl( Class cls )
     {
         if( cls == null )

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistProxyFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistProxyFactory.java?rev=320805&r1=320804&r2=320805&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistProxyFactory.java
(original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistProxyFactory.java
Thu Oct 13 10:01:27 2005
@@ -22,7 +22,6 @@
 import javassist.CtMethod;
 import org.aopalliance.intercept.MethodInterceptor;
 import org.apache.commons.proxy.ObjectProvider;
-import org.apache.commons.proxy.ProxyUtils;
 import org.apache.commons.proxy.exception.ProxyFactoryException;
 import org.apache.commons.proxy.factory.util.AbstractProxyClassGenerator;
 import org.apache.commons.proxy.factory.util.AbstractSubclassingProxyFactory;
@@ -60,8 +59,8 @@
         try
         {
             final Class clazz = delegatingProxyClassCache.getProxyClass( classLoader, proxyClasses
);
-            return clazz.getConstructor( ProxyUtils.toClassArray( ObjectProvider.class )
)
-                    .newInstance( ProxyUtils.toObjectArray( targetProvider ) );
+            return clazz.getConstructor( new Class[]{ ObjectProvider.class } )
+                    .newInstance( new Object[]{ targetProvider } );
         }
         catch( Exception e )
         {



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message