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 Thu, 25 Mar 2004 21:44:36 GMT
luehe       2004/03/25 13:44:35

  Modified:    jasper2/src/share/org/apache/jasper/compiler Generator.java
  Log:
  Fixed Bugzilla 27948 ("NPE with null fragment")
  
  Revision  Changes    Path
  1.228     +8 -2      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.227
  retrieving revision 1.228
  diff -u -r1.227 -r1.228
  --- Generator.java	24 Mar 2004 21:05:26 -0000	1.227
  +++ Generator.java	25 Mar 2004 21:44:35 -0000	1.228
  @@ -1986,12 +1986,15 @@
   
               n.setBeginJavaLine(out.getJavaLine());
   
  +            // Invoke fragment, unless fragment is null
  +            out.printin("if (");
  +            out.print(toGetterMethod(n.getTextAttribute("fragment")));
  +            out.println(" != null) {");
  +            out.pushIndent();
               // Copy virtual page scope of tag file to page scope of invoking
               // page
               out.printil(
                   "((org.apache.jasper.runtime.JspContextWrapper) this.jspContext).syncBeforeInvoke();");
  -
  -            // Invoke fragment
               String varReaderAttr = n.getTextAttribute("varReader");
               String varAttr = n.getTextAttribute("var");
               if (varReaderAttr != null || varAttr != null) {
  @@ -2020,6 +2023,9 @@
                   }
                   out.println(");");
               }
  +
  +            out.popIndent();
  +            out.printil("}");
   
               n.setEndJavaLine(out.getJavaLine());
           }
  
  
  

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