left out one db.close

This commit is contained in:
Redhuan D. Oon 2008-02-08 19:21:31 +00:00
parent b46a2dd4ed
commit 70159b94bf
1 changed files with 6 additions and 13 deletions

View File

@ -121,30 +121,23 @@ public class MAlert extends X_AD_Alert
+ "WHERE AD_Alert_ID=?";
ArrayList<MAlertRecipient> list = new ArrayList<MAlertRecipient>();
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
pstmt = DB.prepareStatement (sql, null);
pstmt.setInt (1, getAD_Alert_ID());
ResultSet rs = pstmt.executeQuery ();
rs = pstmt.executeQuery ();
while (rs.next ())
list.add (new MAlertRecipient (getCtx(), rs, null));
rs.close ();
pstmt.close ();
pstmt = null;
}
}
catch (Exception e)
{
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;
}
//
m_recipients = new MAlertRecipient[list.size ()];