commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1103876 - /commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/binder/CallMethodBuilder.java
Date Mon, 16 May 2011 20:34:30 GMT
Author: simonetripodi
Date: Mon May 16 20:34:30 2011
New Revision: 1103876

URL: http://svn.apache.org/viewvc?rev=1103876&view=rev
Log:
fixed string type resolution

Modified:
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/binder/CallMethodBuilder.java

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/binder/CallMethodBuilder.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/binder/CallMethodBuilder.java?rev=1103876&r1=1103875&r2=1103876&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/binder/CallMethodBuilder.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/binder/CallMethodBuilder.java
Mon May 16 20:34:30 2011
@@ -78,14 +78,15 @@ public final class CallMethodBuilder
      */
     public CallMethodBuilder withParamTypes( String... paramTypeNames )
     {
+        Class<?>[] paramTypes = null;
         if ( paramTypeNames != null )
         {
-            this.paramTypes = new Class[paramTypeNames.length];
+            paramTypes = new Class<?>[paramTypeNames.length];
             for ( int i = 0; i < paramTypeNames.length; i++ )
             {
                 try
                 {
-                    this.paramTypes[i] = classLoader.loadClass( paramTypeNames[i] );
+                    paramTypes[i] = classLoader.loadClass( paramTypeNames[i] );
                 }
                 catch ( ClassNotFoundException e )
                 {
@@ -95,12 +96,8 @@ public final class CallMethodBuilder
                 }
             }
         }
-        else
-        {
-            this.paramTypes = null;
-        }
 
-        return this;
+        return withParamTypes( paramTypes );
     }
 
     /**
@@ -120,6 +117,10 @@ public final class CallMethodBuilder
         {
             this.paramCount = paramTypes.length;
         }
+        else
+        {
+            paramCount = 0;
+        }
 
         return this;
     }



Mime
View raw message