Issue Details (XML | Word | Printable)

Key: DERBY-3695
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Knut Anders Hatlen
Reporter: Knut Anders Hatlen
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Derby

NullPointerException when invoking statement event listeners if one of the listeners is null

Created: 28/May/08 02:03 PM   Updated: 04/May/09 06:22 PM
Return to search
Component/s: JDBC, Network Client
Affects Version/s: 10.4.1.3
Fix Version/s: 10.4.2.0, 10.5.1.1

Time Tracking:
Not Specified

File Attachments:
  Size
File Licensed for inclusion in ASF works d3695.diff 2008-05-28 09:15 PM Knut Anders Hatlen 3 kB
File Licensed for inclusion in ASF works d3695.stat 2008-05-28 09:15 PM Knut Anders Hatlen 0.2 kB
Text File Licensed for inclusion in ASF works repro.diff 2008-05-28 02:05 PM Knut Anders Hatlen 1 kB
Issue Links:
Incorporates
 

Resolution Date: 09/Jun/08 01:46 PM


 Description  « Hide
If PooledConnection.addStatementEventListener() is called with a null argument, the client driver throws a NullPointerException when the listeners are invoked. Embedded does not throw an exception.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Knut Anders Hatlen added a comment - 28/May/08 02:05 PM
Attaching patch which adds a JUnit test case that reproduces the problem.

Knut Anders Hatlen added a comment - 28/May/08 09:15 PM
The attached patch adds a null check in Client{XA,Pooled}Connection40.addStatementEventListener() and makes the test case in repro.diff pass.

Knut Anders Hatlen added a comment - 28/May/08 09:17 PM
All the regression tests passed with d3695.diff.

Knut Anders Hatlen added a comment - 29/May/08 11:14 AM
Committed revision 661292.

I noticed that addConnectionEventListener() has the same mismatch between embedded and client, so I'll leave the issue open until that has been fixed too.

Kristian Waagan added a comment - 03/Jun/08 12:58 PM
I noticed that the remaining work mentioned for this issue, can be fixed under DERBY-3307.
Added link.

Knut Anders Hatlen added a comment - 09/Jun/08 01:46 PM
Merged to 10.4 and committed revision 664708.

I'm closing the issue since the remaining work can be performed as part of DERBY-3307.