Bug #70882 ResultSetImpl.realClose(boolean) swallows unnecessary exception
Submitted: 11 Nov 2013 18:44 Modified: 7 Feb 2014 10:53
Reporter: Thomas Manville (OCA) Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / J Severity:S4 (Feature request)
Version:5.1.27 OS:Linux (Ubuntu 13.04)
Assigned to: Assigned Account CPU Architecture:Any

[11 Nov 2013 18:44] Thomas Manville
Description:
ResultSetImpl::realClose() calls ResultSetImpl::checkClosed() and swallows the exeption if it has already been closed.  

How to repeat:
Close a resultsSet whose PreparedStatement is already close; Close a result set that is already close.

Suggested fix:
Rather than call ResultSetImpl::checkClosed() and swallow the exception, perform the same check performed by checkClosed().
[18 Nov 2013 11:46] Alexander Soklakov
Hi Thomas,

Thanks for this report, it looks reasonable.
[18 Nov 2013 18:23] Thomas Manville
Possible fix

Attachment: connectorJ.patch (text/x-patch), 658 bytes.

[29 Jan 2014 18:28] Thomas Manville
Prevent unnecessary exception

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: connectorJ.patch (text/x-patch), 658 bytes.

[31 Jan 2014 7:59] Alexander Soklakov
Thanks Thomas!

Your patch is good and we accept it. We just need to fix the same issue in some other places too.
[6 Feb 2014 13:25] Alexander Soklakov
Posted by developer:
 
Actually it's a duplicate of Bug#67318, let's proceed there.