diff --git a/org.adempiere.base/src/org/compiere/model/GridTab.java b/org.adempiere.base/src/org/compiere/model/GridTab.java index 86891042f4..3e12193eb0 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTab.java +++ b/org.adempiere.base/src/org/compiere/model/GridTab.java @@ -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] = " "; diff --git a/org.adempiere.base/src/org/compiere/model/MQuery.java b/org.adempiere.base/src/org/compiere/model/MQuery.java index 9b27c76616..b814cdef2e 100644 --- a/org.adempiere.base/src/org/compiere/model/MQuery.java +++ b/org.adempiere.base/src/org/compiere/model/MQuery.java @@ -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); diff --git a/org.adempiere.base/src/org/compiere/report/core/RModelData.java b/org.adempiere.base/src/org/compiere/report/core/RModelData.java index e9d2b9ab39..c6d02eaef7 100644 --- a/org.adempiere.base/src/org/compiere/report/core/RModelData.java +++ b/org.adempiere.base/src/org/compiere/report/core/RModelData.java @@ -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) diff --git a/org.adempiere.replication/src/org/adempiere/process/rpl/imp/ImportHelper.java b/org.adempiere.replication/src/org/adempiere/process/rpl/imp/ImportHelper.java index b439a68ae5..9ee4b79b2f 100755 --- a/org.adempiere.replication/src/org/adempiere/process/rpl/imp/ImportHelper.java +++ b/org.adempiere.replication/src/org/adempiere/process/rpl/imp/ImportHelper.java @@ -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+"]"); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/Info.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/Info.java index ffdd6a2b61..241bb06a13 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/Info.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/Info.java @@ -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) diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoProduct.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoProduct.java index 1fba267726..d9d600e5bd 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoProduct.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoProduct.java @@ -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 diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/InvoiceHistory.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/InvoiceHistory.java index e152372389..7fdba6ab75 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/InvoiceHistory.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/InvoiceHistory.java @@ -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 line = new Vector(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 diff --git a/org.adempiere.ui.swing/src/org/compiere/minigrid/MiniTable.java b/org.adempiere.ui.swing/src/org/compiere/minigrid/MiniTable.java index d683719350..14f589a5bc 100644 --- a/org.adempiere.ui.swing/src/org/compiere/minigrid/MiniTable.java +++ b/org.adempiere.ui.swing/src/org/compiere/minigrid/MiniTable.java @@ -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; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/WListbox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/WListbox.java index 8c692c9ee8..3a42e3ba0a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/WListbox.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/WListbox.java @@ -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; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/CalendarWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/CalendarWindow.java index a632c2e1dd..79c64da72f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/CalendarWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/CalendarWindow.java @@ -359,7 +359,7 @@ public class CalendarWindow extends Window implements EventListener, 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); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoProductWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoProductWindow.java index b6c92bb009..7d7cb30700 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoProductWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoProductWindow.java @@ -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 diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/RelatedInfoWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/RelatedInfoWindow.java index 9e14aa4033..9d2eed91ce 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/RelatedInfoWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/RelatedInfoWindow.java @@ -432,7 +432,7 @@ public class RelatedInfoWindow implements EventListener, Sortable 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) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java index 6d81ce9758..2a91445125 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java @@ -597,7 +597,7 @@ public abstract class InfoPanel extends Window implements EventListener, 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) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoProductPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoProductPanel.java index 32ba5bf78a..281ee6b533 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoProductPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoProductPanel.java @@ -1506,10 +1506,10 @@ public class InfoProductPanel extends InfoPanel implements EventListener 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 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 diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InvoiceHistory.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InvoiceHistory.java index 21b17a7e57..d1266da85c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InvoiceHistory.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InvoiceHistory.java @@ -337,7 +337,7 @@ public class InvoiceHistory extends Window implements EventListener 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 Vector line = new Vector(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 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 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 diff --git a/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/DBDataSource.java b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/DBDataSource.java index 47d926d85d..b4c5d9a399 100644 --- a/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/DBDataSource.java +++ b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/DBDataSource.java @@ -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;