https://bz.apache.org/bugzilla/show_bug.cgi?id=69333

--- Comment #1 from Christopher Schultz <ch...@christopherschultz.net> ---
(In reply to John Engebretson from comment #0)
> public static void releaseTag(Tag tag, InstanceManager instanceManager,
> boolean reused) {
>   // Caller ensures pool is non-null if reuse is true
>   if (!reused) {
>     releaseTag(tag, instanceManager);
>   }
> }
> 
> The generated JSP code includes the hard-coded value "false", which
> short-circuits the releaseTag method and guarantees the line achieves
> nothing.

!false is ... false? And the body of the if-block is skipped?

Maybe I'm misunderstanding what you are saying.

> Put it all together and this is an unnecessary line of code, repeated over
> and over, that has a non-zero impact.  This analysis applies only when the
> generated argument is "false", and this line is clearly required when set to
> "true".
> 
> Preferred solution is to remove the line in all cases when the value is
> "false".  If the try/finally can be simultaneously removed, that's even
> better, and removes yet more instructions.

I think I would agree, as long as the logic is flipped-around.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to