left out one db.close
This commit is contained in:
parent
b46a2dd4ed
commit
70159b94bf
|
|
@ -121,30 +121,23 @@ public class MAlert extends X_AD_Alert
|
||||||
+ "WHERE AD_Alert_ID=?";
|
+ "WHERE AD_Alert_ID=?";
|
||||||
ArrayList<MAlertRecipient> list = new ArrayList<MAlertRecipient>();
|
ArrayList<MAlertRecipient> list = new ArrayList<MAlertRecipient>();
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
|
ResultSet rs = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
pstmt = DB.prepareStatement (sql, null);
|
pstmt = DB.prepareStatement (sql, null);
|
||||||
pstmt.setInt (1, getAD_Alert_ID());
|
pstmt.setInt (1, getAD_Alert_ID());
|
||||||
ResultSet rs = pstmt.executeQuery ();
|
rs = pstmt.executeQuery ();
|
||||||
while (rs.next ())
|
while (rs.next ())
|
||||||
list.add (new MAlertRecipient (getCtx(), rs, null));
|
list.add (new MAlertRecipient (getCtx(), rs, null));
|
||||||
rs.close ();
|
}
|
||||||
pstmt.close ();
|
|
||||||
pstmt = null;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
log.log(Level.SEVERE, sql, e);
|
log.log(Level.SEVERE, sql, e);
|
||||||
}
|
}
|
||||||
try
|
finally
|
||||||
{
|
{
|
||||||
if (pstmt != null)
|
DB.close(rs, pstmt);
|
||||||
pstmt.close ();
|
rs = null; pstmt = null;
|
||||||
pstmt = null;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
pstmt = null;
|
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
m_recipients = new MAlertRecipient[list.size ()];
|
m_recipients = new MAlertRecipient[list.size ()];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue