commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Olliver" <>
Subject [DBCP] DelegatingResultSet.close() -> NullPointerException
Date Mon, 16 Sep 2002 23:19:27 GMT
DBCP v1.0
I have had to make a quick fix to DelegatingResultSet to fix a problem.
It is the 'wrong fix' but it keeps things working for me, until I have the
correct fix.

I use a connection to execute a query that returns no resultset, however I
still get a non-null DelegatingResltSet returned, containing a null
resultset as instance variable '_res'.

Calling .close() throws a NullPointerException, however as a 'user' of the
datasource there is no way of checking the state of private variabe '_res'.

I have added a check to the close method:

if (_res != null) _res.close;

But actually the DelegatingResultSet should never be created in the first
place, the stmt.execute() method should just return null.


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
Version: 6.0.381 / Virus Database: 214 - Release Date: 02/08/2002

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message