Bill,

[EMAIL PROTECTED] wrote:
> billbarker    2005/07/20 20:59:10
> 
>   Modified:    jasper2/src/share/org/apache/jasper/compiler Generator.java
>   Log:
>   Make certain that release is called for custom tags when tag-pooling is 
> disabled.
>   
>   Fix for Bug #35696
>   
>   Revision  Changes    Path
>   1.241     +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.240
>   retrieving revision 1.241
>   diff -u -r1.240 -r1.241
>   --- Generator.java  5 Apr 2005 23:14:43 -0000       1.240
>   +++ Generator.java  21 Jul 2005 03:59:10 -0000      1.241
>   @@ -2278,15 +2278,19 @@
>                out.printin("if (");
>                out.print(tagHandlerVar);
>                out.println(
>   -                ".doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)");
>   +                ".doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) 
> {");
>                out.pushIndent();
>   +            if(!n.implementsTryCatchFinally()) {
>   +                out.printin(tagHandlerVar);
>   +                out.println(".release();");
>   +            }

I believe the above 4 added lines need to be replaced with this:

    +            if (!n.implementsTryCatchFinally()) {
    +
    +                if (isPoolingEnabled) {
    +                    out.printin(n.getTagHandlerPoolName());
    +                    out.print(".reuse(");
    +                    out.print(tagHandlerVar);
    +                    out.println(");");
    +                } else {
    +                    out.printin(tagHandlerVar);
    +                    out.println(".release();");
    +                }
    +            }


Jan


>                if (isTagFile || isFragment) {
>                    out.printil("throw new SkipPageException();");
>                } else {
>                    out.printil((methodNesting > 0) ? "return true;" : 
> "return;");
>                }
>                out.popIndent();
>   -
>   +            out.printil("}");
>                // Synchronize AT_BEGIN scripting variables
>                syncScriptingVars(n, VariableInfo.AT_BEGIN);
>    
>   @@ -2317,6 +2321,9 @@
>                    out.print(".reuse(");
>                    out.print(tagHandlerVar);
>                    out.println(");");
>   +            } else {
>   +                out.printin(tagHandlerVar);
>   +                out.println(".release();");
>                }
>    
>                if (n.implementsTryCatchFinally()) {
>   
>   
>   
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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

Reply via email to