tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kin-Man Chung <Kin-Man.Ch...@Eng.Sun.COM>
Subject Re: cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Node.java
Date Thu, 04 Apr 2002 18:28:49 GMT
Remy,

I afraid that this patch won't work, because you are initializing
CustomTag.JspAttrs in the constructor, which is too early.
CustomTag.JspAttrs is currently set in Validator, after tld is consulted
to see if the tag attribute can take a request time expression;
and if so, extracts the string between '<%=' and '%>' etc.

Do you have a test case that causes a NPE?

> Date: Thu, 04 Apr 2002 07:03:55 +0000
> From: remm@apache.org
> Subject: cvs commit: 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Node.java
> To: jakarta-tomcat-jasper-cvs@apache.org
> Delivered-to: mailing list tomcat-dev@jakarta.apache.org
> Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm
> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
> List-Post: <mailto:tomcat-dev@jakarta.apache.org>
> List-Subscribe: <mailto:tomcat-dev-subscribe@jakarta.apache.org>
> List-Unsubscribe: <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> List-Help: <mailto:tomcat-dev-help@jakarta.apache.org>
> List-Id: "Tomcat Developers List" <tomcat-dev.jakarta.apache.org>
> 
> remm        02/04/03 23:03:54
> 
>   Modified:    jasper2/src/share/org/apache/jasper/compiler Node.java
>   Log:
>   - Fix NPE caused by JSP attributes field not being populated.
>   
>   Revision  Changes    Path
>   1.2       +8 -3      
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Node.java
>   
>   Index: Node.java
>   ===================================================================
>   RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Nod
e.java,v
>   retrieving revision 1.1
>   retrieving revision 1.2
>   diff -u -r1.1 -r1.2
>   --- Node.java	28 Mar 2002 18:46:16 -0000	1.1
>   +++ Node.java	4 Apr 2002 07:03:54 -0000	1.2
>   @@ -1,7 +1,7 @@
>    /*
>   - * $Header: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Nod
e.java,v 1.1 2002/03/28 18:46:16 kinman Exp $
>   - * $Revision: 1.1 $
>   - * $Date: 2002/03/28 18:46:16 $
>   + * $Header: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Nod
e.java,v 1.2 2002/04/04 07:03:54 remm Exp $
>   + * $Revision: 1.2 $
>   + * $Date: 2002/04/04 07:03:54 $
>     *
>     * ====================================================================
>     * 
>   @@ -663,6 +663,11 @@
>    	    this.name = name;
>    	    this.prefix = prefix;
>    	    this.shortName = shortName;
>   +            jspAttrs = new JspAttribute[attrs.getLength()];
>   +            for (int i = 0; i < attrs.getLength(); i++) {
>   +                jspAttrs[i] = new JspAttribute
>   +                    (attrs.getLocalName(i), attrs.getValue(i), false);
>   +            }
>    	}
>    
>    	public void accept(Visitor v) throws JasperException {
>   
>   
>   
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>
> 


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


Mime
View raw message