----- Original Message ----- From: "Jan Luehe" <[EMAIL PROTECTED]>
To: "Tomcat Developers List" <tomcat-dev@jakarta.apache.org>
Sent: Thursday, July 21, 2005 6:24 PM
Subject: Re: cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Generator.java


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:


Yeah, but but the previous code was simply throwing the tag away on SKIP_PAGE (at least for non-TCF tags), and I didn't want to dig to find out if it was doing it for a reason (especially since SKIP_PAGE happens almost never :). I figured that if we're going to throw it away, we should at least call release on it first :).

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






This message is intended only for the use of the person(s) listed above as the 
intended recipient(s), and may contain information that is PRIVILEGED and 
CONFIDENTIAL.  If you are not an intended recipient, you may not read, copy, or 
distribute this message or any attachment. If you received this communication 
in error, please notify us immediately by e-mail and then delete all copies of 
this message and any attachments.

In addition you should be aware that ordinary (unencrypted) e-mail sent through 
the Internet is not secure. Do not send confidential or sensitive information, 
such as social security numbers, account numbers, personal identification 
numbers and passwords, to us via ordinary (unencrypted) e-mail.


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

Reply via email to