IDEMPIERE-2649 Not properly closed ResultSet in M_PriceList_Create
This commit is contained in:
parent
821c8c3f5e
commit
27588c7801
|
@ -685,8 +685,12 @@ public class M_PriceList_Create extends SvrProcess {
|
|||
sqlpc.append(" WHERE s.T_Selection_ID=p.M_Product_ID");
|
||||
sqlpc.append(" AND s.AD_PInstance_ID=").append(m_AD_PInstance_ID + ")");
|
||||
|
||||
PreparedStatement ps = DB.prepareStatement(sqlpc.toString(), get_TrxName());
|
||||
ResultSet rs = ps.executeQuery();
|
||||
PreparedStatement ps = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try{
|
||||
ps = DB.prepareStatement(sqlpc.toString(), get_TrxName());
|
||||
rs = ps.executeQuery();
|
||||
while(rs.next())
|
||||
{
|
||||
int M_Product_ID = rs.getInt(MProductPrice.COLUMNNAME_M_Product_ID);
|
||||
|
@ -734,6 +738,12 @@ public class M_PriceList_Create extends SvrProcess {
|
|||
if (log.isLoggable(Level.FINE)) log.fine("Updated " + cntu);
|
||||
}
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
throw e;
|
||||
} finally {
|
||||
DB.close(rs, ps);
|
||||
rs = null; ps = null;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue