billbarker    2005/07/21 21:16:25

  Modified:    jasper2/src/share/org/apache/jasper/compiler Generator.java
  Log:
  Return a custom tag to the pool when doEndTag returns SKIP_PAGE
  
  Submitted by: Jan
  
  Revision  Changes    Path
  1.242     +9 -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.241
  retrieving revision 1.242
  diff -u -r1.241 -r1.242
  --- Generator.java    21 Jul 2005 03:59:10 -0000      1.241
  +++ Generator.java    22 Jul 2005 04:16:24 -0000      1.242
  @@ -2281,8 +2281,15 @@
                   ".doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {");
               out.pushIndent();
               if(!n.implementsTryCatchFinally()) {
  -                out.printin(tagHandlerVar);
  -                out.println(".release();");
  +                if(isPoolingEnabled) {
  +                    out.printin(n.getTagHandlerPoolName());
  +                    out.print(".reuse(");
  +                    out.print(tagHandlerVar);
  +                    out.println(");");
  +                } else {
  +                    out.printin(tagHandlerVar);
  +                    out.println(".release();");
  +                }
               }
               if (isTagFile || isFragment) {
                   out.printil("throw new SkipPageException();");
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to