commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Olliver" <a...@unfortu.net>
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.

bests

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


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


Mime
View raw message