IDEMPIERE-3798:Move iDempiere default branch to openjdk 10 (warning deprecated of constructer)

constructer with expression
This commit is contained in:
hieplq 2018-10-24 09:17:22 +07:00
parent 1b05e022d0
commit 733ad1c89f
16 changed files with 61 additions and 61 deletions

View File

@ -1821,10 +1821,10 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
Integer lines = new Integer(rs.getInt(1));
arguments[0] = lines;
// {1} - Line net
Double net = new Double(rs.getDouble(2));
Double net = Double.valueOf(rs.getDouble(2));
arguments[1] = net;
// {2} - Line net
Double total = new Double(rs.getDouble(3));
Double total = Double.valueOf(rs.getDouble(3));
arguments[2] = total;
filled = true;
}
@ -1908,16 +1908,16 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
Integer lines = new Integer(rs.getInt(1));
arguments[0] = lines;
// {1} - Line toral
Double lineTotal = new Double(rs.getDouble(3));
Double lineTotal = Double.valueOf(rs.getDouble(3));
arguments[1] = lineTotal;
// {2} - Grand total (including tax, etc.)
Double grandTotal = new Double(rs.getDouble(4));
Double grandTotal = Double.valueOf(rs.getDouble(4));
arguments[2] = grandTotal;
// {3} - Currency
String currency = rs.getString(2);
arguments[3] = currency;
// (4) - Grand total converted to Euro
Double grandEuro = new Double(rs.getDouble(5));
Double grandEuro = Double.valueOf(rs.getDouble(5));
arguments[4] = grandEuro;
filled = true;
}
@ -1982,7 +1982,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
Integer lines = new Integer(rs.getInt(1));
arguments[0] = lines;
// {1} - Line total
Double total = new Double(rs.getDouble(2));
Double total = Double.valueOf(rs.getDouble(2));
arguments[1] = total;
// {3} - Currency
arguments[2] = " ";

View File

@ -131,11 +131,11 @@ public class MQuery implements Serializable
Double P_Number = null;
double d = rs.getDouble(4);
if (!rs.wasNull())
P_Number = new Double(d);
P_Number = Double.valueOf(d);
Double P_Number_To = null;
d = rs.getDouble(5);
if (!rs.wasNull())
P_Number_To = new Double(d);
P_Number_To = Double.valueOf(d);
//
Timestamp P_Date = rs.getTimestamp(6);
Timestamp P_Date_To = rs.getTimestamp(7);

View File

@ -148,7 +148,7 @@ public class RModelData
else if (rc.getColClass() == BigDecimal.class)
row.add(rs.getBigDecimal(index++));
else if (rc.getColClass() == Double.class)
row.add(new Double(rs.getDouble(index++)));
row.add(Double.valueOf(rs.getDouble(index++)));
else if (rc.getColClass() == Integer.class)
row.add(new Integer(rs.getInt(index++)));
else if (rc.getColClass() == Timestamp.class)

View File

