commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1142215 - /commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/CallMethodRule.java
Date Sat, 02 Jul 2011 12:52:38 GMT
Author: simonetripodi
Date: Sat Jul  2 12:52:37 2011
New Revision: 1142215

URL: http://svn.apache.org/viewvc?rev=1142215&view=rev
Log:
even if it doesn't help fixing the NP_NULL_ON_SOME_PATH, at least it guarantees 'parameters[]'
array is not null

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=1142215&r1=1142214&r2=1142215&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 12:52:37 2011
@@ -394,7 +394,7 @@ public class CallMethodRule
         throws Exception
     {
         // Retrieve or construct the parameter values array
-        Object parameters[] = null;
+        Object[] parameters;
         if ( paramCount > 0 )
         {
             parameters = getDigester().popParams();
@@ -450,6 +450,7 @@ public class CallMethodRule
             // When paramCount is zero and paramTypes.length is zero it
             // means that we truly are calling a method with no parameters.
             // Nothing special needs to be done here.
+            parameters = new Object[0];
         }
 
         // Construct the parameter values array we will need



Mime
View raw message