Source:
<code>private List<EncodingStatus> find(String query) throws StorageException { ArrayList<EncodingStatus> resultList; PreparedStatement s = null; ResultSet result = null; try { Connection conn = mysqlConnector.obtainSession(); s = conn.prepareStatement(query); result = s.executeQuery(); resultList = new ArrayList<>(); while (result.next()) { Long inodeId = result.getLong(INODE_ID); Long parityInodeId = result.getLong(PARITY_INODE_ID); Integer status = result.getInt(STATUS); String codec = result.getString(CODEC); Short targetReplication = result.getShort(TARGET_REPLICATION); Long statusModificationTime = result.getLong(STATUS_MODIFICATION_TIME); Integer parityStatus = result.getInt(PARITY_STATUS); Long parityStatusModificationTime = result.getLong(PARITY_STATUS_MODIFICATION_TIME); String parityFileName = result.getString(PARITY_FILE_NAME); int lostBlocks = result.getInt(LOST_BLOCKS); int lostParityBlocks = result.getInt(LOST_PARITY_BLOCKS); Boolean revoked = NdbBoolean.convert(result.getByte(REVOKED)); EncodingPolicy policy = new EncodingPolicy(codec, targetReplication); resultList.add(new EncodingStatus(inodeId, parityInodeId, EncodingStatus.Status.values()[status], EncodingStatus.ParityStatus.values()[parityStatus], policy, statusModificationTime, parityStatusModificationTime, parityFileName, lostBlocks, lostParityBlocks, revoked)); } } catch (SQLException ex) { throw HopsSQLExceptionHelper.wrap(ex); } finally { if (s != null) { try { s.close(); <START> } catch (SQLException ex) { <END> } } if (result != null) { try { result.close(); } catch (SQLException ex) { } } mysqlConnector.closeSession(); } return resultList; }</code><technical_language>exception issue</technical_language>

Target:
private List<EncodingStatus> find(String query) throws StorageException { ArrayList<EncodingStatus> resultList; PreparedStatement s = null; ResultSet result = null; try { Connection conn = mysqlConnector.obtainSession(); s = conn.prepareStatement(query); result = s.executeQuery(); resultList = new ArrayList<>(); while (result.next()) { Long inodeId = result.getLong(INODE_ID); Long parityInodeId = result.getLong(PARITY_INODE_ID); Integer status = result.getInt(STATUS); String codec = result.getString(CODEC); Short targetReplication = result.getShort(TARGET_REPLICATION); Long statusModificationTime = result.getLong(STATUS_MODIFICATION_TIME); Integer parityStatus = result.getInt(PARITY_STATUS); Long parityStatusModificationTime = result.getLong(PARITY_STATUS_MODIFICATION_TIME); String parityFileName = result.getString(PARITY_FILE_NAME); int lostBlocks = result.getInt(LOST_BLOCKS); int lostParityBlocks = result.getInt(LOST_PARITY_BLOCKS); Boolean revoked = NdbBoolean.convert(result.getByte(REVOKED)); EncodingPolicy policy = new EncodingPolicy(codec, targetReplication); resultList.add(new EncodingStatus(inodeId, parityInodeId, EncodingStatus.Status.values()[status], EncodingStatus.ParityStatus.values()[parityStatus], policy, statusModificationTime, parityStatusModificationTime, parityFileName, lostBlocks, lostParityBlocks, revoked)); } } catch (SQLException ex) { throw HopsSQLExceptionHelper.wrap(ex); } finally { if (s != null) { try { s.close(); } catch (SQLException ex) { LOG.warn("Exception when closing the PrepareStatement", ex); } } if (result != null) { try { result.close(); } catch (SQLException ex) { LOG.warn("Exception when closing the ResultSet", ex); } } mysqlConnector.closeSession(); } return resultList; }