commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcar...@apache.org
Subject svn commit: r326263 - in /jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy: ProxyUtils.java provider/CloningProvider.java
Date Tue, 18 Oct 2005 21:51:00 GMT
Author: jcarman
Date: Tue Oct 18 14:50:56 2005
New Revision: 326263

URL: http://svn.apache.org/viewcvs?rev=326263&view=rev
Log:
Fixing Checkstyle Errors.

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/provider/CloningProvider.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=326263&r1=326262&r2=326263&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
Tue Oct 18 14:50:56 2005
@@ -19,10 +19,8 @@
 import org.apache.commons.proxy.exception.ProxyFactoryException;
 import org.apache.commons.proxy.invoker.NullInvoker;
 
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
 import java.util.LinkedList;
+import java.util.List;
 
 /**
  * @author James Carman
@@ -33,7 +31,6 @@
 //----------------------------------------------------------------------------------------------------------------------
 // Fields
 //----------------------------------------------------------------------------------------------------------------------
-
     public static final String PROXY_FACTORY_PROPERTY = "commons-proxy.factory";
     public static final Object[] EMPTY_ARGUMENTS = new Object[0];
     public static final Class[] EMPTY_ARGUMENT_TYPES = new Class[0];
@@ -75,8 +72,8 @@
      * its hierarchy up. Then each superclass is considered in the same way. Later duplicates
are ignored, so the order
      * is maintained.</p>
      * <p/>
-     * <b>Note</b>: Implementation of this method was "borrowed" from <a href="http://jakarta.apache.org/commons/lang/">Jakarta
-     * Commons Lang</a> to avoid a dependency. </p>
+     * <b>Note</b>: Implementation of this method was "borrowed" from
+     * <a href="http://jakarta.apache.org/commons/lang/">Jakarta Commons Lang</a>
to avoid a dependency.</p>
      *
      * @param cls the class to look up, may be <code>null</code>
      * @return an array of {@link Class} objects representing all interfaces implemented
by the given class and its
@@ -129,14 +126,13 @@
     }
 
     /**
-     * Returns an appropriate {@link ProxyFactory} implementation for the current environment.
-     * The implementation class search order is as follows:
-     * <ul>
-     *  <li>Try to use the type indicated by the system property "commons-proxy.factory"</li>
-     *  <li>Try to use {@link org.apache.commons.proxy.factory.javassist.JavassistProxyFactory}</li>
-     *  <li>Try to use {@link org.apache.commons.proxy.factory.cglib.CglibProxyFactory}</li>
-     *  <li>Default to {@link org.apache.commons.proxy.factory.reflect.ReflectionProxyFactory}
(should always be available)</li>
-     * </ul>
+     * Returns an appropriate {@link ProxyFactory} implementation for the current environment.
The implementation class
+     * search order is as follows: <ul> <li>Try to use the type indicated by
the system property
+     * "commons-proxy.factory"</li> <li>Try to use
+     * {@link org.apache.commons.proxy.factory.javassist.JavassistProxyFactory}</li>
+     * <li>Try to use {@link org.apache.commons.proxy.factory.cglib.CglibProxyFactory}</li>
<li>Default to {@link
+     * org.apache.commons.proxy.factory.reflect.ReflectionProxyFactory} (should always be
available)</li> </ul>
+     *
      * @param classLoader the class loader to use to instantiate the proxy factory
      * @return an appropriate {@link ProxyFactory} implementation for the current environment
      */
@@ -159,16 +155,15 @@
     }
 
     /**
-     * Returns an appropriate {@link ProxyFactory} implementation for the current environment.
-     * The implementation class search order is as follows:
-     * <ul>
-     *  <li>Try to the type indicated by the system property "commons-proxy.factory"</li>
-     *  <li>Try to use {@link org.apache.commons.proxy.factory.javassist.JavassistProxyFactory}</li>
-     *  <li>Try to use {@link org.apache.commons.proxy.factory.cglib.CglibProxyFactory}</li>
-     *  <li>Default to {@link org.apache.commons.proxy.factory.reflect.ReflectionProxyFactory}
(should always be available)</li>
-     * </ul>
-     * <p>
+     * Returns an appropriate {@link ProxyFactory} implementation for the current environment.
The implementation class
+     * search order is as follows: <ul> <li>Try to the type indicated by the
system property
+     * "commons-proxy.factory"</li> <li>Try to use
+     * {@link org.apache.commons.proxy.factory.javassist.JavassistProxyFactory}</li>
+     * <li>Try to use {@link org.apache.commons.proxy.factory.cglib.CglibProxyFactory}</li>
<li>Default to {@link
+     * org.apache.commons.proxy.factory.reflect.ReflectionProxyFactory} (should always be
available)</li> </ul>
+     * <p/>
      * <b>Note</b>: This implementation uses the current thread's context class
loader!
+     *
      * @return an appropriate {@link ProxyFactory} implementation for the current environment
      */
     public static ProxyFactory getProxyFactory()

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/CloningProvider.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/CloningProvider.java?rev=326263&r1=326262&r2=326263&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/CloningProvider.java
(original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/CloningProvider.java
Tue Oct 18 14:50:56 2005
@@ -20,8 +20,8 @@
 import org.apache.commons.proxy.ProxyUtils;
 import org.apache.commons.proxy.exception.ObjectProviderException;
 
-import java.lang.reflect.Method;
 import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
 
 /**
  * Merely calls <code>clone()</code> (reflectively) on the given {@link Cloneable}
object.
@@ -49,7 +49,8 @@
             }
             catch( NoSuchMethodException e )
             {
-                throw new ObjectProviderException( "Class " + cloneable.getClass().getName()
+ " does not have a public clone() method." );
+                throw new ObjectProviderException(
+                        "Class " + cloneable.getClass().getName() + " does not have a public
clone() method." );
             }
         }
         return cloneMethod;
@@ -63,11 +64,13 @@
         }
         catch( IllegalAccessException e )
         {
-            throw new ObjectProviderException( "Class " + cloneable.getClass().getName()
+ " does not have a public clone() method.", e );
+            throw new ObjectProviderException(
+                    "Class " + cloneable.getClass().getName() + " does not have a public
clone() method.", e );
         }
         catch( InvocationTargetException e )
         {
-            throw new ObjectProviderException( "Attempt to clone object of type " + cloneable.getClass().getName()
+ " threw an exception.", e );
+            throw new ObjectProviderException(
+                    "Attempt to clone object of type " + cloneable.getClass().getName() +
" threw an 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