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: [EMAIL PROTECTED] > Subject: cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Node.java > To: [EMAIL PROTECTED] > Delivered-to: mailing list [EMAIL PROTECTED] > Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm > X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > List-Post: <mailto:[EMAIL PROTECTED]> > List-Subscribe: <mailto:[EMAIL PROTECTED]> > List-Unsubscribe: <mailto:[EMAIL PROTECTED]> > List-Help: <mailto:[EMAIL PROTECTED]> > 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:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>