Add Remy's NPE fix to trunk.
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 3 May 2008 10:28:51 +0000 (10:28 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 3 May 2008 10:28:51 +0000 (10:28 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@653038 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/el/lang/ELSupport.java

index 3b9fca9..5bddf4f 100644 (file)
@@ -341,7 +341,7 @@ public class ELSupport {
     public final static Object coerceToType(final Object obj, final Class type)
             throws IllegalArgumentException {
         if (type == null || Object.class.equals(type) ||
-                type.equals(obj.getClass())) {
+                (obj != null && type.equals(obj.getClass()))) {
             return obj;
         }
         if (String.class.equals(type)) {