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 Generator.java
Date Wed, 04 Sep 2002 16:39:23 GMT
luehe       2002/09/04 09:39:23

  Modified:    jasper2/src/share/org/apache/jasper/compiler Generator.java
  Log:
  Fixed 12283: If a tag implementing SimpleTag is invoked within a tag file a
               NPE is thrown
  
  Revision  Changes    Path
  1.88      +11 -7     jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java
  
  Index: Generator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v
  retrieving revision 1.87
  retrieving revision 1.88
  diff -u -r1.87 -r1.88
  --- Generator.java	31 Aug 2002 03:37:16 -0000	1.87
  +++ Generator.java	4 Sep 2002 16:39:23 -0000	1.88
  @@ -437,7 +437,7 @@
       }
       
       /**
  -     * Generates the beginning of the static portion of the servelet.
  +     * Generates the beginning of the static portion of the servlet.
        */
       private void generatePreamble(Node.Nodes page) throws JasperException {
   
  @@ -2878,8 +2878,10 @@
   	if (gen.ctxt.isTagFile()) {
   	    TagInfo tagInfo = gen.ctxt.getTagInfo();
   	    gen.generateTagHandlerPreamble(tagInfo, page);
  +	    gen.fragmentHelperClass.generatePreamble();
   	    page.visit(gen.new GenerateVisitor(gen.ctxt.isTagFile(), out,
  -					       gen.methodsBuffer, null,
  +					       gen.methodsBuffer,
  +					       gen.fragmentHelperClass,
   					       tagInfo));
   	    gen.generateTagHandlerPostamble(  tagInfo );
   	} else {
  @@ -3169,12 +3171,14 @@
   	if (attrInfos != null) {
   	    for (int i=0; i<attrInfos.length; i++) {
   		String attrName = attrInfos[i].getName();
  -                out.println("if( " + toGetterMethod(attrName) + " != null ) " );
  -                out.print("pageContext.setAttribute(");
  +                out.printil("if( " + toGetterMethod(attrName) + " != null ) " );
  +		out.pushIndent();
  +                out.printin("pageContext.setAttribute(");
   		out.print(quote(attrName));
   		out.print(", ");
   		out.print(toGetterMethod(attrName));
   		out.println(");");
  +		out.popIndent();
   	    }
   	}
   
  
  
  

--
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