VCreateFromShipment:
* fix indentation (CTRL-I) * proper close ResultSet in finally block
This commit is contained in:
parent
f051858880
commit
02332db6db
|
@ -736,13 +736,13 @@ public class VCreateFromShipment extends VCreateFrom implements VetoableChangeLi
|
|||
sqlStmt.append("AND rl.C_Charge_ID IS NOT NULL");
|
||||
|
||||
PreparedStatement pstmt = null;
|
||||
|
||||
ResultSet rs = null;
|
||||
try
|
||||
{
|
||||
pstmt = DB.prepareStatement(sqlStmt.toString(), null);
|
||||
pstmt.setInt(1, M_RMA_ID);
|
||||
pstmt.setInt(2, M_RMA_ID);
|
||||
ResultSet rs = pstmt.executeQuery();
|
||||
rs = pstmt.executeQuery();
|
||||
|
||||
while (rs.next())
|
||||
{
|
||||
|
@ -761,7 +761,6 @@ public class VCreateFromShipment extends VCreateFrom implements VetoableChangeLi
|
|||
line.add(null); //8-invoice
|
||||
data.add(line);
|
||||
}
|
||||
rs.close();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -769,17 +768,8 @@ public class VCreateFromShipment extends VCreateFrom implements VetoableChangeLi
|
|||
}
|
||||
finally
|
||||
{
|
||||
if (pstmt != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
pstmt.close();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.severe("Could not close prepared statement");
|
||||
}
|
||||
}
|
||||
DB.close(rs, pstmt);
|
||||
rs = null; pstmt = null;
|
||||
}
|
||||
loadTableOIS(data);
|
||||
}
|
||||
|
@ -803,8 +793,8 @@ public class VCreateFromShipment extends VCreateFrom implements VetoableChangeLi
|
|||
*
|
||||
* @return true if saved
|
||||
*/
|
||||
protected boolean save() {
|
||||
|
||||
protected boolean save()
|
||||
{
|
||||
dataTable.stopEditor(true);
|
||||
log.config("");
|
||||
TableModel model = dataTable.getModel();
|
||||
|
@ -824,7 +814,8 @@ public class VCreateFromShipment extends VCreateFrom implements VetoableChangeLi
|
|||
log.config(inout + ", C_Locator_ID=" + M_Locator_ID);
|
||||
|
||||
// Lines
|
||||
for (int i = 0; i < rows; i++) {
|
||||
for (int i = 0; i < rows; i++)
|
||||
{
|
||||
if (((Boolean) model.getValueAt(i, 0)).booleanValue()) {
|
||||
// variable values
|
||||
BigDecimal QtyEntered = (BigDecimal) model.getValueAt(i, COL_QTY); // Qty
|
||||
|
|
Loading…
Reference in New Issue