tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r492182 - /tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java
Date Wed, 03 Jan 2007 15:33:49 GMT
Author: remm
Date: Wed Jan  3 07:33:48 2007
New Revision: 492182

URL: http://svn.apache.org/viewvc?view=rev&rev=492182
Log:
- Avoid NPE (quick fix).

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java?view=diff&rev=492182&r1=492181&r2=492182
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Generator.java Wed Jan  3 07:33:48
2007
@@ -2774,9 +2774,7 @@
                 StringBuffer sb = new StringBuffer(64);
 
                 TagAttributeInfo tai = attr.getTagAttributeInfo();
-                String type = tai.getTypeName();
-                String returnType = JspUtil.toJavaSourceTypeFromTld(attr
-                        .getExpectedTypeName());
+                String returnType = JspUtil.toJavaSourceTypeFromTld(attr.getExpectedTypeName());
 
                 // generate elContext reference
                 sb.append(getJspContextVar());
@@ -2807,7 +2805,7 @@
 
                 // depending on type
                 if (attr.isDeferredInput()
-                        || ValueExpression.class.getName().equals(type)) {
+                        || ((tai != null) && ValueExpression.class.getName().equals(tai.getTypeName())))
{
                     sb.append("new org.apache.jasper.el.JspValueExpression(");
                     sb.append(quote(mark));
                     sb.append(',');
@@ -2841,7 +2839,7 @@
                     }
                     attrValue = sb.toString();
                 } else if (attr.isDeferredMethodInput()
-                        || MethodExpression.class.getName().equals(type)) {
+                        || ((tai != null) && MethodExpression.class.getName().equals(tai.getTypeName())))
{
                     sb.append("new org.apache.jasper.el.JspMethodExpression(");
                     sb.append(quote(mark));
                     sb.append(',');



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message