ASF Bugzilla – Attachment 34540 Details for
Bug 60497
JSP custom tags returned to the tag pools to be reused without executing the doEndTag method
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Change reuse logic
reuse.patch (text/plain), 2.24 KB, created by
Remy Maucherat
on 2016-12-20 16:42:48 UTC
(
hide
)
Description:
Change reuse logic
Filename:
MIME Type:
Creator:
Remy Maucherat
Created:
2016-12-20 16:42:48 UTC
Size:
2.24 KB
patch
obsolete
>Index: java/org/apache/jasper/compiler/Generator.java >=================================================================== >--- java/org/apache/jasper/compiler/Generator.java (revision 1775085) >+++ java/org/apache/jasper/compiler/Generator.java (working copy) >@@ -2395,6 +2395,9 @@ > out.print(".get("); > out.print(tagHandlerClassName); > out.println(".class);"); >+ out.printin("boolean "); >+ out.print(n.getTagHandlerPoolName()); >+ out.println("_reused = false;"); > } else { > writeNewInstance(tagHandlerVar, tagHandlerClassName); > } >@@ -2600,21 +2603,34 @@ > out.printil("}"); > } > >- // Ensure clean-up takes place >- out.popIndent(); >- out.printil("} finally {"); >- out.pushIndent(); >+ // Print tag reuse > if (isPoolingEnabled && !(n.implementsJspIdConsumer())) { > out.printin(n.getTagHandlerPoolName()); > out.print(".reuse("); > out.print(tagHandlerVar); > out.println(");"); >- } else { >- out.printin(tagHandlerVar); >- out.println(".release();"); >- writeDestroyInstance(tagHandlerVar); >+ out.printin(n.getTagHandlerPoolName()); >+ out.println("_reused = true;"); > } >+ >+ // Ensure clean-up takes place > out.popIndent(); >+ out.printil("} finally {"); >+ out.pushIndent(); >+ if (isPoolingEnabled && !(n.implementsJspIdConsumer())) { >+ out.printin("if (!"); >+ out.print(n.getTagHandlerPoolName()); >+ out.println("_reused) {"); >+ out.pushIndent(); >+ } >+ out.printin(tagHandlerVar); >+ out.println(".release();"); >+ writeDestroyInstance(tagHandlerVar); >+ if (isPoolingEnabled && !(n.implementsJspIdConsumer())) { >+ out.popIndent(); >+ out.printil("}"); >+ } >+ out.popIndent(); > out.printil("}"); > > // Declare and synchronize AT_END scripting variables (must do this >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 60497
:
34534
|
34540
|
34543
|
34544