@ -510,7 +510,7 @@ public class ImportHelper {
{
value=null;
}
//value = new Double( doubleValue );
//value = Double.valueOf( doubleValue );
if (log.isLoggable(Level.INFO)) log.info("About to set BigDecimal value of column ["+column.getColumnName()+"]=["+value+"]");

View File

@ -1221,7 +1221,7 @@ public abstract class Info extends CDialog
else if (c == BigDecimal.class)
data = m_rs.getBigDecimal(colIndex);
else if (c == Double.class)
data = new Double(m_rs.getDouble(colIndex));
data = Double.valueOf(m_rs.getDouble(colIndex));
else if (c == Integer.class)
data = new Integer(m_rs.getInt(colIndex));
else if (c == KeyNamePair.class)

View File

@ -1272,10 +1272,10 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener
line.add(null); // Date
double qtyOnHand = rs.getDouble(1);
qty += qtyOnHand;
line.add(new Double(qtyOnHand)); // Qty
line.add(Double.valueOf(qtyOnHand)); // Qty
line.add(null); // BPartner
line.add(new Double(rs.getDouble(3))); // QtyOrdered
line.add(new Double(rs.getDouble(2))); // QtyReserved
line.add(Double.valueOf(rs.getDouble(3))); // QtyOrdered
line.add(Double.valueOf(rs.getDouble(2))); // QtyReserved
line.add(rs.getString(7)); // Locator
String asi = rs.getString(4);
if (showDetail && (asi == null || asi.length() == 0))
@ -1331,15 +1331,15 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener
Double qtyOrdered = null;
if (MDocType.DOCBASETYPE_PurchaseOrder.equals(DocBaseType))
{
qtyOrdered = new Double(oq);
qtyOrdered = Double.valueOf(oq);
qty += oq;
}
else
{
qtyReserved = new Double(oq);
qtyReserved = Double.valueOf(oq);
qty -= oq;
}
line.add(new Double(qty)); // Qty
line.add(Double.valueOf(qty)); // Qty
line.add(rs.getString(6)); // BPartner
line.add(qtyOrdered); // QtyOrdered
line.add(qtyReserved); // QtyReserved

View File

@ -276,7 +276,7 @@ public class InvoiceHistory extends CDialog
// 0-Name, 1-PriceActual, 2-QtyInvoiced, 3-Discount, 4-DocumentNo, 5-DateInvoiced
line.add(rs.getString(1)); // Name
line.add(rs.getBigDecimal(2)); // Price
line.add(new Double(rs.getDouble(4))); // Qty
line.add(Double.valueOf(rs.getDouble(4))); // Qty
BigDecimal discountBD = rs.getBigDecimal(8);
if (discountBD == null) {
double priceList = rs.getDouble(3);
@ -505,7 +505,7 @@ public class InvoiceHistory extends CDialog
Vector<Object> line = new Vector<Object>(6);
// 1-Name, 2-MovementQty, 3-MovementDate, 4-IsSOTrx, 5-DocumentNo
line.add(rs.getString(1)); // Name
line.add(new Double(rs.getDouble(2))); // Qty
line.add(Double.valueOf(rs.getDouble(2))); // Qty
line.add(rs.getTimestamp(3)); // Date
line.add(Boolean.valueOf("Y".equals(rs.getString(4)))); // IsSOTrx
line.add(rs.getString(5)); // DocNo
@ -598,10 +598,10 @@ public class InvoiceHistory extends CDialog
line.add(null); // Date
double qtyOnHand = rs.getDouble(1);
qty += qtyOnHand;
line.add(new Double(qtyOnHand)); // Qty
line.add(Double.valueOf(qtyOnHand)); // Qty
line.add(null); // BPartner
line.add(new Double(rs.getDouble(3))); // QtyOrdered
line.add(new Double(rs.getDouble(2))); // QtyReserved
line.add(Double.valueOf(rs.getDouble(3))); // QtyOrdered
line.add(Double.valueOf(rs.getDouble(2))); // QtyReserved
line.add(rs.getString(7)); // Locator
String asi = rs.getString(4);
if (showDetail && (asi == null || asi.length() == 0))
@ -657,15 +657,15 @@ public class InvoiceHistory extends CDialog
Double qtyOrdered = null;
if (MDocType.DOCBASETYPE_PurchaseOrder.equals(DocBaseType))
{
qtyOrdered = new Double(oq);
qtyOrdered = Double.valueOf(oq);
qty += oq;
}
else
{
qtyReserved = new Double(oq);
qtyReserved = Double.valueOf(oq);
qty -= oq;
}
line.add(new Double(qty)); // Qty
line.add(Double.valueOf(qty)); // Qty
line.add(rs.getString(6)); // BPartner
line.add(qtyOrdered); // QtyOrdered
line.add(qtyReserved); // QtyReserved

View File

@ -580,7 +580,7 @@ public class MiniTable extends CTable implements IMiniTable
if (c == IDColumn.class)
data = new IDColumn(((Integer)data).intValue());
else if (c == Double.class)
data = new Double(((BigDecimal)data).doubleValue());
data = Double.valueOf(((BigDecimal)data).doubleValue());
}
// store
setValueAt(data, row, col);
@ -790,15 +790,15 @@ public class MiniTable extends CTable implements IMiniTable
}
else if (c == Double.class)
{
Double subtotal = new Double(0);
Double subtotal = Double.valueOf(0);
if(total[col] != null)
subtotal = (Double)(total[col]);
Double amt = (Double) data;
if(subtotal == null)
subtotal = new Double(0);
subtotal = Double.valueOf(0);
if(amt == null )
amt = new Double(0);
amt = Double.valueOf(0);
total[col] = subtotal + amt;
}
@ -865,15 +865,15 @@ public class MiniTable extends CTable implements IMiniTable
}
else if (c == Double.class)
{
Double subtotal = new Double(0);
Double subtotal = Double.valueOf(0);
if(total[col] != null)
subtotal = (Double)(total[col]);
Double amt = (Double) data;
if(subtotal == null)
subtotal = new Double(0);
subtotal = Double.valueOf(0);
if(amt == null )
amt = new Double(0);
amt = Double.valueOf(0);
total[col] = subtotal + amt;
}

