commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: [VOTE] Release of DbUtils 1.2 RC1
Date Wed, 11 Mar 2009 02:03:52 GMT
I think there are some problems with thread-safety.

QueryRunner Javadoc says the class is thread-safe. However it has a
protected mutable variable DataSource which can also be set/got via
public methods. If one thread sets the variable, another may not see
the correct value, so the class is not thread-safe.

ArrayHandler has a non-final instance variable "convert" which could
be made final.
Likewise BasicRowProcessor. This would make the classes immutable, and
therefore thread-safe. It's not clear if they are thread-safe without
making the variables final.

The same applies to most of the handlers - they have instance
variables which could be made final.

However, the KeyedHandler instance variables are protected, rather
than private, so making them final would perhaps break some programs.
I don't think the class can be thread-safe at present.

I'll raise a JIRA with suggested patches.

On 11/03/2009, Dan Fabulich <dan@fabulich.com> wrote:
> sebb wrote:
>
>
> > -0.5 because the unit tests seem wrong.
> >
>
>  I've incorporated your feedback in revision 752322.  For the record, all of
> those tests predate DbUtils 1.1; we haven't touched them in years.
>
>  I think these test changes are pretty minor; not worth an additional RC.
> What do you think?
>
>  -Dan
>
>
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>  For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message