Coverity issue 1116509 - Assigning the the new returned ResultSet to the rs variable in order to get it closed in the finally block

Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
This commit is contained in:
wilderrodrigues 2015-06-04 08:18:17 +02:00 committed by Daan Hoogland
parent abe0990259
commit c3b4c7a9cf

View File

@ -108,7 +108,7 @@ public class VersionDaoImpl extends GenericDaoBase<VersionVO, Long> implements V
rs.close();
pstmt.close();
pstmt = conn.prepareStatement("SELECT is_static_nat from firewall_rules");
pstmt.executeQuery();
rs = pstmt.executeQuery();
return "2.2.1";
} catch (final SQLException e) {
s_logger.debug("Assuming the exception means static_nat field doesn't exist in firewall_rules table, returning version 2.2.2");