BF [ 1874419 ] JDBC Statement not close in a finally block - fixed for MChangeLog

This commit is contained in:
teo_sarca 2008-02-04 21:09:33 +00:00
parent 8805fceef2
commit 751ef01796
1 changed files with 5 additions and 12 deletions

View File

@ -57,29 +57,22 @@ public class MChangeLog extends X_AD_ChangeLog
+ "WHERE t.AD_Table_ID=c.AD_Table_ID AND c.ColumnName='EntityType') "
+ "ORDER BY t.AD_Table_ID";
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
pstmt = DB.prepareStatement(sql, null);
ResultSet rs = pstmt.executeQuery();
rs = pstmt.executeQuery();
while (rs.next())
list.add(new Integer(rs.getInt(1)));
rs.close();
pstmt.close();
pstmt = null;
}
catch (Exception e)
{
s_log.log(Level.SEVERE, sql, e);
}
try
finally
{
if (pstmt != null)
pstmt.close();
pstmt = null;
}
catch (Exception e)
{
pstmt = null;
DB.close(rs, pstmt);
rs = null; pstmt = null;
}
// Convert to Array
s_changeLog = new int [list.size()];