View File

@ -623,7 +623,7 @@ public class WListbox extends Listbox implements IMiniTable, TableValueChangeLis
}
else if (columnClass == Double.class)
{
data = new Double(rs.getDouble(rsColIndex));
data = Double.valueOf(rs.getDouble(rsColIndex));
}
else if (columnClass == Integer.class)
{
@ -731,7 +731,7 @@ public class WListbox extends Listbox implements IMiniTable, TableValueChangeLis
}
else if (columnClass == Double.class)
{
data = new Double(((BigDecimal)data).doubleValue());
data = Double.valueOf(((BigDecimal)data).doubleValue());
}
}
// store
@ -1202,15 +1202,15 @@ public class WListbox extends Listbox implements IMiniTable, TableValueChangeLis
}
else if (c == Double.class)
{
Double subtotal = new Double(0);
Double subtotal = Double.valueOf(0);
if(total[col] != null)
subtotal = (Double)(total[col]);
Double amt = (Double) data;
if(subtotal == null)
subtotal = new Double(0);
subtotal = Double.valueOf(0);
if(amt == null )
amt = new Double(0);
amt = Double.valueOf(0);
total[col] = subtotal + amt;
}

View File

@ -359,7 +359,7 @@ public class CalendarWindow extends Window implements EventListener<Event>, ITab
String key = (String) keys.nextElement();
BigDecimal value = ht.get(key);
String name = (String) htTypes.get(key);
pieDataset.setValue(name == null ? "" : name, new Double(size > 0 ? value.doubleValue()/size*100 : 0));
pieDataset.setValue(name == null ? "" : name, Double.valueOf(size > 0 ? value.doubleValue()/size*100 : 0));
}
JFreeChart chart = ChartFactory.createPieChart3D(Msg.getMsg(Env.getCtx(),"EventsAnalysis"), pieDataset, true, true, true);

View File

