commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcar...@apache.org
Subject svn commit: r631654 [3/4] - in /commons/proper/proxy/trunk: ./ src/main/java/org/apache/commons/proxy/ src/main/java/org/apache/commons/proxy/exception/ src/main/java/org/apache/commons/proxy/factory/cglib/ src/main/java/org/apache/commons/proxy/factor...
Date Wed, 27 Feb 2008 17:14:48 GMT
Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/ConstantProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/ConstantProvider.java?rev=631654&r1=631653&r2=631654&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/ConstantProvider.java (original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/ConstantProvider.java Wed Feb 27 09:14:32 2008
@@ -19,32 +19,34 @@
 
 import org.apache.commons.proxy.ObjectProvider;
 
+import java.io.Serializable;
+
 /**
  * Always returns the same object.
  *
  * @author James Carman
  * @since 1.0
  */
-public class ConstantProvider implements ObjectProvider
+public class ConstantProvider implements ObjectProvider, Serializable
 {
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // Fields
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     private final Object constant;
 
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // Constructors
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     public ConstantProvider( Object constant )
     {
         this.constant = constant;
     }
 
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // ObjectProvider Implementation
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     public Object getObject()
     {

Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/NullProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/NullProvider.java?rev=631654&r1=631653&r2=631654&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/NullProvider.java (original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/NullProvider.java Wed Feb 27 09:14:32 2008
@@ -25,13 +25,13 @@
  */
 public class NullProvider extends ConstantProvider
 {
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // Constructors
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     public NullProvider()
     {
-        super( null );
+        super(null);
     }
 }
 

Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/ProviderDecorator.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/ProviderDecorator.java?rev=631654&r1=631653&r2=631654&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/ProviderDecorator.java (original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/ProviderDecorator.java Wed Feb 27 09:14:32 2008
@@ -22,31 +22,31 @@
 /**
  * Returns the result of the inner {@link ObjectProvider provider}.  Subclasses can override the {@link #getObject()}
  * method and decorate what comes back from the inner provider in some way (by {@link SingletonProvider caching it} for
- * example). 
- * 
+ * example).
+ *
  * @author James Carman
  * @since 1.0
  */
 public class ProviderDecorator implements ObjectProvider
 {
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // Fields
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     protected ObjectProvider inner;
 
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // Constructors
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     public ProviderDecorator( ObjectProvider inner )
     {
         this.inner = inner;
     }
 
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // ObjectProvider Implementation
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     public Object getObject()
     {

Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/SingletonProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/SingletonProvider.java?rev=631654&r1=631653&r2=631654&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/SingletonProvider.java (original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/SingletonProvider.java Wed Feb 27 09:14:32 2008
@@ -28,24 +28,24 @@
  */
 public class SingletonProvider extends ProviderDecorator
 {
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // Fields
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     private Object instance;
 
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // Constructors
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     public SingletonProvider( ObjectProvider inner )
     {
-        super( inner );
+        super(inner);
     }
 
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // ObjectProvider Implementation
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     public Object getObject()
     {

Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/package.html
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/package.html?rev=631654&r1=631653&r2=631654&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/package.html (original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/package.html Wed Feb 27 09:14:32 2008
@@ -18,7 +18,7 @@
 <html>
 <body>
 <p>
-This package contains some general-use <a href="../ObjectProvider.html">ObjectProvider</a> implementations.
+    This package contains some general-use <a href="../ObjectProvider.html">ObjectProvider</a> implementations.
 </p>
 </body>
 </html>

Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/BurlapProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/BurlapProvider.java?rev=631654&r1=631653&r2=631654&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/BurlapProvider.java (original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/BurlapProvider.java Wed Feb 27 09:14:32 2008
@@ -21,32 +21,34 @@
 import org.apache.commons.proxy.ObjectProvider;
 import org.apache.commons.proxy.exception.ObjectProviderException;
 
+import java.io.Serializable;
 import java.net.MalformedURLException;
 
 /**
  * Provides a burlap service object.
- *
+ * <p/>
  * <p>
  * <b>Dependencies</b>:
  * <ul>
- *   <li>Burlap version 2.1.7 or greater</li>
+ * <li>Burlap version 2.1.7 or greater</li>
  * </ul>
  * </p>
+ *
  * @author James Carman
  * @since 1.0
  */
-public class BurlapProvider implements ObjectProvider
+public class BurlapProvider implements ObjectProvider, Serializable
 {
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // Fields
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     private Class serviceInterface;
     private String url;
 
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // Constructors
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     public BurlapProvider()
     {
@@ -58,25 +60,25 @@
         this.url = url;
     }
 
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // ObjectProvider Implementation
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     public Object getObject()
     {
         try
         {
-            return new BurlapProxyFactory().create( serviceInterface, url );
+            return new BurlapProxyFactory().create(serviceInterface, url);
         }
         catch( MalformedURLException e )
         {
-            throw new ObjectProviderException( "Invalid url given.", e );
+            throw new ObjectProviderException("Invalid url given.", e);
         }
     }
 
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // Getter/Setter Methods
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     public void setServiceInterface( Class serviceInterface )
     {

Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/HessianProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/HessianProvider.java?rev=631654&r1=631653&r2=631654&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/HessianProvider.java (original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/HessianProvider.java Wed Feb 27 09:14:32 2008
@@ -21,32 +21,34 @@
 import org.apache.commons.proxy.ObjectProvider;
 import org.apache.commons.proxy.exception.ObjectProviderException;
 
+import java.io.Serializable;
 import java.net.MalformedURLException;
 
 /**
  * Provides a hessian service object.
- *
+ * <p/>
  * <p>
  * <b>Dependencies</b>:
  * <ul>
- *   <li>Hessian version 3.0.1 or greater</li>
+ * <li>Hessian version 3.0.1 or greater</li>
  * </ul>
  * </p>
+ *
  * @author James Carman
  * @since 1.0
  */
-public class HessianProvider implements ObjectProvider
+public class HessianProvider implements ObjectProvider, Serializable
 {
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // Fields
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     private Class serviceInterface;
     private String url;
 
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // Constructors
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     public HessianProvider()
     {
@@ -58,25 +60,25 @@
         this.url = url;
     }
 
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // ObjectProvider Implementation
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     public Object getObject()
     {
         try
         {
-            return new HessianProxyFactory().create( serviceInterface, url );
+            return new HessianProxyFactory().create(serviceInterface, url);
         }
         catch( MalformedURLException e )
         {
-            throw new ObjectProviderException( "Invalid url given.", e );
+            throw new ObjectProviderException("Invalid url given.", e);
         }
     }
 
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // Getter/Setter Methods
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     public void setServiceInterface( Class serviceInterface )
     {

Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/JaxRpcProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/JaxRpcProvider.java?rev=631654&r1=631653&r2=631654&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/JaxRpcProvider.java (original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/JaxRpcProvider.java Wed Feb 27 09:14:32 2008
@@ -29,21 +29,22 @@
 
 /**
  * Returns a proxy for a JAX-RPC-based service.
- *
+ * <p/>
  * <p>
  * <b>Dependencies</b>:
  * <ul>
- *   <li>A JAX-RPC implementation</li>
+ * <li>A JAX-RPC implementation</li>
  * </ul>
  * </p>
+ *
  * @author James Carman
  * @since 1.0
  */
 public class JaxRpcProvider implements ObjectProvider
 {
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // Fields
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     private Class serviceInterface;
     private String wsdlUrl;
@@ -54,9 +55,9 @@
     private String portLocalPart;
     private String portPrefix;
 
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // Constructors
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     public JaxRpcProvider()
     {
@@ -67,34 +68,34 @@
         this.serviceInterface = serviceInterface;
     }
 
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // ObjectProvider Implementation
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     public Object getObject()
     {
         try
         {
             final Service service = ( wsdlUrl == null ?
-                                      ServiceFactory.newInstance().createService( getServiceQName() ) : ServiceFactory
-                    .newInstance().createService( new URL( wsdlUrl ), getServiceQName() ) );
+                    ServiceFactory.newInstance().createService(getServiceQName()) : ServiceFactory
+                    .newInstance().createService(new URL(wsdlUrl), getServiceQName()) );
             final QName portQName = getPortQName();
-            return portQName == null ? service.getPort( serviceInterface ) :
-                   service.getPort( portQName, serviceInterface );
+            return portQName == null ? service.getPort(serviceInterface) :
+                    service.getPort(portQName, serviceInterface);
         }
         catch( ServiceException e )
         {
-            throw new ObjectProviderException( "Unable to create JAX-RPC service proxy.", e );
+            throw new ObjectProviderException("Unable to create JAX-RPC service proxy.", e);
         }
         catch( MalformedURLException e )
         {
-            throw new ObjectProviderException( "Invalid URL given.", e );
+            throw new ObjectProviderException("Invalid URL given.", e);
         }
     }
 
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // Getter/Setter Methods
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     public void setPortLocalPart( String portLocalPart )
     {
@@ -136,35 +137,35 @@
         this.wsdlUrl = wsdlUrl;
     }
 
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // Other Methods
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     private QName getPortQName()
     {
-        return getQName( portNamespaceUri, portLocalPart, portPrefix );
+        return getQName(portNamespaceUri, portLocalPart, portPrefix);
     }
 
     private QName getQName( String namespaceUri, String localPart, String prefix )
     {
         if( namespaceUri != null && localPart != null && prefix != null )
         {
-            return new QName( namespaceUri, localPart, prefix );
+            return new QName(namespaceUri, localPart, prefix);
         }
         else if( namespaceUri != null && localPart != null )
         {
-            return new QName( namespaceUri, localPart );
+            return new QName(namespaceUri, localPart);
         }
         else if( localPart != null )
         {
-            return new QName( localPart );
+            return new QName(localPart);
         }
         return null;
     }
 
     private QName getServiceQName()
     {
-        return getQName( serviceNamespaceUri, serviceLocalPart, servicePrefix );
+        return getQName(serviceNamespaceUri, serviceLocalPart, servicePrefix);
     }
 }
 

Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/RmiProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/RmiProvider.java?rev=631654&r1=631653&r2=631654&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/RmiProvider.java (original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/RmiProvider.java Wed Feb 27 09:14:32 2008
@@ -34,18 +34,18 @@
  */
 public class RmiProvider implements ObjectProvider
 {
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // Fields
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     private String host = "localhost";
     private int port = Registry.REGISTRY_PORT;
     private RMIClientSocketFactory clientSocketFactory;
     private String name;
 
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // Constructors
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     public RmiProvider()
     {
@@ -53,33 +53,33 @@
 
     public RmiProvider( String name )
     {
-        setName( name );
+        setName(name);
     }
 
     public RmiProvider( String host, String name )
     {
-        setHost( host );
-        setName( name );
+        setHost(host);
+        setName(name);
     }
 
     public RmiProvider( String host, int port, String name )
     {
-        setHost( host );
-        setName( name );
-        setPort( port );
+        setHost(host);
+        setName(name);
+        setPort(port);
     }
 
     public RmiProvider( String host, int port, RMIClientSocketFactory clientSocketFactory, String name )
     {
-        setHost( host );
-        setPort( port );
-        setClientSocketFactory( clientSocketFactory );
-        setName( name );
+        setHost(host);
+        setPort(port);
+        setClientSocketFactory(clientSocketFactory);
+        setName(name);
     }
 
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // ObjectProvider Implementation
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     public Object getObject()
     {
@@ -87,28 +87,23 @@
         try
         {
             reg = getRegistry();
-            return reg.lookup( name );
+            return reg.lookup(name);
         }
         catch( NotBoundException e )
         {
-            throw new ObjectProviderException( "Name " + name + " not found in registry at " + host + ":" + port + ".",
-                                               e );
+            throw new ObjectProviderException("Name " + name + " not found in registry at " + host + ":" + port + ".",
+                    e);
         }
         catch( RemoteException e )
         {
             throw new ObjectProviderException(
-                    "Unable to lookup service named " + name + " in registry at " + host + ":" + port + ".", e );
+                    "Unable to lookup service named " + name + " in registry at " + host + ":" + port + ".", e);
         }
     }
 
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // Getter/Setter Methods
-//----------------------------------------------------------------------------------------------------------------------
-
-    public void setName( String name )
-    {
-        this.name = name;
-    }
+//**********************************************************************************************************************
 
     public void setClientSocketFactory( RMIClientSocketFactory clientSocketFactory )
     {
@@ -120,14 +115,19 @@
         this.host = host;
     }
 
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+
     public void setPort( int port )
     {
         this.port = port;
     }
 
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // Other Methods
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     private Registry getRegistry()
     {
@@ -135,16 +135,16 @@
         {
             if( clientSocketFactory != null )
             {
-                return LocateRegistry.getRegistry( host, port, clientSocketFactory );
+                return LocateRegistry.getRegistry(host, port, clientSocketFactory);
             }
             else
             {
-                return LocateRegistry.getRegistry( host, port );
+                return LocateRegistry.getRegistry(host, port);
             }
         }
         catch( RemoteException e )
         {
-            throw new ObjectProviderException( "Unable to locate registry at " + host + ":" + port + ".", e );
+            throw new ObjectProviderException("Unable to locate registry at " + host + ":" + port + ".", e);
         }
     }
 }

Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/SessionBeanProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/SessionBeanProvider.java?rev=631654&r1=631653&r2=631654&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/SessionBeanProvider.java (original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/SessionBeanProvider.java Wed Feb 27 09:14:32 2008
@@ -37,16 +37,17 @@
  */
 public class SessionBeanProvider implements ObjectProvider
 {
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // Fields
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
+
     private final String jndiName;
     private final Class homeInterface;
     private final Properties properties;
 
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // Constructors
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     public SessionBeanProvider( String jndiName, Class homeInterface )
     {
@@ -62,39 +63,39 @@
         this.properties = properties;
     }
 
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 // ObjectProvider Implementation
-//----------------------------------------------------------------------------------------------------------------------
+//**********************************************************************************************************************
 
     public Object getObject()
     {
         try
         {
             final InitialContext initialContext = properties == null ? new InitialContext() :
-                                                  new InitialContext( properties );
-            Object homeObject = PortableRemoteObject.narrow( initialContext.lookup( jndiName ), homeInterface );
-            final Method createMethod = homeObject.getClass().getMethod( "create", ProxyUtils.EMPTY_ARGUMENT_TYPES );
-            return createMethod.invoke( homeObject, ProxyUtils.EMPTY_ARGUMENTS );
+                    new InitialContext(properties);
+            Object homeObject = PortableRemoteObject.narrow(initialContext.lookup(jndiName), homeInterface);
+            final Method createMethod = homeObject.getClass().getMethod("create", ProxyUtils.EMPTY_ARGUMENT_TYPES);
+            return createMethod.invoke(homeObject, ProxyUtils.EMPTY_ARGUMENTS);
         }
         catch( NoSuchMethodException e )
         {
             throw new ObjectProviderException(
-                    "Unable to find no-arg create() method on home interface " + homeInterface.getName() + ".", e );
+                    "Unable to find no-arg create() method on home interface " + homeInterface.getName() + ".", e);
         }
         catch( IllegalAccessException e )
         {
             throw new ObjectProviderException(
                     "No-arg create() method on home interface " + homeInterface.getName() + " is not accessible.",
-                    e ); // Should never happen!
+                    e); // Should never happen!
         }
         catch( NamingException e )
         {
-            throw new ObjectProviderException( "Unable to lookup EJB home object in JNDI.", e );
+            throw new ObjectProviderException("Unable to lookup EJB home object in JNDI.", e);
         }
         catch( InvocationTargetException e )
         {
             throw new ObjectProviderException(
-                    "No-arg create() method on home interface " + homeInterface.getName() + " threw an exception.", e );
+                    "No-arg create() method on home interface " + homeInterface.getName() + " threw an exception.", e);
         }
     }
 }

Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/package.html
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/package.html?rev=631654&r1=631653&r2=631654&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/package.html (original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/package.html Wed Feb 27 09:14:32 2008
@@ -18,7 +18,7 @@
 <html>
 <body>
 <p>
-This package contains some useful <a href="../../ObjectProvider.html">ObjectProvider</a> implementations for use
+    This package contains some useful <a href="../../ObjectProvider.html">ObjectProvider</a> implementations for use
     in remoting situations (EJB, RMI, Burlap, Hessian, JAX-RPC, etc).
 </p>
 </body>

Modified: commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/TestProxyFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/TestProxyFactory.java?rev=631654&r1=631653&r2=631654&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/TestProxyFactory.java (original)
+++ commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/TestProxyFactory.java Wed Feb 27 09:14:32 2008
@@ -16,12 +16,17 @@
  */
 
 package org.apache.commons.proxy;
+
 import org.apache.commons.proxy.factory.AbstractProxyFactoryTestCase;
 
 public class TestProxyFactory extends AbstractProxyFactoryTestCase
 {
+//**********************************************************************************************************************
+// Constructors
+//**********************************************************************************************************************
+
     public TestProxyFactory()
     {
-        super( new ProxyFactory() );
+        super(new ProxyFactory());
     }
 }

Modified: commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/TestProxyUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/TestProxyUtils.java?rev=631654&r1=631653&r2=631654&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/TestProxyUtils.java (original)
+++ commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/TestProxyUtils.java Wed Feb 27 09:14:32 2008
@@ -29,56 +29,64 @@
 
 public class TestProxyUtils extends TestCase
 {
+//**********************************************************************************************************************
+// Fields
+//**********************************************************************************************************************
+
     private Properties prevProperties;
 
+//**********************************************************************************************************************
+// Other Methods
+//**********************************************************************************************************************
+
     protected void setUp() throws Exception
     {
         prevProperties = System.getProperties();
-        System.setProperties( new Properties() );
+        System.setProperties(new Properties());
     }
 
     protected void tearDown() throws Exception
     {
-        System.setProperties( prevProperties );
+        System.setProperties(prevProperties);
     }
 
     public void testCreateNullObject() throws Exception
     {
         final Echo nullEcho = ( Echo ) ProxyUtils
-                .createNullObject( new JavassistProxyFactory(), new Class[]{ Echo.class } );
-        assertNull( nullEcho.echoBack( "hello" ) );
-        assertNull( nullEcho.echoBack( "hello", "world" ) );
-        assertEquals( ( int ) 0, nullEcho.echoBack( 12345 ) );
+                .createNullObject(new JavassistProxyFactory(), new Class[] {Echo.class});
+        assertNull(nullEcho.echoBack("hello"));
+        assertNull(nullEcho.echoBack("hello", "world"));
+        assertEquals(( int ) 0, nullEcho.echoBack(12345));
     }
 
     public void testCreateNullObjectWithClassLoader() throws Exception
     {
-        final Echo nullEcho = ( Echo ) ProxyUtils.createNullObject( new JavassistProxyFactory(),
-                                                                    Echo.class.getClassLoader(),
-                                                                    new Class[]{ Echo.class } );
-        assertNull( nullEcho.echoBack( "hello" ) );
-        assertNull( nullEcho.echoBack( "hello", "world" ) );
-        assertEquals( ( int ) 0, nullEcho.echoBack( 12345 ) );
+        final Echo nullEcho = ( Echo ) ProxyUtils.createNullObject(new JavassistProxyFactory(),
+                Echo.class.getClassLoader(),
+                new Class[] {Echo.class});
+        assertNull(nullEcho.echoBack("hello"));
+        assertNull(nullEcho.echoBack("hello", "world"));
+        assertEquals(( int ) 0, nullEcho.echoBack(12345));
     }
 
     public void testGetAllInterfaces()
     {
-        assertNull( ProxyUtils.getAllInterfaces( null ) );
-        assertEquals( Arrays.asList( new Class[] { DuplicateEcho.class, Serializable.class, Echo.class } ), Arrays.asList( ProxyUtils.getAllInterfaces( EchoImpl.class ) ) );
+        assertNull(ProxyUtils.getAllInterfaces(null));
+        assertEquals(Arrays.asList(new Class[] {DuplicateEcho.class, Serializable.class, Echo.class}), Arrays.asList(ProxyUtils.getAllInterfaces(EchoImpl.class)));
     }
 
     public void testGetJavaClassName() throws Exception
     {
-        assertEquals( "java.lang.Object[]", ProxyUtils.getJavaClassName( Object[].class ) );
-        assertEquals( "java.lang.Object[][]", ProxyUtils.getJavaClassName( Object[][].class ) );
-        assertEquals( "java.lang.String[][][]", ProxyUtils.getJavaClassName( String[][][].class ) );
-        assertEquals( "int", ProxyUtils.getJavaClassName( Integer.TYPE ) );
-        assertEquals( "float", ProxyUtils.getJavaClassName( Float.TYPE ) );
-        assertEquals( "long", ProxyUtils.getJavaClassName( Long.TYPE ) );
-        assertEquals( "double", ProxyUtils.getJavaClassName( Double.TYPE ) );
-        assertEquals( "short", ProxyUtils.getJavaClassName( Short.TYPE ) );
-        assertEquals( "byte", ProxyUtils.getJavaClassName( Byte.TYPE ) );
-        assertEquals( "char", ProxyUtils.getJavaClassName( Character.TYPE ) );
-        assertEquals( "boolean", ProxyUtils.getJavaClassName( Boolean.TYPE ) );
+        assertEquals("java.lang.Object[]", ProxyUtils.getJavaClassName(Object[].class));
+        assertEquals("java.lang.Object[][]", ProxyUtils.getJavaClassName(Object[][].class));
+        assertEquals("java.lang.String[][][]", ProxyUtils.getJavaClassName(String[][][].class));
+        assertEquals("int", ProxyUtils.getJavaClassName(Integer.TYPE));
+        assertEquals("float", ProxyUtils.getJavaClassName(Float.TYPE));
+        assertEquals("long", ProxyUtils.getJavaClassName(Long.TYPE));
+        assertEquals("double", ProxyUtils.getJavaClassName(Double.TYPE));
+        assertEquals("short", ProxyUtils.getJavaClassName(Short.TYPE));
+        assertEquals("byte", ProxyUtils.getJavaClassName(Byte.TYPE));
+        assertEquals("char", ProxyUtils.getJavaClassName(Character.TYPE));
+        assertEquals("boolean", ProxyUtils.getJavaClassName(Boolean.TYPE));
     }
 }

Modified: commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/exception/AbstractExceptionClassTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/exception/AbstractExceptionClassTestCase.java?rev=631654&r1=631653&r2=631654&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/exception/AbstractExceptionClassTestCase.java (original)
+++ commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/exception/AbstractExceptionClassTestCase.java Wed Feb 27 09:14:32 2008
@@ -25,42 +25,54 @@
  */
 public abstract class AbstractExceptionClassTestCase extends TestCase
 {
+//**********************************************************************************************************************
+// Fields
+//**********************************************************************************************************************
+
     private final Class exceptionClass;
 
+//**********************************************************************************************************************
+// Constructors
+//**********************************************************************************************************************
+
     public AbstractExceptionClassTestCase( Class exceptionClass )
     {
         this.exceptionClass = exceptionClass;
     }
 
-    public void testNoArgConstructor() throws Exception
+//**********************************************************************************************************************
+// Other Methods
+//**********************************************************************************************************************
+
+    public void testCauseOnlyConstructor() throws Exception
     {
-        Exception e = ( Exception )exceptionClass.getConstructor( new Class[] {} ).newInstance( new Object[] {} );
-        assertNull( e.getMessage() );
-        assertNull( e.getCause() );
+        final Exception cause = new Exception();
+        Exception e = ( Exception ) exceptionClass.getConstructor(new Class[] {Throwable.class}).newInstance(new Object[] {cause});
+        assertEquals(cause.toString(), e.getMessage());
+        assertEquals(cause, e.getCause());
     }
 
-    public void testMessageOnlyConstructor() throws Exception
+    public void testMessageAndCauseConstructor() throws Exception
     {
+        final Exception cause = new Exception();
         final String message = "message";
-        Exception e = ( Exception )exceptionClass.getConstructor( new Class[] { String.class } ).newInstance( new Object[] { message } );
-        assertEquals( message, e.getMessage() );
-        assertNull( e.getCause() );
+        Exception e = ( Exception ) exceptionClass.getConstructor(new Class[] {String.class, Throwable.class}).newInstance(new Object[] {message, cause});
+        assertEquals(message, e.getMessage());
+        assertEquals(cause, e.getCause());
     }
 
-    public void testCauseOnlyConstructor() throws Exception
+    public void testMessageOnlyConstructor() throws Exception
     {
-        final Exception cause = new Exception();
-        Exception e = ( Exception )exceptionClass.getConstructor( new Class[] { Throwable.class } ).newInstance( new Object[] { cause } );
-        assertEquals( cause.toString(), e.getMessage() );
-        assertEquals( cause, e.getCause() );
+        final String message = "message";
+        Exception e = ( Exception ) exceptionClass.getConstructor(new Class[] {String.class}).newInstance(new Object[] {message});
+        assertEquals(message, e.getMessage());
+        assertNull(e.getCause());
     }
 
-    public void testMessageAndCauseConstructor() throws Exception
+    public void testNoArgConstructor() throws Exception
     {
-        final Exception cause = new Exception();
-        final String message = "message";
-        Exception e = ( Exception )exceptionClass.getConstructor( new Class[] { String.class, Throwable.class } ).newInstance( new Object[] { message, cause } );
-        assertEquals( message, e.getMessage() );
-        assertEquals( cause, e.getCause() );
+        Exception e = ( Exception ) exceptionClass.getConstructor(new Class[] {}).newInstance(new Object[] {});
+        assertNull(e.getMessage());
+        assertNull(e.getCause());
     }
 }

Modified: commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/exception/TestDelegateProviderException.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/exception/TestDelegateProviderException.java?rev=631654&r1=631653&r2=631654&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/exception/TestDelegateProviderException.java (original)
+++ commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/exception/TestDelegateProviderException.java Wed Feb 27 09:14:32 2008
@@ -19,8 +19,12 @@
 
 public class TestDelegateProviderException extends AbstractExceptionClassTestCase
 {
+//**********************************************************************************************************************
+// Constructors
+//**********************************************************************************************************************
+
     public TestDelegateProviderException()
     {
-        super( ObjectProviderException.class );
+        super(ObjectProviderException.class);
     }
 }

Modified: commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/exception/TestInvocationHandlerException.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/exception/TestInvocationHandlerException.java?rev=631654&r1=631653&r2=631654&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/exception/TestInvocationHandlerException.java (original)
+++ commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/exception/TestInvocationHandlerException.java Wed Feb 27 09:14:32 2008
@@ -16,10 +16,15 @@
  */
 
 package org.apache.commons.proxy.exception;
+
 public class TestInvocationHandlerException extends AbstractExceptionClassTestCase
 {
+//**********************************************************************************************************************
+// Constructors
+//**********************************************************************************************************************
+
     public TestInvocationHandlerException()
     {
-        super( InvokerException.class );
+        super(InvokerException.class);
     }
 }

Modified: commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/exception/TestProxyFactoryException.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/exception/TestProxyFactoryException.java?rev=631654&r1=631653&r2=631654&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/exception/TestProxyFactoryException.java (original)
+++ commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/exception/TestProxyFactoryException.java Wed Feb 27 09:14:32 2008
@@ -23,8 +23,12 @@
  */
 public class TestProxyFactoryException extends AbstractExceptionClassTestCase
 {
+//**********************************************************************************************************************
+// Constructors
+//**********************************************************************************************************************
+
     public TestProxyFactoryException()
     {
-        super( ProxyFactoryException.class );
+        super(ProxyFactoryException.class);
     }
 }

Modified: commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/factory/AbstractProxyFactoryTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/factory/AbstractProxyFactoryTestCase.java?rev=631654&r1=631653&r2=631654&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/factory/AbstractProxyFactoryTestCase.java (original)
+++ commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/factory/AbstractProxyFactoryTestCase.java Wed Feb 27 09:14:32 2008
@@ -17,7 +17,6 @@
 
 package org.apache.commons.proxy.factory;
 
-import junit.framework.TestCase;
 import org.apache.commons.proxy.Interceptor;
 import org.apache.commons.proxy.Invocation;
 import org.apache.commons.proxy.Invoker;
@@ -26,12 +25,14 @@
 import org.apache.commons.proxy.provider.BeanProvider;
 import org.apache.commons.proxy.provider.ConstantProvider;
 import org.apache.commons.proxy.provider.SingletonProvider;
+import org.apache.commons.proxy.util.AbstractTestCase;
 import org.apache.commons.proxy.util.DuplicateEcho;
 import org.apache.commons.proxy.util.Echo;
 import org.apache.commons.proxy.util.EchoImpl;
 import org.apache.commons.proxy.util.SuffixInterceptor;
 
 import java.io.IOException;
+import java.io.Serializable;
 import java.lang.reflect.Method;
 import java.util.Arrays;
 import java.util.LinkedList;
@@ -43,145 +44,108 @@
  * @author James Carman
  * @since 1.0
  */
-public abstract class AbstractProxyFactoryTestCase extends TestCase
+public abstract class AbstractProxyFactoryTestCase extends AbstractTestCase
 {
+//**********************************************************************************************************************
+// Fields
+//**********************************************************************************************************************
+
+    private static final Class[] ECHO_ONLY = new Class[] {Echo.class};
     protected final ProxyFactory factory;
-    private static final Class[] ECHO_ONLY = new Class[] { Echo.class };
+
+//**********************************************************************************************************************
+// Constructors
+//**********************************************************************************************************************
 
     protected AbstractProxyFactoryTestCase( ProxyFactory factory )
     {
         this.factory = factory;
     }
 
-    public void testCanProxy()
+//**********************************************************************************************************************
+// Other Methods
+//**********************************************************************************************************************
+
+    private ObjectProvider createSingletonEcho()
     {
-        assertTrue( factory.canProxy( ECHO_ONLY ) );
-        assertFalse( factory.canProxy( new Class[] { EchoImpl.class } ) );
+        return new SingletonProvider(new BeanProvider(EchoImpl.class));
     }
 
-    public void testInterfaceHierarchies()
+    public void testBooleanInterceptorParameter()
     {
-        final SortedSet set = ( SortedSet ) factory.createDelegatorProxy( new ConstantProvider( new TreeSet() ), new Class[] { SortedSet.class } );
-        set.add( "Hello" );
+        final Echo echo = ( Echo ) factory.createInterceptorProxy(new EchoImpl(), new InterceptorTester(), ECHO_ONLY);
+        assertFalse(echo.echoBack(false));
+        assertTrue(echo.echoBack(true));
     }
 
-    public void testInvokerProxy() throws Exception
+    public void testCanProxy()
     {
-        final InvokerTester tester = new InvokerTester();
-        final Echo echo = ( Echo )factory.createInvokerProxy( tester, ECHO_ONLY );
-        echo.echoBack( "hello" );
-        assertEquals( Echo.class.getMethod( "echoBack", new Class[] { String.class } ), tester.method );
-        assertSame( echo, tester.proxy );
-        assertNotNull( tester.args );
-        assertEquals( 1, tester.args.length );
-        assertEquals( "hello", tester.args[0] );
+        assertTrue(factory.canProxy(ECHO_ONLY));
+        assertFalse(factory.canProxy(new Class[] {EchoImpl.class}));
     }
 
-    public void testDelegatingProxyInterfaceOrder()
+    public void testChangingArguments()
     {
-        final Echo echo = ( Echo ) factory.createDelegatorProxy( createSingletonEcho(), new Class[] { Echo.class, DuplicateEcho.class } );
-        final List expected = new LinkedList( Arrays.asList( new Class[] { Echo.class, DuplicateEcho.class } ) );
-        final List actual = new LinkedList( Arrays.asList( echo.getClass().getInterfaces() ) );
-        actual.retainAll( expected );  // Doesn't alter order!
-        assertEquals( expected, actual );
+        final Echo proxy = ( Echo ) factory.createInterceptorProxy(new EchoImpl(), new ChangeArgumentInterceptor(), ECHO_ONLY);
+        assertEquals("something different", proxy.echoBack("whatever"));
     }
 
     public void testCreateDelegatingProxy()
     {
-        final Echo echo = ( Echo ) factory.createDelegatorProxy( createSingletonEcho(), ECHO_ONLY );
+        final Echo echo = ( Echo ) factory.createDelegatorProxy(createSingletonEcho(), ECHO_ONLY);
         echo.echo();
-        assertEquals( "message", echo.echoBack( "message" ) );
-        assertEquals( "ab", echo.echoBack( "a", "b" ) );
-    }
-
-    public void testBooleanInterceptorParameter()
-    {
-        final Echo echo = ( Echo ) factory.createInterceptorProxy( new EchoImpl(), new  InterceptorTester(), ECHO_ONLY );
-        assertFalse( echo.echoBack( false ) );
-        assertTrue( echo.echoBack( true ) );
-
-    }
-    public void testPrimitiveParameter()
-    {
-        final Echo echo = ( Echo ) factory.createDelegatorProxy( createSingletonEcho(), ECHO_ONLY );
-        assertEquals( 1, echo.echoBack( 1 ) );
+        assertEquals("message", echo.echoBack("message"));
+        assertEquals("ab", echo.echoBack("a", "b"));
     }
 
     public void testCreateInterceptorProxy()
     {
-        final Echo target = ( Echo ) factory.createDelegatorProxy( createSingletonEcho(), ECHO_ONLY );
-        final Echo proxy = ( Echo ) factory.createInterceptorProxy( target, new SuffixInterceptor( " suffix" ), ECHO_ONLY );
+        final Echo target = ( Echo ) factory.createDelegatorProxy(createSingletonEcho(), ECHO_ONLY);
+        final Echo proxy = ( Echo ) factory.createInterceptorProxy(target, new SuffixInterceptor(" suffix"), ECHO_ONLY);
         proxy.echo();
-        assertEquals( "message suffix", proxy.echoBack( "message" ) );
-    }
-
-    private ObjectProvider createSingletonEcho()
-    {
-        return new SingletonProvider( new BeanProvider( EchoImpl.class ) );
+        assertEquals("message suffix", proxy.echoBack("message"));
     }
 
-    public void testMethodInvocationImplementation() throws Exception
+    public void testDelegatingProxyClassCaching() throws Exception
     {
-        final InterceptorTester tester = new InterceptorTester();
-        final EchoImpl target = new EchoImpl();
-        final Echo proxy = ( Echo ) factory.createInterceptorProxy( target, tester, ECHO_ONLY );
-        proxy.echo();
-        assertNotNull( tester.arguments );
-        assertEquals( 0, tester.arguments.length );
-        assertEquals( Echo.class.getMethod( "echo", new Class[] {} ), tester.method );
-        assertEquals( target, tester.proxy );
-        proxy.echoBack( "Hello" );
-        assertNotNull( tester.arguments );
-        assertEquals( 1, tester.arguments.length );
-        assertEquals( "Hello", tester.arguments[0] );
-        assertEquals( Echo.class.getMethod( "echoBack", new Class[] { String.class } ), tester.method );
-        proxy.echoBack( "Hello", "World" );
-        assertNotNull( tester.arguments );
-        assertEquals( 2, tester.arguments.length );
-        assertEquals( "Hello", tester.arguments[0] );
-        assertEquals( "World", tester.arguments[1] );
-        assertEquals( Echo.class.getMethod( "echoBack", new Class[] { String.class, String.class } ), tester.method );
+        final Echo proxy1 = ( Echo ) factory.createDelegatorProxy(new ConstantProvider(new EchoImpl()), ECHO_ONLY);
+        final Echo proxy2 = ( Echo ) factory.createDelegatorProxy(new ConstantProvider(new EchoImpl()), ECHO_ONLY);
+        assertNotSame(proxy1, proxy2);
+        assertSame(proxy1.getClass(), proxy2.getClass());
     }
 
-    public void testMethodInvocationDuplicateMethods() throws Exception
+    public void testDelegatingProxyInterfaceOrder()
     {
-        final InterceptorTester tester = new InterceptorTester();
-        final EchoImpl target = new EchoImpl();
-        final Echo proxy = ( Echo ) factory.createInterceptorProxy( target, tester, new Class[] { Echo.class, DuplicateEcho.class } );
-        proxy.echoBack( "hello" );
-        assertEquals( Echo.class.getMethod( "echoBack", new Class[] { String.class } ), tester.method );
+        final Echo echo = ( Echo ) factory.createDelegatorProxy(createSingletonEcho(), new Class[] {Echo.class, DuplicateEcho.class});
+        final List expected = new LinkedList(Arrays.asList(new Class[] {Echo.class, DuplicateEcho.class}));
+        final List actual = new LinkedList(Arrays.asList(echo.getClass().getInterfaces()));
+        actual.retainAll(expected);  // Doesn't alter order!
+        assertEquals(expected, actual);
     }
 
-
-    public void testMethodInvocationClassCaching() throws Exception
+    public void testDelegatingProxySerializable() throws Exception
     {
-        final InterceptorTester tester = new InterceptorTester();
-        final EchoImpl target = new EchoImpl();
-        final Echo proxy1 = ( Echo ) factory.createInterceptorProxy( target, tester, ECHO_ONLY );
-        final Echo proxy2 = ( Echo ) factory.createInterceptorProxy( target, tester, new Class[] { Echo.class, DuplicateEcho.class } );
-        proxy1.echoBack( "hello1" );
-        final Class invocationClass1 = tester.invocationClass;
-        proxy2.echoBack( "hello2" );
-        assertEquals( invocationClass1, tester.invocationClass );
+        final Echo proxy = ( Echo ) factory.createDelegatorProxy(new ConstantProvider(new EchoImpl()), ECHO_ONLY);
+        assertSerializable(proxy);
     }
 
-    public void testDelegatingProxyClassCaching() throws Exception
+    public void testInterceptingProxyClassCaching() throws Exception
     {
-        final Echo proxy1 = ( Echo ) factory.createDelegatorProxy( new ConstantProvider( new EchoImpl() ), ECHO_ONLY );
-        final Echo proxy2 = ( Echo ) factory.createDelegatorProxy( new ConstantProvider( new EchoImpl() ), ECHO_ONLY );
-        assertEquals( proxy1.getClass(), proxy2.getClass() );
+        final Echo proxy1 = ( Echo ) factory.createInterceptorProxy(new EchoImpl(), new NoOpMethodInterceptor(), ECHO_ONLY);
+        final Echo proxy2 = ( Echo ) factory.createInterceptorProxy(new EchoImpl(), new NoOpMethodInterceptor(), ECHO_ONLY);
+        assertNotSame(proxy1, proxy2);
+        assertSame(proxy1.getClass(), proxy2.getClass());
     }
 
-    public void testInterceptingProxyClassCaching() throws Exception
+    public void testInterceptingProxySerializable() throws Exception
     {
-        final Echo proxy1 = ( Echo ) factory.createInterceptorProxy( new EchoImpl(), new NoOpMethodInterceptor(), ECHO_ONLY );
-        final Echo proxy2 = ( Echo ) factory.createInterceptorProxy( new EchoImpl(), new NoOpMethodInterceptor(), ECHO_ONLY );
-        assertEquals( proxy1.getClass(), proxy2.getClass() );
+        final Echo proxy = ( Echo ) factory.createInterceptorProxy(new EchoImpl(), new NoOpMethodInterceptor(), ECHO_ONLY);
+        assertSerializable(proxy);
     }
 
-    public void testProxyWithCheckedException() throws Exception
+    public void testInterceptorProxyWithCheckedException() throws Exception
     {
-        final Echo proxy = ( Echo ) factory.createDelegatorProxy( new ConstantProvider( new EchoImpl() ), ECHO_ONLY );
+        final Echo proxy = ( Echo ) factory.createInterceptorProxy(new EchoImpl(), new NoOpMethodInterceptor(), ECHO_ONLY);
         try
         {
             proxy.ioException();
@@ -192,9 +156,9 @@
         }
     }
 
-    public void testProxyWithUncheckedException() throws Exception
+    public void testInterceptorProxyWithUncheckedException() throws Exception
     {
-        final Echo proxy = ( Echo ) factory.createDelegatorProxy( new ConstantProvider( new EchoImpl() ), ECHO_ONLY );
+        final Echo proxy = ( Echo ) factory.createInterceptorProxy(new EchoImpl(), new NoOpMethodInterceptor(), ECHO_ONLY);
         try
         {
             proxy.illegalArgument();
@@ -205,48 +169,123 @@
         }
     }
 
-    public void testInterceptorProxyWithUncheckedException() throws Exception
+    public void testInterfaceHierarchies()
+    {
+        final SortedSet set = ( SortedSet ) factory.createDelegatorProxy(new ConstantProvider(new TreeSet()), new Class[] {SortedSet.class});
+        set.add("Hello");
+    }
+
+    public void testInvokerProxy() throws Exception
+    {
+        final InvokerTester tester = new InvokerTester();
+        final Echo echo = ( Echo ) factory.createInvokerProxy(tester, ECHO_ONLY);
+        echo.echoBack("hello");
+        assertEquals(Echo.class.getMethod("echoBack", new Class[] {String.class}), tester.method);
+        assertSame(echo, tester.proxy);
+        assertNotNull(tester.args);
+        assertEquals(1, tester.args.length);
+        assertEquals("hello", tester.args[0]);
+    }
+
+    public void testInvokerProxyClassCaching() throws Exception
+    {
+        final Echo proxy1 = ( Echo ) factory.createInvokerProxy(new InvokerTester(), ECHO_ONLY);
+        final Echo proxy2 = ( Echo ) factory.createInvokerProxy(new InvokerTester(), ECHO_ONLY);
+        assertNotSame(proxy1, proxy2);
+        assertSame(proxy1.getClass(), proxy2.getClass());
+    }
+
+    public void testInvokerProxySerializable() throws Exception
+    {
+        final Echo proxy = ( Echo ) factory.createInvokerProxy(new InvokerTester(), ECHO_ONLY);
+        assertTrue(proxy instanceof Serializable);
+    }
+
+    public void testMethodInvocationClassCaching() throws Exception
+    {
+        final InterceptorTester tester = new InterceptorTester();
+        final EchoImpl target = new EchoImpl();
+        final Echo proxy1 = ( Echo ) factory.createInterceptorProxy(target, tester, ECHO_ONLY);
+        final Echo proxy2 = ( Echo ) factory.createInterceptorProxy(target, tester, new Class[] {Echo.class, DuplicateEcho.class});
+        proxy1.echoBack("hello1");
+        final Class invocationClass1 = tester.invocationClass;
+        proxy2.echoBack("hello2");
+        assertSame(invocationClass1, tester.invocationClass);
+    }
+
+    public void testMethodInvocationDuplicateMethods() throws Exception
+    {
+        final InterceptorTester tester = new InterceptorTester();
+        final EchoImpl target = new EchoImpl();
+        final Echo proxy = ( Echo ) factory.createInterceptorProxy(target, tester, new Class[] {Echo.class, DuplicateEcho.class});
+        proxy.echoBack("hello");
+        assertEquals(Echo.class.getMethod("echoBack", new Class[] {String.class}), tester.method);
+    }
+
+    public void testMethodInvocationImplementation() throws Exception
+    {
+        final InterceptorTester tester = new InterceptorTester();
+        final EchoImpl target = new EchoImpl();
+        final Echo proxy = ( Echo ) factory.createInterceptorProxy(target, tester, ECHO_ONLY);
+        proxy.echo();
+        assertNotNull(tester.arguments);
+        assertEquals(0, tester.arguments.length);
+        assertEquals(Echo.class.getMethod("echo", new Class[] {}), tester.method);
+        assertEquals(target, tester.proxy);
+        proxy.echoBack("Hello");
+        assertNotNull(tester.arguments);
+        assertEquals(1, tester.arguments.length);
+        assertEquals("Hello", tester.arguments[0]);
+        assertEquals(Echo.class.getMethod("echoBack", new Class[] {String.class}), tester.method);
+        proxy.echoBack("Hello", "World");
+        assertNotNull(tester.arguments);
+        assertEquals(2, tester.arguments.length);
+        assertEquals("Hello", tester.arguments[0]);
+        assertEquals("World", tester.arguments[1]);
+        assertEquals(Echo.class.getMethod("echoBack", new Class[] {String.class, String.class}), tester.method);
+    }
+
+    public void testPrimitiveParameter()
+    {
+        final Echo echo = ( Echo ) factory.createDelegatorProxy(createSingletonEcho(), ECHO_ONLY);
+        assertEquals(1, echo.echoBack(1));
+    }
+
+    public void testProxyWithCheckedException() throws Exception
     {
-        final Echo proxy = ( Echo ) factory.createInterceptorProxy( new EchoImpl(), new NoOpMethodInterceptor(),  ECHO_ONLY );
+        final Echo proxy = ( Echo ) factory.createDelegatorProxy(new ConstantProvider(new EchoImpl()), ECHO_ONLY);
         try
         {
-            proxy.illegalArgument();
+            proxy.ioException();
             fail();
         }
-        catch( IllegalArgumentException e )
+        catch( IOException e )
         {
         }
     }
 
-    public void testInterceptorProxyWithCheckedException() throws Exception
+    public void testProxyWithUncheckedException() throws Exception
     {
-        final Echo proxy = ( Echo ) factory.createInterceptorProxy( new EchoImpl(), new NoOpMethodInterceptor(), ECHO_ONLY );
+        final Echo proxy = ( Echo ) factory.createDelegatorProxy(new ConstantProvider(new EchoImpl()), ECHO_ONLY);
         try
         {
-            proxy.ioException();
+            proxy.illegalArgument();
             fail();
         }
-        catch( IOException e )
+        catch( IllegalArgumentException e )
         {
         }
     }
 
     public void testWithNonAccessibleTargetType()
     {
-        final Echo proxy = ( Echo ) factory.createInterceptorProxy( new PrivateEcho(), new NoOpMethodInterceptor(), ECHO_ONLY );
+        final Echo proxy = ( Echo ) factory.createInterceptorProxy(new PrivateEcho(), new NoOpMethodInterceptor(), ECHO_ONLY);
         proxy.echo();
-
-    }
-
-    public void testChangingArguments()
-    {
-        final Echo proxy = ( Echo ) factory.createInterceptorProxy( new EchoImpl(), new ChangeArgumentInterceptor(), ECHO_ONLY );
-        assertEquals( "something different", proxy.echoBack( "whatever" ) );
     }
 
-    private static class PrivateEcho extends EchoImpl
-    {
-    }
+//**********************************************************************************************************************
+// Inner Classes
+//**********************************************************************************************************************
 
     private static class ChangeArgumentInterceptor implements Interceptor
     {
@@ -257,10 +296,19 @@
         }
     }
 
-    protected static class NoOpMethodInterceptor implements Interceptor
+    private static class InterceptorTester implements Interceptor
     {
+        private Object[] arguments;
+        private Method method;
+        private Object proxy;
+        private Class invocationClass;
+
         public Object intercept( Invocation methodInvocation ) throws Throwable
         {
+            arguments = methodInvocation.getArguments();
+            method = methodInvocation.getMethod();
+            proxy = methodInvocation.getProxy();
+            invocationClass = methodInvocation.getClass();
             return methodInvocation.proceed();
         }
     }
@@ -280,20 +328,15 @@
         }
     }
 
-    private static class InterceptorTester implements Interceptor
+    protected static class NoOpMethodInterceptor implements Interceptor, Serializable
     {
-        private Object[] arguments;
-        private Method method;
-        private Object proxy;
-        private Class invocationClass;
-
         public Object intercept( Invocation methodInvocation ) throws Throwable
         {
-            arguments = methodInvocation.getArguments();
-            method = methodInvocation.getMethod();
-            proxy = methodInvocation.getProxy();
-            invocationClass = methodInvocation.getClass();
             return methodInvocation.proceed();
         }
+    }
+
+    private static class PrivateEcho extends EchoImpl
+    {
     }
 }

Modified: commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/factory/AbstractSubclassingProxyFactoryTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/factory/AbstractSubclassingProxyFactoryTestCase.java?rev=631654&r1=631653&r2=631654&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/factory/AbstractSubclassingProxyFactoryTestCase.java (original)
+++ commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/factory/AbstractSubclassingProxyFactoryTestCase.java Wed Feb 27 09:14:32 2008
@@ -31,89 +31,29 @@
  */
 public abstract class AbstractSubclassingProxyFactoryTestCase extends AbstractProxyFactoryTestCase
 {
-    protected AbstractSubclassingProxyFactoryTestCase(ProxyFactory factory)
+//**********************************************************************************************************************
+// Constructors
+//**********************************************************************************************************************
+
+    protected AbstractSubclassingProxyFactoryTestCase( ProxyFactory factory )
     {
         super(factory);
     }
 
-    public void testWithAbstractSuperclass()
-    {
-        final Echo echo = (Echo) factory.createDelegatorProxy(new ConstantProvider(new EchoImpl()), new Class[]{AbstractEcho.class});
-        assertEquals("hello", echo.echoBack("hello"));
-        assertEquals("helloworld", echo.echoBack("hello", "world"));
-    }
+//**********************************************************************************************************************
+// Other Methods
+//**********************************************************************************************************************
 
     public void testCanProxy()
     {
-        assertTrue(factory.canProxy(new Class[]{Echo.class}));
-        assertTrue(factory.canProxy(new Class[]{EchoImpl.class}));
-        assertFalse(factory.canProxy(new Class[]{FinalEcho.class}));
-        assertTrue(factory.canProxy(new Class[]{FinalMethodEcho.class, Echo.class}));
-        assertFalse(factory.canProxy(new Class[]{NoDefaultConstructorEcho.class}));
-        assertTrue(factory.canProxy(new Class[]{ProtectedConstructorEcho.class}));
-        assertFalse(factory.canProxy(new Class[]{InvisibleEcho.class}));
-        assertFalse(factory.canProxy(new Class[]{Echo.class, EchoImpl.class, String.class}));
-    }
-
-    public void testDelegatorClassReuse()
-    {
-        final Echo echo1 = (Echo) factory
-                .createDelegatorProxy(new ConstantProvider(new EchoImpl()), new Class[]{Echo.class, EchoImpl.class});
-        final Echo echo2 = (Echo) factory
-                .createDelegatorProxy(new ConstantProvider(new EchoImpl()), new Class[]{Echo.class, EchoImpl.class});
-        assertSame("Delegator proxy classes should be reused.", echo1.getClass(), echo2.getClass());
-    }
-
-    public void testInterceptorClassReuse()
-    {
-        final Echo echo1 = (Echo) factory
-                .createInterceptorProxy(new EchoImpl(), new NoOpMethodInterceptor(), new Class[]{Echo.class, EchoImpl.class});
-        final Echo echo2 = (Echo) factory
-                .createInterceptorProxy(new EchoImpl(), new NoOpMethodInterceptor(), new Class[]{Echo.class, EchoImpl.class});
-        assertSame("Interceptor proxy classes should be reused.", echo1.getClass(), echo2.getClass());
-    }
-
-    public void testInvokerClassReuse()
-    {
-        final Echo echo1 = (Echo) factory
-                .createInvokerProxy(new NullInvoker(), new Class[]{Echo.class, EchoImpl.class});
-        final Echo echo2 = (Echo) factory
-                .createInvokerProxy(new NullInvoker(), new Class[]{Echo.class, EchoImpl.class});
-        assertSame("Invoker proxy classes should be reused.", echo1.getClass(), echo2.getClass());
-    }
-
-    public void testInvokerWithSuperclass()
-    {
-        final Echo echo = (Echo) factory
-                .createInvokerProxy(new NullInvoker(), new Class[]{Echo.class, EchoImpl.class});
-        assertTrue(echo instanceof EchoImpl);
-    }
-
-    public void testDelegatorWithSuperclass()
-    {
-        final Echo echo = (Echo) factory
-                .createDelegatorProxy(new ConstantProvider(new EchoImpl()), new Class[]{Echo.class, EchoImpl.class});
-        assertTrue(echo instanceof EchoImpl);
-    }
-
-    public void testInterceptorWithSuperclass()
-    {
-        final Echo echo = (Echo) factory
-                .createInterceptorProxy(new EchoImpl(), new NoOpMethodInterceptor(), new Class[]{Echo.class, EchoImpl.class});
-        assertTrue(echo instanceof EchoImpl);
-    }
-
-    public void testProxiesWithClashingFinalMethodInSuperclass()
-    {
-        final Class[] proxyClasses = new Class[]{Echo.class, FinalMethodEcho.class};
-        Echo proxy = (Echo) factory.createDelegatorProxy(new ConstantProvider(new EchoImpl()), proxyClasses);
-        assertEquals("final", proxy.echoBack("echo"));
-
-        proxy = (Echo) factory.createInterceptorProxy(new EchoImpl(), new NoOpMethodInterceptor(), proxyClasses);
-        assertEquals("final", proxy.echoBack("echo"));
-
-        proxy = (Echo) factory.createInvokerProxy(new NullInvoker(), proxyClasses);
-        assertEquals("final", proxy.echoBack("echo"));
+        assertTrue(factory.canProxy(new Class[] {Echo.class}));
+        assertTrue(factory.canProxy(new Class[] {EchoImpl.class}));
+        assertFalse(factory.canProxy(new Class[] {FinalEcho.class}));
+        assertTrue(factory.canProxy(new Class[] {FinalMethodEcho.class, Echo.class}));
+        assertFalse(factory.canProxy(new Class[] {NoDefaultConstructorEcho.class}));
+        assertTrue(factory.canProxy(new Class[] {ProtectedConstructorEcho.class}));
+        assertFalse(factory.canProxy(new Class[] {InvisibleEcho.class}));
+        assertFalse(factory.canProxy(new Class[] {Echo.class, EchoImpl.class, String.class}));
     }
 
     public void testDelegatorWithMultipleSuperclasses()
@@ -121,55 +61,104 @@
         try
         {
             factory.createDelegatorProxy(new ConstantProvider(new EchoImpl()),
-                    new Class[]{EchoImpl.class, String.class});
+                    new Class[] {EchoImpl.class, String.class});
             fail();
         }
-        catch (ProxyFactoryException e)
+        catch( ProxyFactoryException e )
         {
         }
     }
 
+    public void testDelegatorWithSuperclass()
+    {
+        final Echo echo = ( Echo ) factory
+                .createDelegatorProxy(new ConstantProvider(new EchoImpl()), new Class[] {Echo.class, EchoImpl.class});
+        assertTrue(echo instanceof EchoImpl);
+    }
+
     public void testInterceptorWithMultipleSuperclasses()
     {
         try
         {
             factory.createInterceptorProxy(new EchoImpl(), new NoOpMethodInterceptor(),
-                    new Class[]{EchoImpl.class, String.class});
+                    new Class[] {EchoImpl.class, String.class});
             fail();
         }
-        catch (ProxyFactoryException e)
+        catch( ProxyFactoryException e )
         {
         }
     }
 
+    public void testInterceptorWithSuperclass()
+    {
+        final Echo echo = ( Echo ) factory
+                .createInterceptorProxy(new EchoImpl(), new NoOpMethodInterceptor(), new Class[] {Echo.class, EchoImpl.class});
+        assertTrue(echo instanceof EchoImpl);
+    }
+
     public void testInvocationHandlerWithMultipleSuperclasses()
     {
         try
         {
             factory.createInvokerProxy(new NullInvoker(),
-                    new Class[]{EchoImpl.class, String.class});
+                    new Class[] {EchoImpl.class, String.class});
             fail();
         }
-        catch (ProxyFactoryException e)
+        catch( ProxyFactoryException e )
         {
         }
     }
 
+    public void testInvokerWithSuperclass()
+    {
+        final Echo echo = ( Echo ) factory
+                .createInvokerProxy(new NullInvoker(), new Class[] {Echo.class, EchoImpl.class});
+        assertTrue(echo instanceof EchoImpl);
+    }
+
+    public void testProxiesWithClashingFinalMethodInSuperclass()
+    {
+        final Class[] proxyClasses = new Class[] {Echo.class, FinalMethodEcho.class};
+        Echo proxy = ( Echo ) factory.createDelegatorProxy(new ConstantProvider(new EchoImpl()), proxyClasses);
+        assertEquals("final", proxy.echoBack("echo"));
+
+        proxy = ( Echo ) factory.createInterceptorProxy(new EchoImpl(), new NoOpMethodInterceptor(), proxyClasses);
+        assertEquals("final", proxy.echoBack("echo"));
+
+        proxy = ( Echo ) factory.createInvokerProxy(new NullInvoker(), proxyClasses);
+        assertEquals("final", proxy.echoBack("echo"));
+    }
+
+    public void testWithAbstractSuperclass()
+    {
+        final Echo echo = ( Echo ) factory.createDelegatorProxy(new ConstantProvider(new EchoImpl()), new Class[] {AbstractEcho.class});
+        assertEquals("hello", echo.echoBack("hello"));
+        assertEquals("helloworld", echo.echoBack("hello", "world"));
+    }
+
+//**********************************************************************************************************************
+// Inner Classes
+//**********************************************************************************************************************
+
     public static final class FinalEcho extends EchoImpl
     {
     }
 
     public static class FinalMethodEcho extends EchoImpl
     {
-        public final String echoBack(String message)
+        public final String echoBack( String message )
         {
             return "final";
         }
     }
 
+    private static class InvisibleEcho extends EchoImpl
+    {
+    }
+
     public static class NoDefaultConstructorEcho extends EchoImpl
     {
-        public NoDefaultConstructorEcho(String param)
+        public NoDefaultConstructorEcho( String param )
         {
         }
     }
@@ -179,9 +168,5 @@
         protected ProtectedConstructorEcho()
         {
         }
-    }
-
-    private static class InvisibleEcho extends EchoImpl
-    {
     }
 }

Modified: commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/factory/cglib/TestCglibProxyFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/factory/cglib/TestCglibProxyFactory.java?rev=631654&r1=631653&r2=631654&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/factory/cglib/TestCglibProxyFactory.java (original)
+++ commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/factory/cglib/TestCglibProxyFactory.java Wed Feb 27 09:14:32 2008
@@ -17,7 +17,6 @@
 
 package org.apache.commons.proxy.factory.cglib;
 
-import org.apache.commons.proxy.factory.AbstractProxyFactoryTestCase;
 import org.apache.commons.proxy.factory.AbstractSubclassingProxyFactoryTestCase;
 
 /**
@@ -26,8 +25,12 @@
  */
 public class TestCglibProxyFactory extends AbstractSubclassingProxyFactoryTestCase
 {
+//**********************************************************************************************************************
+// Constructors
+//**********************************************************************************************************************
+
     public TestCglibProxyFactory()
     {
-        super( new CglibProxyFactory() );
+        super(new CglibProxyFactory());
     }
 }

Modified: commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/factory/javassist/TestJavassistProxyFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/factory/javassist/TestJavassistProxyFactory.java?rev=631654&r1=631653&r2=631654&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/factory/javassist/TestJavassistProxyFactory.java (original)
+++ commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/factory/javassist/TestJavassistProxyFactory.java Wed Feb 27 09:14:32 2008
@@ -17,14 +17,7 @@
 
 package org.apache.commons.proxy.factory.javassist;
 
-import org.apache.commons.proxy.factory.AbstractProxyFactoryTestCase;
 import org.apache.commons.proxy.factory.AbstractSubclassingProxyFactoryTestCase;
-import org.apache.commons.proxy.util.Echo;
-import org.apache.commons.proxy.util.DuplicateEcho;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.LinkedList;
 
 /**
  * @author James Carman
@@ -32,8 +25,12 @@
  */
 public class TestJavassistProxyFactory extends AbstractSubclassingProxyFactoryTestCase
 {
+//**********************************************************************************************************************
+// Constructors
+//**********************************************************************************************************************
+
     public TestJavassistProxyFactory()
     {
-        super( new JavassistProxyFactory() );
+        super(new JavassistProxyFactory());
     }
 }

Modified: commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/factory/util/TestMethodSignature.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/factory/util/TestMethodSignature.java?rev=631654&r1=631653&r2=631654&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/factory/util/TestMethodSignature.java (original)
+++ commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/factory/util/TestMethodSignature.java Wed Feb 27 09:14:32 2008
@@ -16,21 +16,25 @@
  */
 
 package org.apache.commons.proxy.factory.util;
+
 import junit.framework.TestCase;
 import org.apache.commons.proxy.util.DuplicateEcho;
 import org.apache.commons.proxy.util.Echo;
-import org.apache.commons.proxy.factory.util.MethodSignature;
 
 public class TestMethodSignature extends TestCase
 {
+//**********************************************************************************************************************
+// Other Methods
+//**********************************************************************************************************************
+
     public void testEquals() throws Exception
     {
-        final MethodSignature sig = new MethodSignature( Echo.class.getMethod( "echoBack",  new Class[] { String.class } ) );
-        assertTrue( sig.equals( sig ) );
-        assertFalse( sig.equals( "echoBack" ) );
-        assertEquals( sig, new MethodSignature( Echo.class.getMethod( "echoBack",  new Class[] { String.class } ) ) );
-        assertEquals( sig, new MethodSignature( DuplicateEcho.class.getMethod( "echoBack",  new Class[] { String.class } ) ) );
-        assertFalse( sig.equals( new MethodSignature( Echo.class.getMethod( "echoBack",  new Class[] { String.class, String.class } ) ) ) );
-        assertFalse( sig.equals( new MethodSignature( Echo.class.getMethod( "echo",  new Class[] {} ) ) ) );
+        final MethodSignature sig = new MethodSignature(Echo.class.getMethod("echoBack", new Class[] {String.class}));
+        assertTrue(sig.equals(sig));
+        assertFalse(sig.equals("echoBack"));
+        assertEquals(sig, new MethodSignature(Echo.class.getMethod("echoBack", new Class[] {String.class})));
+        assertEquals(sig, new MethodSignature(DuplicateEcho.class.getMethod("echoBack", new Class[] {String.class})));
+        assertFalse(sig.equals(new MethodSignature(Echo.class.getMethod("echoBack", new Class[] {String.class, String.class}))));
+        assertFalse(sig.equals(new MethodSignature(Echo.class.getMethod("echo", new Class[] {}))));
     }
 }



Mime
View raw message