[ 
https://issues.apache.org/struts/browse/STR-3021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40769
 ] 

Thomas Wilhelm commented on STR-3021:
-------------------------------------

Hi Henri,

looks okay. The only thing I don't like is the method call outside the 
try/catch and the return from within the method. Both make the method, that is 
actually quite simple, harder to read and understand than is necessary.
I would rather extend the static block were the inlcude method is obtained to 
check wether it is accessible (inlcude.isAccessible). If not this could be 
logged once and inlcude be set to null. This would allow the actuall doInlcude 
method to be implemented as I suggested.
You could as well go with your suggestion which will do the job, just I feel it 
looks to complicated and more error-prone if changed later on.

Regards, Thomas

> Tiles insert is evaluated twice if JSP error occures
> ----------------------------------------------------
>
>                 Key: STR-3021
>                 URL: https://issues.apache.org/struts/browse/STR-3021
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Tiles
>    Affects Versions: 1.3.5
>         Environment: Tomcat 5.0
>            Reporter: Thomas Wilhelm
>             Fix For: 1.3.9, 1.4.0
>
>
> If an Exception is thrown in a tiles-included JSP the surrounding 
> tiles-insert is processes twice. This most presumably due to a bug in 
> TilesUtilImpl#doInclude(String uri, PageContext pageContext, boolean flush) 
> where the InvocationTargetException is handled incorrectly. Every exception 
> thrown from the executed inlcude-method will be throw wrapped into a 
> InvocationTargetException so that include-method as well as 
> pageContext.include(uri) is executed everytime a JSP-Error occures during an 
> inlcude.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to