@ -706,10 +706,10 @@ public class InfoProductWindow extends InfoWindow {
line.add(null); // Date
double qtyOnHand = rs.getDouble(1);
qty += qtyOnHand;
line.add(new Double(qtyOnHand)); // Qty
line.add(Double.valueOf(qtyOnHand)); // Qty
line.add(null); // BPartner
line.add(new Double(rs.getDouble(3))); // QtyOrdered
line.add(new Double(rs.getDouble(2))); // QtyReserved
line.add(Double.valueOf(rs.getDouble(3))); // QtyOrdered
line.add(Double.valueOf(rs.getDouble(2))); // QtyReserved
line.add(rs.getString(7)); // Locator
String asi = rs.getString(4);
if (showDetail && (asi == null || asi.length() == 0))
@ -765,15 +765,15 @@ public class InfoProductWindow extends InfoWindow {
Double qtyOrdered = null;
if (MDocType.DOCBASETYPE_PurchaseOrder.equals(DocBaseType))
{
qtyOrdered = new Double(oq);
qtyOrdered = Double.valueOf(oq);
qty += oq;
}
else
{
qtyReserved = new Double(oq);
qtyReserved = Double.valueOf(oq);
qty -= oq;
}
line.add(new Double(qty)); // Qty
line.add(Double.valueOf(qty)); // Qty
line.add(rs.getString(6)); // BPartner
line.add(qtyOrdered); // QtyOrdered
line.add(qtyReserved); // QtyReserved

View File

@ -432,7 +432,7 @@ public class RelatedInfoWindow implements EventListener<Event>, Sortable<Object>
else if (c == BigDecimal.class)
value = rs.getBigDecimal(colIndex);
else if (c == Double.class)
value = new Double(rs.getDouble(colIndex));
value = Double.valueOf(rs.getDouble(colIndex));
else if (c == Integer.class)
value = new Integer(rs.getInt(colIndex));
else if (c == KeyNamePair.class)

View File

@ -597,7 +597,7 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
else if (c == BigDecimal.class)
value = rs.getBigDecimal(colIndex);
else if (c == Double.class)
value = new Double(rs.getDouble(colIndex));
value = Double.valueOf(rs.getDouble(colIndex));
else if (c == Integer.class)
value = new Integer(rs.getInt(colIndex));
else if (c == KeyNamePair.class)

View File

@ -1506,10 +1506,10 @@ public class InfoProductPanel extends InfoPanel implements EventListener<Event>
line.add(null); // Date
double qtyOnHand = rs.getDouble(1);
qty += qtyOnHand;
line.add(new Double(qtyOnHand)); // Qty
line.add(Double.valueOf(qtyOnHand)); // Qty
line.add(null); // BPartner
line.add(new Double(rs.getDouble(3))); // QtyOrdered
line.add(new Double(rs.getDouble(2))); // QtyReserved
line.add(Double.valueOf(rs.getDouble(3))); // QtyOrdered
line.add(Double.valueOf(rs.getDouble(2))); // QtyReserved
line.add(rs.getString(7)); // Locator
String asi = rs.getString(4);
if (showDetail && (asi == null || asi.length() == 0))
@ -1565,15 +1565,15 @@ public class InfoProductPanel extends InfoPanel implements EventListener<Event>
Double qtyOrdered = null;
if (MDocType.DOCBASETYPE_PurchaseOrder.equals(DocBaseType))
{
qtyOrdered = new Double(oq);
qtyOrdered = Double.valueOf(oq);
qty += oq;
}
else
{
qtyReserved = new Double(oq);
qtyReserved = Double.valueOf(oq);
qty -= oq;
}
line.add(new Double(qty)); // Qty
line.add(Double.valueOf(qty)); // Qty
line.add(rs.getString(6)); // BPartner
line.add(qtyOrdered); // QtyOrdered
line.add(qtyReserved); // QtyReserved

View File

@ -337,7 +337,7 @@ public class InvoiceHistory extends Window implements EventListener<Event>
line.add(rs.getString(1)); // Name
line.add(rs.getBigDecimal(2)); // Price
line.add(rs.getString(3)); // Currency
line.add(new Double(rs.getDouble(5))); // Qty
line.add(Double.valueOf(rs.getDouble(5))); // Qty
BigDecimal discountBD = rs.getBigDecimal(9);
if (discountBD == null) {
double priceList = rs.getDouble(4);
@ -571,7 +571,7 @@ public class InvoiceHistory extends Window implements EventListener<Event>
Vector<Object> line = new Vector<Object>(6);
// 1-Name, 2-MovementQty, 3-MovementDate, 4-IsSOTrx, 5-DocumentNo
line.add(rs.getString(1)); // Name
line.add(new Double(rs.getDouble(2))); // Qty
line.add(Double.valueOf(rs.getDouble(2))); // Qty
line.add(rs.getTimestamp(3)); // Date
line.add(Boolean.valueOf("Y".equals(rs.getString(4)))); // IsSOTrx
line.add(rs.getString(5)); // DocNo
@ -664,10 +664,10 @@ public class InvoiceHistory extends Window implements EventListener<Event>
line.add(null); // Date
double qtyOnHand = rs.getDouble(1);
qty += qtyOnHand;
line.add(new Double(qtyOnHand)); // Qty
line.add(Double.valueOf(qtyOnHand)); // Qty
line.add(null); // BPartner
line.add(new Double(rs.getDouble(3))); // QtyOrdered
line.add(new Double(rs.getDouble(2))); // QtyReserved
line.add(Double.valueOf(rs.getDouble(3))); // QtyOrdered
line.add(Double.valueOf(rs.getDouble(2))); // QtyReserved
line.add(rs.getString(7)); // Locator
String asi = rs.getString(4);
if (showDetailATP && (asi == null || asi.length() == 0))
@ -723,15 +723,15 @@ public class InvoiceHistory extends Window implements EventListener<Event>
Double qtyOrdered = null;
if (MDocType.DOCBASETYPE_PurchaseOrder.equals(DocBaseType))
{
qtyOrdered = new Double(oq);
qtyOrdered = Double.valueOf(oq);
qty += oq;
}
else
{
qtyReserved = new Double(oq);
qtyReserved = Double.valueOf(oq);
qty -= oq;
}
line.add(new Double(qty)); // Qty
line.add(Double.valueOf(qty)); // Qty
line.add(rs.getString(6)); // BPartner
line.add(qtyOrdered); // QtyOrdered
line.add(qtyReserved); // QtyReserved

View File

@ -140,7 +140,7 @@ public class DBDataSource extends compiereDataSource
}
else if (clazz.equals(java.lang.Double.class))
{
objValue = new Double(m_resultSet.getDouble(field.getName()));
objValue = Double.valueOf(m_resultSet.getDouble(field.getName()));
if(m_resultSet.wasNull())
{
objValue = null;