Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
private void closeStatementIfNeeded() throws SQLException { try { if (stmtHandle != null) { TCloseOperationReq closeReq = new TCloseOperationReq(stmtHandle); TCloseOperationResp closeResp = client.CloseOperation(closeReq); Utils.verifySuccessWithInfo(closeResp.getStatus()); stmtHandle = null; } } catch (SQLException e) { throw e; } catch (Exception e) { throw new SQLException("Failed to close statement", "08S01", e); } } void closeClientOperation() throws SQLException { closeStatementIfNeeded(); isQueryClosed = true; stmtHandle = null; }
verifySuccessWithInfo throws an Exception if it finds an error code and therefore leapfrogs over setting the statement handle to null (twice). Probably not what is intended since the original author(s) are tried twice to null it out.
Attachments
Issue Links
- links to