tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: Modification of Jasper2's Generator.java
Date Wed, 01 May 2002 04:27:26 GMT

----- Original Message -----
From: "Denis Benoit" <benoitde@sympatico.ca>
To: <tomcat-dev@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:
<mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:tomcat-dev-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message