tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler JspDocumentParser.java
Date Mon, 21 Apr 2003 23:26:50 GMT
luehe       2003/04/21 16:26:50

  Modified:    jasper2/src/share/org/apache/jasper/compiler
                        JspDocumentParser.java
  Log:
  Due to a bug in the underlying SAX parser, the XML attributes must be
  enumerated in descending order. When enumerated in ascending order,
  qName may be null, causing NPE. (This sucks!)
  
  Revision  Changes    Path
  1.56      +8 -5      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java
  
  Index: JspDocumentParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- JspDocumentParser.java	21 Apr 2003 17:19:47 -0000	1.55
  +++ JspDocumentParser.java	21 Apr 2003 23:26:50 -0000	1.56
  @@ -710,8 +710,11 @@
   	boolean isTaglib = false;
   
           if (attrs != null) {
  -	    int len = attrs.getLength();
  -	    for (int i=0; i<len; i++) {
  +	    /*
  +	     * Notice that due to a bug in the underlying SAX parser, the
  +	     * attributes must be enumerated in descending order. 
  +	     */
  +	    for (int i=attrs.getLength()-1; i>=0; i--) {
   		isTaglib = false;
   		String qName = attrs.getQName(i);
   		if (!qName.startsWith("xmlns")) {
  
  
  

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


Mime
View raw message