You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Denis Benoit <be...@sympatico.ca> on 2002/05/01 05:52:25 UTC
Modification of Jasper2's Generator.java
I was reading Remy's comments on the Generator.java patch and I noted two
things:
1. It could be possible to not always create a Vector and a BitSet if we
declare them as instance variables instead of local variables. This
way we could defer their initialisation in the addTagToVector method;
2. It was not necessary to call the addTagToVector method in the
generateCustomEnd. In this method we are merely accessing the tag whose
index was popped from the stack. Since we call addTagToVector when
we begin the pseudo "try" block, it follows that the tag is already
in the vector when we reach the pseudo "finally" block;
Thanks!
--
Denis Benoit
benoitde@sympatico.ca
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Modification of Jasper2's Generator.java
Posted by Bill Barker <wb...@wilshire.com>.
----- Original Message -----
From: "Denis Benoit" <be...@sympatico.ca>
To: <to...@jakarta.apache.org>
Sent: Tuesday, April 30, 2002 8:52 PM
Subject: Modification of Jasper2's Generator.java
> I was reading Remy's comments on the Generator.java patch and I noted two
> things:
>
> 1. It could be possible to not always create a Vector and a BitSet if we
> declare them as instance variables instead of local variables. This
> way we could defer their initialisation in the addTagToVector method;
>
No, if they are instance variables, then you quickly fall into thread-safety
hell. If you have 20 different people accessing the same JSP page at the
same time, then you have no clue as to which tag is in the Vector.
> 2. It was not necessary to call the addTagToVector method in the
> generateCustomEnd. In this method we are merely accessing the tag
whose
> index was popped from the stack. Since we call addTagToVector when
> we begin the pseudo "try" block, it follows that the tag is already
> in the vector when we reach the pseudo "finally" block;
>
> Thanks!
>
> --
> Denis Benoit
> benoitde@sympatico.ca
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>