Author: simonetripodi
Date: Sat Jul  2 19:14:29 2011
New Revision: 1142271

URL: http://svn.apache.org/viewvc?rev=1142271&view=rev
Log:
filled arrays in a smartest way

Modified:
    
commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/CallMethodRule.java

Modified: 
commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/CallMethodRule.java
URL: 
http://svn.apache.org/viewvc/commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/CallMethodRule.java?rev=1142271&r1=1142270&r2=1142271&view=diff
==============================================================================
--- 
commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/CallMethodRule.java
 (original)
+++ 
commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/CallMethodRule.java
 Sat Jul  2 19:14:29 2011
@@ -20,6 +20,7 @@ package org.apache.commons.digester3;
  */
 
 import static java.lang.String.format;
+import static java.util.Arrays.fill;
 import static org.apache.commons.beanutils.ConvertUtils.convert;
 import static org.apache.commons.beanutils.MethodUtils.invokeExactMethod;
 import static org.apache.commons.beanutils.MethodUtils.invokeMethod;
@@ -123,10 +124,7 @@ public class CallMethodRule
         else
         {
             this.paramTypes = new Class[paramCount];
-            for ( int i = 0; i < this.paramTypes.length; i++ )
-            {
-                this.paramTypes[i] = String.class;
-            }
+            fill( this.paramTypes, String.class );
         }
     }
 
@@ -191,10 +189,7 @@ public class CallMethodRule
         if ( paramTypes == null )
         {
             this.paramTypes = new Class[paramCount];
-            for ( int i = 0; i < this.paramTypes.length; i++ )
-            {
-                this.paramTypes[i] = String.class;
-            }
+            fill( this.paramTypes, String.class );
         }
         else
         {
@@ -246,10 +241,7 @@ public class CallMethodRule
         if ( paramTypes == null )
         {
             this.paramTypes = new Class[paramCount];
-            for ( int i = 0; i < this.paramTypes.length; i++ )
-            {
-                this.paramTypes[i] = String.class;
-            }
+            fill( this.paramTypes, String.class );
         }
         else
         {


Reply via email to