commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pro...@apache.org
Subject svn commit: r513425 - /jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/Introspector.java
Date Thu, 01 Mar 2007 18:18:38 GMT
Author: proyal
Date: Thu Mar  1 10:18:37 2007
New Revision: 513425

URL: http://svn.apache.org/viewvc?view=rev&rev=513425
Log:
avoid NPE when params[i] is null

Modified:
    jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/Introspector.java

Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/Introspector.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/Introspector.java?view=diff&rev=513425&r1=513424&r2=513425
==============================================================================
--- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/Introspector.java
(original)
+++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/Introspector.java
Thu Mar  1 10:18:37 2007
@@ -27,7 +27,7 @@
  * object for a particular class given the name of a method
  * and the parameters to the method in the form of an Object[]
  *
- * The first time the Introspector sees a 
+ * The first time the Introspector sees a
  * class it creates a class method map for the
  * class in question. Basically the class method map
  * is a Hashtable where Method objects are keyed by a
@@ -43,7 +43,7 @@
  * "method" + "java.lang.String" + "java.lang.StringBuffer"
  *
  * This mapping is performed for all the methods in a class
- * and stored for 
+ * and stored for
  * @since 1.0
  * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
  * @author <a href="mailto:bob@werken.com">Bob McWhirter</a>
@@ -57,7 +57,7 @@
      *  if interested.
      */
 
-    public static final String CACHEDUMP_MSG = 
+    public static final String CACHEDUMP_MSG =
         "Introspector : detected classloader change. Dumping cache.";
 
     /**
@@ -72,7 +72,7 @@
     public Introspector(Log logger) {
         this.rlog = logger;
     }
-   
+
     /**
      * Gets the method defined by <code>name</code> and
      * <code>params</code> for the Class <code>c</code>.
@@ -104,12 +104,12 @@
                 if (i > 0) {
                     msg.append(", ");
                 }
-                
-                msg.append(params[i].getClass().getName());
+
+                msg.append(null == params[i] ? "null" : params[i].getClass().getName());
             }
-            
+
             msg.append(") for class ").append(c.getName());
-            
+
             rlog.error(msg.toString());
         }
 



---------------------------------------------------------------------
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