From 155810c3f1f4762ae1d1e347fd1eed8a99a82766 Mon Sep 17 00:00:00 2001 From: hieplq Date: Wed, 24 Oct 2018 09:25:50 +0700 Subject: [PATCH] IDEMPIERE-3798:Move iDempiere default branch to openjdk 10 (warning deprecated of constructer) constructer with expression --- .../compiere/model/CalloutCashJournal.java | 2 +- .../org/compiere/model/CalloutGLJournal.java | 2 +- .../src/org/compiere/model/CalloutInOut.java | 108 +++++++++--------- .../org/compiere/model/CalloutInvoice.java | 20 ++-- .../compiere/model/CalloutInvoiceBatch.java | 8 +- .../src/org/compiere/model/CalloutOrder.java | 44 +++---- .../model/CalloutPaymentAllocate.java | 4 +- .../model/CalloutProductCategory.java | 2 +- .../org/compiere/model/CalloutProduction.java | 2 +- .../org/compiere/model/CalloutRequest.java | 2 +- .../compiere/model/CalloutTimeExpense.java | 4 +- .../src/org/adempiere/process/Export.java | 6 +- .../compiere/process/AcctSchemaCopyAcct.java | 4 +- .../org/compiere/process/DunningPrint.java | 2 +- .../org/compiere/process/InvoicePrint.java | 2 +- .../compiere/process/ReplicationLocal.java | 6 +- .../akunagroup/uk/postcode/AddressLookup.java | 2 +- .../adempiere/base/DefaultModelFactory.java | 2 +- .../src/org/adempiere/model/GenericPO.java | 2 +- .../adempiere/model/MBroadcastMessage.java | 2 +- .../util/AbstractDocumentSearch.java | 6 +- .../org/adempiere/util/GenerateModelJPA.java | 2 +- .../src/org/compiere/acct/Doc.java | 4 +- .../src/org/compiere/acct/Doc_Order.java | 4 +- .../src/org/compiere/acct/Fact.java | 4 +- .../src/org/compiere/cm/WebProjectDeploy.java | 8 +- .../src/org/compiere/model/CalloutEngine.java | 4 +- .../src/org/compiere/model/GridField.java | 12 +- .../src/org/compiere/model/GridFieldVO.java | 2 +- .../src/org/compiere/model/GridTab.java | 14 +-- .../src/org/compiere/model/GridTable.java | 8 +- .../src/org/compiere/model/MAcctSchema.java | 4 +- .../src/org/compiere/model/MAging.java | 8 +- .../src/org/compiere/model/MBPartner.java | 2 +- .../org/compiere/model/MBPartnerLocation.java | 2 +- .../src/org/compiere/model/MChangeLog.java | 2 +- .../org/compiere/model/MConversionType.java | 2 +- .../src/org/compiere/model/MCurrency.java | 2 +- .../src/org/compiere/model/MDesktop.java | 2 +- .../src/org/compiere/model/MInOutLine.java | 2 +- .../src/org/compiere/model/MInvoiceLine.java | 6 +- .../src/org/compiere/model/MInvoiceTax.java | 2 +- .../org/compiere/model/MLocatorLookup.java | 4 +- .../src/org/compiere/model/MLookup.java | 6 +- .../src/org/compiere/model/MOrderLine.java | 6 +- .../src/org/compiere/model/MOrderTax.java | 2 +- .../src/org/compiere/model/MPInstance.java | 2 +- .../src/org/compiere/model/MPOSTerminal.java | 4 +- .../src/org/compiere/model/MPeriod.java | 4 +- .../org/compiere/model/MPrivateAccess.java | 2 +- .../org/compiere/model/MProductCategory.java | 2 +- .../src/org/compiere/model/MQuery.java | 6 +- .../src/org/compiere/model/MRMATax.java | 2 +- .../model/MRegistrationAttribute.java | 4 +- .../src/org/compiere/model/MRequest.java | 4 +- .../src/org/compiere/model/MRole.java | 16 +-- .../src/org/compiere/model/MSequence.java | 2 +- .../src/org/compiere/model/MSession.java | 10 +- .../src/org/compiere/model/MStatus.java | 2 +- .../src/org/compiere/model/MStyle.java | 2 +- .../src/org/compiere/model/MTree_NodeCMC.java | 2 +- .../src/org/compiere/model/MUser.java | 2 +- .../src/org/compiere/model/MUserRoles.java | 4 +- .../src/org/compiere/model/MWarehouse.java | 2 +- .../src/org/compiere/model/PO.java | 30 ++--- .../src/org/compiere/model/PO_Record.java | 4 +- .../compiere/model/StandardTaxProvider.java | 4 +- .../org/compiere/model/TranslationTable.java | 2 +- .../src/org/compiere/print/MPrintColor.java | 2 +- .../src/org/compiere/print/MPrintFont.java | 2 +- .../src/org/compiere/print/MPrintFormat.java | 12 +- .../org/compiere/print/MPrintFormatItem.java | 2 +- .../src/org/compiere/print/MPrintPaper.java | 2 +- .../src/org/compiere/print/PrintData.java | 8 +- .../src/org/compiere/print/ReportEngine.java | 4 +- .../compiere/print/layout/ImageElement.java | 2 +- .../compiere/print/layout/LayoutEngine.java | 18 +-- .../compiere/print/layout/StringElement.java | 2 +- .../compiere/print/layout/TableElement.java | 18 +-- .../org/compiere/report/FinReportJasper.java | 2 +- .../src/org/compiere/report/MReportTree.java | 4 +- .../src/org/compiere/report/core/RModel.java | 4 +- .../org/compiere/report/core/RModelData.java | 8 +- .../src/org/compiere/util/DB.java | 4 +- .../org/eevolution/model/MDDOrderLine.java | 2 +- .../src/compiere/model/CalloutUser.java | 4 +- .../src/test/AdempiereTestCase.java | 4 +- .../test/performance/SingleMProductTest.java | 2 +- .../org/compiere/install/util/AppsAction.java | 4 +- .../src/org/adempiere/pipo2/PackOut.java | 4 +- .../src/org/adempiere/pipo2/PoFiller.java | 4 +- .../process/rpl/exp/ExportHelper.java | 4 +- .../process/rpl/imp/ImportHelper.java | 12 +- .../report/jasper/ReportStarter.java | 10 +- .../server/org/compiere/server/Scheduler.java | 2 +- .../compiere/server/WorkflowProcessor.java | 20 ++-- .../org/adempiere/plaf/AdempiereTheme.java | 4 +- .../src/org/compiere/acct/AcctViewerData.java | 2 +- .../src/org/compiere/apps/APanel.java | 6 +- .../src/org/compiere/apps/ARequest.java | 32 +++--- .../src/org/compiere/apps/AppsAction.java | 4 +- .../org/compiere/apps/form/VAllocation.java | 4 +- .../src/org/compiere/apps/form/VBOMDrop.java | 2 +- .../src/org/compiere/apps/form/VPayPrint.java | 2 +- .../apps/form/VStatementCreateFromBatch.java | 2 +- .../src/org/compiere/apps/form/VTreeBOM.java | 6 +- .../src/org/compiere/apps/search/Find.java | 6 +- .../src/org/compiere/apps/search/Info.java | 2 +- .../org/compiere/apps/search/InfoInOut.java | 2 +- .../org/compiere/apps/search/InfoInvoice.java | 2 +- .../org/compiere/apps/search/InfoOrder.java | 2 +- .../org/compiere/apps/search/InfoPayment.java | 2 +- .../grid/VCreateFromDepositBatchUI.java | 4 +- .../compiere/grid/VCreateFromInvoiceUI.java | 2 +- .../org/compiere/grid/VCreateFromRMAUI.java | 2 +- .../compiere/grid/VCreateFromShipmentUI.java | 2 +- .../compiere/grid/VCreateFromStatementUI.java | 2 +- .../org/compiere/grid/VPaymentFormCash.java | 2 +- .../org/compiere/grid/VPaymentFormCheck.java | 2 +- .../src/org/compiere/grid/ed/Calendar.java | 10 +- .../src/org/compiere/grid/ed/VAccount.java | 2 +- .../org/compiere/grid/ed/VAccountDialog.java | 2 +- .../src/org/compiere/grid/ed/VAssignment.java | 2 +- .../src/org/compiere/grid/ed/VBPartner.java | 2 +- .../src/org/compiere/grid/ed/VComboBox.java | 2 +- .../src/org/compiere/grid/ed/VImage.java | 2 +- .../src/org/compiere/grid/ed/VLocation.java | 4 +- .../src/org/compiere/grid/ed/VLocator.java | 2 +- .../src/org/compiere/grid/ed/VLookup.java | 6 +- .../src/org/compiere/grid/ed/VNumber.java | 18 +-- .../src/org/compiere/grid/ed/VPAttribute.java | 4 +- .../src/org/compiere/minigrid/MiniTable.java | 24 ++-- .../src/org/compiere/print/Viewer.java | 8 +- .../src/org/compiere/swing/CPanel.java | 2 +- .../org/adempiere/webui/ShowMaskWrapper.java | 2 +- .../src/org/adempiere/webui/WRequest.java | 32 +++--- .../adempiere/webui/acct/WAcctViewerData.java | 2 +- .../adwindow/AbstractADWindowContent.java | 2 +- .../webui/apps/form/WAllocation.java | 6 +- .../adempiere/webui/apps/form/WBOMDrop.java | 2 +- .../apps/form/WCreateFromDepositBatchUI.java | 4 +- .../webui/apps/form/WCreateFromInvoiceUI.java | 2 +- .../webui/apps/form/WCreateFromRMAUI.java | 2 +- .../apps/form/WCreateFromShipmentUI.java | 2 +- .../apps/form/WCreateFromStatementUI.java | 2 +- .../adempiere/webui/apps/form/WPayPrint.java | 2 +- .../webui/apps/form/WPaymentFormCash.java | 2 +- .../webui/apps/form/WPaymentFormCheck.java | 2 +- .../apps/form/WStatementCreateFromBatch.java | 2 +- .../adempiere/webui/apps/form/WTreeBOM.java | 6 +- .../adempiere/webui/component/WListbox.java | 6 +- .../webui/editor/WAccountEditor.java | 2 +- .../webui/editor/WAssignmentEditor.java | 2 +- .../adempiere/webui/editor/WImageEditor.java | 2 +- .../webui/editor/WLocationEditor.java | 4 +- .../webui/editor/WLocatorEditor.java | 2 +- .../adempiere/webui/editor/WNumberEditor.java | 4 +- .../webui/editor/WPAttributeEditor.java | 4 +- .../adempiere/webui/editor/WSearchEditor.java | 8 +- .../webui/editor/WTableDirEditor.java | 4 +- .../org/adempiere/webui/grid/WBPartner.java | 2 +- .../org/adempiere/webui/info/InfoWindow.java | 2 +- .../webui/info/RelatedInfoWindow.java | 2 +- .../adempiere/webui/panel/InfoInOutPanel.java | 2 +- .../webui/panel/InfoInvoicePanel.java | 2 +- .../adempiere/webui/panel/InfoOrderPanel.java | 2 +- .../org/adempiere/webui/panel/InfoPanel.java | 2 +- .../webui/panel/InfoPaymentPanel.java | 2 +- .../webui/panel/InfoProductPanel.java | 8 +- .../org/adempiere/webui/panel/RolePanel.java | 6 +- .../adempiere/webui/process/DunningPrint.java | 2 +- .../adempiere/webui/process/InvoicePrint.java | 2 +- .../src/org/adempiere/webui/util/OSTask.java | 2 +- .../adempiere/webui/window/FindWindow.java | 4 +- .../webui/window/WAccountDialog.java | 2 +- .../org/compiere/apps/form/Allocation.java | 4 +- .../src/org/compiere/apps/form/PayPrint.java | 4 +- .../src/org/compiere/grid/PaymentForm.java | 2 +- .../org/compiere/grid/PaymentFormCash.java | 4 +- .../org/compiere/grid/PaymentFormCheck.java | 2 +- .../compiere/grid/PaymentFormCreditCard.java | 2 +- .../org/compiere/grid/PaymentFormDirect.java | 2 +- .../compiere/grid/PaymentFormOnCredit.java | 2 +- .../src/org/compiere/minigrid/IDColumn.java | 2 +- .../wstore/ProductCategoryListTag.java | 4 +- .../src/org/apache/ecs/ElementAttributes.java | 2 +- .../src/net/sf/compilo/data/DBDataSource.java | 2 +- .../src/net/sf/compilo/report/ReportPool.java | 6 +- .../sf/compilo/report/ReportProcessor.java | 6 +- .../idempiere/adinterface/ReportEngineEx.java | 2 +- .../webservices/client/QueryDataLookup.java | 2 +- 191 files changed, 505 insertions(+), 505 deletions(-) diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutCashJournal.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutCashJournal.java index e7b9bf305e..81a50121c4 100644 --- a/org.adempiere.base.callout/src/org/compiere/model/CalloutCashJournal.java +++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutCashJournal.java @@ -84,7 +84,7 @@ public class CalloutCashJournal extends CalloutEngine rs = pstmt.executeQuery(); if (rs.next()) { - mTab.setValue("C_Currency_ID", new Integer(rs.getInt(2))); + mTab.setValue("C_Currency_ID", Integer.valueOf(rs.getInt(2))); BigDecimal PayAmt = rs.getBigDecimal(3); BigDecimal DiscountAmt = rs.getBigDecimal(5); boolean isSOTrx = "Y".equals(rs.getString(4)); diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutGLJournal.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutGLJournal.java index 048d34e40a..8078c98c17 100644 --- a/org.adempiere.base.callout/src/org/compiere/model/CalloutGLJournal.java +++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutGLJournal.java @@ -103,7 +103,7 @@ public class CalloutGLJournal extends CalloutEngine pstmt = null; } if (C_Period_ID != 0) - mTab.setValue("C_Period_ID", new Integer(C_Period_ID)); + mTab.setValue("C_Period_ID", Integer.valueOf(C_Period_ID)); } // When C_Period_ID is changed, check if in DateAcct range and set to end date if not diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutInOut.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutInOut.java index e2e847022a..260a0de923 100644 --- a/org.adempiere.base.callout/src/org/compiere/model/CalloutInOut.java +++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutInOut.java @@ -61,28 +61,28 @@ public class CalloutInOut extends CalloutEngine { mTab.setValue("DateOrdered", order.getDateOrdered()); mTab.setValue("POReference", order.getPOReference()); - mTab.setValue("AD_Org_ID", new Integer(order.getAD_Org_ID())); - mTab.setValue("AD_OrgTrx_ID", new Integer(order.getAD_OrgTrx_ID())); - mTab.setValue("C_Activity_ID", new Integer(order.getC_Activity_ID())); - mTab.setValue("C_Campaign_ID", new Integer(order.getC_Campaign_ID())); - mTab.setValue("C_Project_ID", new Integer(order.getC_Project_ID())); - mTab.setValue("User1_ID", new Integer(order.getUser1_ID())); - mTab.setValue("User2_ID", new Integer(order.getUser2_ID())); - mTab.setValue("M_Warehouse_ID", new Integer(order.getM_Warehouse_ID())); + mTab.setValue("AD_Org_ID", Integer.valueOf(order.getAD_Org_ID())); + mTab.setValue("AD_OrgTrx_ID", Integer.valueOf(order.getAD_OrgTrx_ID())); + mTab.setValue("C_Activity_ID", Integer.valueOf(order.getC_Activity_ID())); + mTab.setValue("C_Campaign_ID", Integer.valueOf(order.getC_Campaign_ID())); + mTab.setValue("C_Project_ID", Integer.valueOf(order.getC_Project_ID())); + mTab.setValue("User1_ID", Integer.valueOf(order.getUser1_ID())); + mTab.setValue("User2_ID", Integer.valueOf(order.getUser2_ID())); + mTab.setValue("M_Warehouse_ID", Integer.valueOf(order.getM_Warehouse_ID())); // mTab.setValue("DeliveryRule", order.getDeliveryRule()); mTab.setValue("DeliveryViaRule", order.getDeliveryViaRule()); - mTab.setValue("M_Shipper_ID", new Integer(order.getM_Shipper_ID())); + mTab.setValue("M_Shipper_ID", Integer.valueOf(order.getM_Shipper_ID())); mTab.setValue("FreightCostRule", order.getFreightCostRule()); mTab.setValue("FreightAmt", order.getFreightAmt()); - mTab.setValue("C_BPartner_ID", new Integer(order.getC_BPartner_ID())); + mTab.setValue("C_BPartner_ID", Integer.valueOf(order.getC_BPartner_ID())); //[ 1867464 ] - mTab.setValue("C_BPartner_Location_ID", new Integer(order.getC_BPartner_Location_ID())); + mTab.setValue("C_BPartner_Location_ID", Integer.valueOf(order.getC_BPartner_Location_ID())); if (order.getAD_User_ID() > 0) - mTab.setValue("AD_User_ID", new Integer(order.getAD_User_ID())); + mTab.setValue("AD_User_ID", Integer.valueOf(order.getAD_User_ID())); else mTab.setValue("AD_User_ID", null); } @@ -128,28 +128,28 @@ public class CalloutInOut extends CalloutEngine { mTab.setValue("DateOrdered", originalReceipt.getDateOrdered()); mTab.setValue("POReference", originalReceipt.getPOReference()); - mTab.setValue("AD_Org_ID", new Integer(originalReceipt.getAD_Org_ID())); - mTab.setValue("AD_OrgTrx_ID", new Integer(originalReceipt.getAD_OrgTrx_ID())); - mTab.setValue("C_Activity_ID", new Integer(originalReceipt.getC_Activity_ID())); - mTab.setValue("C_Campaign_ID", new Integer(originalReceipt.getC_Campaign_ID())); - mTab.setValue("C_Project_ID", new Integer(originalReceipt.getC_Project_ID())); - mTab.setValue("User1_ID", new Integer(originalReceipt.getUser1_ID())); - mTab.setValue("User2_ID", new Integer(originalReceipt.getUser2_ID())); - mTab.setValue("M_Warehouse_ID", new Integer(originalReceipt.getM_Warehouse_ID())); + mTab.setValue("AD_Org_ID", Integer.valueOf(originalReceipt.getAD_Org_ID())); + mTab.setValue("AD_OrgTrx_ID", Integer.valueOf(originalReceipt.getAD_OrgTrx_ID())); + mTab.setValue("C_Activity_ID", Integer.valueOf(originalReceipt.getC_Activity_ID())); + mTab.setValue("C_Campaign_ID", Integer.valueOf(originalReceipt.getC_Campaign_ID())); + mTab.setValue("C_Project_ID", Integer.valueOf(originalReceipt.getC_Project_ID())); + mTab.setValue("User1_ID", Integer.valueOf(originalReceipt.getUser1_ID())); + mTab.setValue("User2_ID", Integer.valueOf(originalReceipt.getUser2_ID())); + mTab.setValue("M_Warehouse_ID", Integer.valueOf(originalReceipt.getM_Warehouse_ID())); // mTab.setValue("DeliveryRule", originalReceipt.getDeliveryRule()); mTab.setValue("DeliveryViaRule", originalReceipt.getDeliveryViaRule()); - mTab.setValue("M_Shipper_ID", new Integer(originalReceipt.getM_Shipper_ID())); + mTab.setValue("M_Shipper_ID", Integer.valueOf(originalReceipt.getM_Shipper_ID())); mTab.setValue("FreightCostRule", originalReceipt.getFreightCostRule()); mTab.setValue("FreightAmt", originalReceipt.getFreightAmt()); - mTab.setValue("C_BPartner_ID", new Integer(originalReceipt.getC_BPartner_ID())); + mTab.setValue("C_BPartner_ID", Integer.valueOf(originalReceipt.getC_BPartner_ID())); //[ 1867464 ] - mTab.setValue("C_BPartner_Location_ID", new Integer(originalReceipt.getC_BPartner_Location_ID())); + mTab.setValue("C_BPartner_Location_ID", Integer.valueOf(originalReceipt.getC_BPartner_Location_ID())); if (originalReceipt.getAD_User_ID() > 0) - mTab.setValue("AD_User_ID", new Integer(originalReceipt.getAD_User_ID())); + mTab.setValue("AD_User_ID", Integer.valueOf(originalReceipt.getAD_User_ID())); else mTab.setValue("AD_User_ID", null); } @@ -290,13 +290,13 @@ public class CalloutInOut extends CalloutEngine if (!IsSOTrx) { // Location - Integer ii = new Integer(rs.getInt("C_BPartner_Location_ID")); + Integer ii = Integer.valueOf(rs.getInt("C_BPartner_Location_ID")); if (rs.wasNull()) mTab.setValue("C_BPartner_Location_ID", null); else mTab.setValue("C_BPartner_Location_ID", ii); // Contact - ii = new Integer(rs.getInt("AD_User_ID")); + ii = Integer.valueOf(rs.getInt("AD_User_ID")); if (rs.wasNull()) mTab.setValue("AD_User_ID", null); else @@ -361,12 +361,12 @@ public class CalloutInOut extends CalloutEngine if (rs.next()) { // Org - Integer ii = new Integer(rs.getInt(1)); + Integer ii = Integer.valueOf(rs.getInt(1)); int AD_Org_ID = Env.getContextAsInt(ctx, WindowNo, "AD_Org_ID"); if (AD_Org_ID != ii.intValue()) mTab.setValue("AD_Org_ID", ii); // Locator - ii = new Integer(rs.getInt(2)); + ii = Integer.valueOf(rs.getInt(2)); if (rs.wasNull()) Env.setContext(ctx, WindowNo, 0, "M_Locator_ID", null); else @@ -416,17 +416,17 @@ public class CalloutInOut extends CalloutEngine if (ol.get_ID() != 0) { if (ol.getC_Charge_ID() > 0 && ol.getM_Product_ID() <= 0) { - mTab.setValue("C_Charge_ID", new Integer(ol.getC_Charge_ID())); + mTab.setValue("C_Charge_ID", Integer.valueOf(ol.getC_Charge_ID())); mTab.setValue("M_Product_ID", null); mTab.setValue("M_AttributeSetInstance_ID", null); } else { - mTab.setValue("M_Product_ID", new Integer(ol.getM_Product_ID())); - mTab.setValue("M_AttributeSetInstance_ID", new Integer(ol.getM_AttributeSetInstance_ID())); + mTab.setValue("M_Product_ID", Integer.valueOf(ol.getM_Product_ID())); + mTab.setValue("M_AttributeSetInstance_ID", Integer.valueOf(ol.getM_AttributeSetInstance_ID())); mTab.setValue("C_Charge_ID", null); } // - mTab.setValue("C_UOM_ID", new Integer(ol.getC_UOM_ID())); + mTab.setValue("C_UOM_ID", Integer.valueOf(ol.getC_UOM_ID())); BigDecimal MovementQty = ol.getQtyOrdered().subtract(ol.getQtyDelivered()); BigDecimal runningqty = DB.getSQLValueBDEx(null, "SELECT SUM(MovementQty) FROM M_InOutLine WHERE M_InOut_ID=? AND M_InOutLine_ID!=? AND C_OrderLine_ID=?", Env.getContextAsInt(ctx, WindowNo, "M_InOut_ID"), @@ -442,14 +442,14 @@ public class CalloutInOut extends CalloutEngine .divide(ol.getQtyOrdered(), 12, BigDecimal.ROUND_HALF_UP); mTab.setValue("QtyEntered", QtyEntered); // - mTab.setValue("C_Activity_ID", new Integer(ol.getC_Activity_ID())); - mTab.setValue("C_Campaign_ID", new Integer(ol.getC_Campaign_ID())); - mTab.setValue("C_Project_ID", new Integer(ol.getC_Project_ID())); - mTab.setValue("C_ProjectPhase_ID", new Integer(ol.getC_ProjectPhase_ID())); - mTab.setValue("C_ProjectTask_ID", new Integer(ol.getC_ProjectTask_ID())); - mTab.setValue("AD_OrgTrx_ID", new Integer(ol.getAD_OrgTrx_ID())); - mTab.setValue("User1_ID", new Integer(ol.getUser1_ID())); - mTab.setValue("User2_ID", new Integer(ol.getUser2_ID())); + mTab.setValue("C_Activity_ID", Integer.valueOf(ol.getC_Activity_ID())); + mTab.setValue("C_Campaign_ID", Integer.valueOf(ol.getC_Campaign_ID())); + mTab.setValue("C_Project_ID", Integer.valueOf(ol.getC_Project_ID())); + mTab.setValue("C_ProjectPhase_ID", Integer.valueOf(ol.getC_ProjectPhase_ID())); + mTab.setValue("C_ProjectTask_ID", Integer.valueOf(ol.getC_ProjectTask_ID())); + mTab.setValue("AD_OrgTrx_ID", Integer.valueOf(ol.getAD_OrgTrx_ID())); + mTab.setValue("User1_ID", Integer.valueOf(ol.getUser1_ID())); + mTab.setValue("User2_ID", Integer.valueOf(ol.getUser2_ID())); } return ""; } // orderLine @@ -474,30 +474,30 @@ public class CalloutInOut extends CalloutEngine if (rl.get_ID() != 0) { if (rl.getC_Charge_ID() > 0 && rl.getM_Product_ID() <= 0) { - mTab.setValue("C_Charge_ID", new Integer(rl.getC_Charge_ID())); + mTab.setValue("C_Charge_ID", Integer.valueOf(rl.getC_Charge_ID())); mTab.setValue("M_Product_ID", null); mTab.setValue("M_AttributeSetInstance_ID", null); } else { - mTab.setValue("M_Product_ID", new Integer(rl.getM_Product_ID())); - mTab.setValue("M_AttributeSetInstance_ID", new Integer(rl.getM_AttributeSetInstance_ID())); + mTab.setValue("M_Product_ID", Integer.valueOf(rl.getM_Product_ID())); + mTab.setValue("M_AttributeSetInstance_ID", Integer.valueOf(rl.getM_AttributeSetInstance_ID())); mTab.setValue("C_Charge_ID", null); } // - mTab.setValue("C_UOM_ID", new Integer(rl.getC_UOM_ID())); + mTab.setValue("C_UOM_ID", Integer.valueOf(rl.getC_UOM_ID())); BigDecimal MovementQty = rl.getQty().subtract(rl.getQtyDelivered()); mTab.setValue("MovementQty", MovementQty); BigDecimal QtyEntered = MovementQty; mTab.setValue("QtyEntered", QtyEntered); // - mTab.setValue("C_Activity_ID", new Integer(rl.getC_Activity_ID())); - mTab.setValue("C_Campaign_ID", new Integer(rl.getC_Campaign_ID())); - mTab.setValue("C_Project_ID", new Integer(rl.getC_Project_ID())); - mTab.setValue("C_ProjectPhase_ID", new Integer(rl.getC_ProjectPhase_ID())); - mTab.setValue("C_ProjectTask_ID", new Integer(rl.getC_ProjectTask_ID())); - mTab.setValue("AD_OrgTrx_ID", new Integer(rl.getAD_OrgTrx_ID())); - mTab.setValue("User1_ID", new Integer(rl.getUser1_ID())); - mTab.setValue("User2_ID", new Integer(rl.getUser2_ID())); + mTab.setValue("C_Activity_ID", Integer.valueOf(rl.getC_Activity_ID())); + mTab.setValue("C_Campaign_ID", Integer.valueOf(rl.getC_Campaign_ID())); + mTab.setValue("C_Project_ID", Integer.valueOf(rl.getC_Project_ID())); + mTab.setValue("C_ProjectPhase_ID", Integer.valueOf(rl.getC_ProjectPhase_ID())); + mTab.setValue("C_ProjectTask_ID", Integer.valueOf(rl.getC_ProjectTask_ID())); + mTab.setValue("AD_OrgTrx_ID", Integer.valueOf(rl.getAD_OrgTrx_ID())); + mTab.setValue("User1_ID", Integer.valueOf(rl.getUser1_ID())); + mTab.setValue("User2_ID", Integer.valueOf(rl.getUser2_ID())); } return ""; } // rmaLine @@ -525,10 +525,10 @@ public class CalloutInOut extends CalloutEngine && Env.getContextAsInt(ctx, WindowNo, Env.TAB_INFO, "M_AttributeSetInstance_ID") != 0) { mTab.setValue("M_AttributeSetInstance_ID", - new Integer(Env.getContextAsInt(ctx, WindowNo, Env.TAB_INFO, "M_AttributeSetInstance_ID"))); + Integer.valueOf(Env.getContextAsInt(ctx, WindowNo, Env.TAB_INFO, "M_AttributeSetInstance_ID"))); M_Locator_ID = Env.getContextAsInt(ctx, WindowNo, Env.TAB_INFO, "M_Locator_ID"); if (M_Locator_ID != 0) - mTab.setValue("M_Locator_ID", new Integer(M_Locator_ID)); + mTab.setValue("M_Locator_ID", Integer.valueOf(M_Locator_ID)); } else mTab.setValue("M_AttributeSetInstance_ID", null); diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutInvoice.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutInvoice.java index 28bb0d4b8c..677bc3b709 100644 --- a/org.adempiere.base.callout/src/org/compiere/model/CalloutInvoice.java +++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutInvoice.java @@ -161,7 +161,7 @@ public class CalloutInvoice extends CalloutEngine } // PriceList & IsTaxIncluded & Currency - Integer ii = new Integer(rs.getInt(IsSOTrx ? "M_PriceList_ID" : "PO_PriceList_ID")); + Integer ii = Integer.valueOf(rs.getInt(IsSOTrx ? "M_PriceList_ID" : "PO_PriceList_ID")); if (!rs.wasNull()) mTab.setValue("M_PriceList_ID", ii); else @@ -171,13 +171,13 @@ public class CalloutInvoice extends CalloutEngine { MPriceList pl = new MPriceList(ctx, i, null); if (IsSOTrx == pl.isSOPriceList()) - mTab.setValue("M_PriceList_ID", new Integer(i)); + mTab.setValue("M_PriceList_ID", Integer.valueOf(i)); else { String sql2 = "SELECT M_PriceList_ID FROM M_PriceList WHERE AD_Client_ID=? AND IsSOPriceList=? AND IsActive='Y' ORDER BY IsDefault DESC"; ii = DB.getSQLValue (null, sql2, Env.getAD_Client_ID(ctx), IsSOTrx); if (ii != 0) - mTab.setValue("M_PriceList_ID", new Integer(ii)); + mTab.setValue("M_PriceList_ID", Integer.valueOf(ii)); } } } @@ -189,7 +189,7 @@ public class CalloutInvoice extends CalloutEngine if (Env.getContext(ctx, WindowNo, "DocBaseType").endsWith("C")) // Credits are Payment Term s = X_C_Invoice.PAYMENTRULE_OnCredit; // Payment Term - ii = new Integer(rs.getInt(IsSOTrx ? "C_PaymentTerm_ID" : "PO_PaymentTerm_ID")); + ii = Integer.valueOf(rs.getInt(IsSOTrx ? "C_PaymentTerm_ID" : "PO_PaymentTerm_ID")); if (!rs.wasNull()) mTab.setValue("C_PaymentTerm_ID", ii); @@ -206,7 +206,7 @@ public class CalloutInvoice extends CalloutEngine if (locID == 0) mTab.setValue("C_BPartner_Location_ID", null); else - mTab.setValue("C_BPartner_Location_ID", new Integer(locID)); + mTab.setValue("C_BPartner_Location_ID", Integer.valueOf(locID)); // Contact - overwritten by InfoBP selection int contID = rs.getInt("AD_User_ID"); @@ -219,7 +219,7 @@ public class CalloutInvoice extends CalloutEngine if (contID == 0) mTab.setValue("AD_User_ID", null); else - mTab.setValue("AD_User_ID", new Integer(contID)); + mTab.setValue("AD_User_ID", Integer.valueOf(contID)); // CreditAvailable if (IsSOTrx) @@ -358,9 +358,9 @@ public class CalloutInvoice extends CalloutEngine mTab.setValue("PriceLimit", pp.getPriceLimit()); mTab.setValue("PriceActual", pp.getPriceStd()); mTab.setValue("PriceEntered", pp.getPriceStd()); - mTab.setValue("C_Currency_ID", new Integer(pp.getC_Currency_ID())); + mTab.setValue("C_Currency_ID", Integer.valueOf(pp.getC_Currency_ID())); // mTab.setValue("Discount", pp.getDiscount()); - mTab.setValue("C_UOM_ID", new Integer(pp.getC_UOM_ID())); + mTab.setValue("C_UOM_ID", Integer.valueOf(pp.getC_UOM_ID())); Env.setContext(ctx, WindowNo, "EnforcePriceLimit", pp.isEnforcePriceLimit() ? "Y" : "N"); Env.setContext(ctx, WindowNo, "DiscountSchema", pp.isDiscountSchema() ? "Y" : "N"); // @@ -393,7 +393,7 @@ public class CalloutInvoice extends CalloutEngine } mTab.setValue("M_AttributeSetInstance_ID", null); mTab.setValue("S_ResourceAssignment_ID", null); - mTab.setValue("C_UOM_ID", new Integer(100)); // EA + mTab.setValue("C_UOM_ID", Integer.valueOf(100)); // EA Env.setContext(ctx, WindowNo, "DiscountSchema", "N"); String sql = "SELECT ChargeAmt FROM C_Charge WHERE C_Charge_ID=?"; @@ -490,7 +490,7 @@ public class CalloutInvoice extends CalloutEngine if (C_Tax_ID == 0) mTab.fireDataStatusEEvent(CLogger.retrieveError()); else - mTab.setValue("C_Tax_ID", new Integer(C_Tax_ID)); + mTab.setValue("C_Tax_ID", Integer.valueOf(C_Tax_ID)); // return amt (ctx, WindowNo, mTab, mField, value); } // tax diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutInvoiceBatch.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutInvoiceBatch.java index 8927608662..73b9c46135 100644 --- a/org.adempiere.base.callout/src/org/compiere/model/CalloutInvoiceBatch.java +++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutInvoiceBatch.java @@ -108,7 +108,7 @@ public class CalloutInvoiceBatch extends CalloutEngine if (Env.getContext(ctx, WindowNo, "DocBaseType").endsWith("C")) // Credits are Payment Term s = X_C_Invoice.PAYMENTRULE_OnCredit; // Payment Term - Integer ii = new Integer(rs.getInt(IsSOTrx ? "C_PaymentTerm_ID" : "PO_PaymentTerm_ID")); + Integer ii = Integer.valueOf(rs.getInt(IsSOTrx ? "C_PaymentTerm_ID" : "PO_PaymentTerm_ID")); if (!rs.wasNull()) mTab.setValue("C_PaymentTerm_ID", ii); @@ -125,7 +125,7 @@ public class CalloutInvoiceBatch extends CalloutEngine if (locID == 0) mTab.setValue("C_BPartner_Location_ID", null); else - mTab.setValue("C_BPartner_Location_ID", new Integer(locID)); + mTab.setValue("C_BPartner_Location_ID", Integer.valueOf(locID)); // Contact - overwritten by InfoBP selection int contID = rs.getInt("AD_User_ID"); @@ -138,7 +138,7 @@ public class CalloutInvoiceBatch extends CalloutEngine if (contID == 0) mTab.setValue("AD_User_ID", null); else - mTab.setValue("AD_User_ID", new Integer(contID)); + mTab.setValue("AD_User_ID", Integer.valueOf(contID)); // CreditAvailable if (IsSOTrx) @@ -324,7 +324,7 @@ public class CalloutInvoiceBatch extends CalloutEngine if (C_Tax_ID == 0) mTab.fireDataStatusEEvent(CLogger.retrieveError()); else - mTab.setValue("C_Tax_ID", new Integer(C_Tax_ID)); + mTab.setValue("C_Tax_ID", Integer.valueOf(C_Tax_ID)); // return amt (ctx, WindowNo, mTab, mField, value); } // tax diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutOrder.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutOrder.java index 704a2eb6ab..1c0a51d36a 100644 --- a/org.adempiere.base.callout/src/org/compiere/model/CalloutOrder.java +++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutOrder.java @@ -186,7 +186,7 @@ public class CalloutOrder extends CalloutEngine if (s != null && s.length() != 0) mTab.setValue("PaymentRule", s); // Payment Term - Integer ii =new Integer(rs.getInt(IsSOTrx ? "C_PaymentTerm_ID" : "PO_PaymentTerm_ID")); + Integer ii =Integer.valueOf(rs.getInt(IsSOTrx ? "C_PaymentTerm_ID" : "PO_PaymentTerm_ID")); if (!rs.wasNull()) mTab.setValue("C_PaymentTerm_ID", ii); // InvoiceRule @@ -278,7 +278,7 @@ public class CalloutOrder extends CalloutEngine } // PriceList (indirect: IsTaxIncluded & Currency) - Integer ii = new Integer(rs.getInt(IsSOTrx ? "M_PriceList_ID" : "PO_PriceList_ID")); + Integer ii = Integer.valueOf(rs.getInt(IsSOTrx ? "M_PriceList_ID" : "PO_PriceList_ID")); if (!rs.wasNull()) mTab.setValue("M_PriceList_ID", ii); else @@ -288,13 +288,13 @@ public class CalloutOrder extends CalloutEngine { MPriceList pl = new MPriceList(ctx, i, null); if (IsSOTrx == pl.isSOPriceList()) - mTab.setValue("M_PriceList_ID", new Integer(i)); + mTab.setValue("M_PriceList_ID", Integer.valueOf(i)); else { String sql2 = "SELECT M_PriceList_ID FROM M_PriceList WHERE AD_Client_ID=? AND IsSOPriceList=? AND IsActive='Y' ORDER BY IsDefault DESC"; ii = DB.getSQLValue (null, sql2, Env.getAD_Client_ID(ctx), IsSOTrx); if (ii != 0) - mTab.setValue("M_PriceList_ID", new Integer(ii)); + mTab.setValue("M_PriceList_ID", Integer.valueOf(ii)); } } } @@ -325,7 +325,7 @@ public class CalloutOrder extends CalloutEngine if (bill_Location_ID == 0) mTab.setValue("Bill_Location_ID", null); else - mTab.setValue("Bill_Location_ID", new Integer(bill_Location_ID)); + mTab.setValue("Bill_Location_ID", Integer.valueOf(bill_Location_ID)); // Ship-To Location if (shipTo_ID == 0) shipTo_ID = rs.getInt("C_BPartner_Location_ID"); @@ -333,7 +333,7 @@ public class CalloutOrder extends CalloutEngine if (shipTo_ID == 0) mTab.setValue("C_BPartner_Location_ID", null); else - mTab.setValue("C_BPartner_Location_ID", new Integer(shipTo_ID)); + mTab.setValue("C_BPartner_Location_ID", Integer.valueOf(shipTo_ID)); // Contact - overwritten by InfoBP selection int contID = rs.getInt("AD_User_ID"); @@ -347,8 +347,8 @@ public class CalloutOrder extends CalloutEngine mTab.setValue("AD_User_ID", null); else { - mTab.setValue("AD_User_ID", new Integer(contID)); - mTab.setValue("Bill_User_ID", new Integer(contID)); + mTab.setValue("AD_User_ID", Integer.valueOf(contID)); + mTab.setValue("Bill_User_ID", Integer.valueOf(contID)); } // CreditAvailable @@ -399,7 +399,7 @@ public class CalloutOrder extends CalloutEngine if (s != null && s.length() != 0) mTab.setValue("PaymentRule", s); // Payment Term - ii = new Integer(rs.getInt(IsSOTrx ? "C_PaymentTerm_ID" : "PO_PaymentTerm_ID")); + ii = Integer.valueOf(rs.getInt(IsSOTrx ? "C_PaymentTerm_ID" : "PO_PaymentTerm_ID")); if (!rs.wasNull()) mTab.setValue("C_PaymentTerm_ID", ii); // InvoiceRule @@ -479,7 +479,7 @@ public class CalloutOrder extends CalloutEngine if (rs.next()) { // PriceList (indirect: IsTaxIncluded & Currency) - Integer ii = new Integer(rs.getInt(IsSOTrx ? "M_PriceList_ID" : "PO_PriceList_ID")); + Integer ii = Integer.valueOf(rs.getInt(IsSOTrx ? "M_PriceList_ID" : "PO_PriceList_ID")); if (!rs.wasNull()) mTab.setValue("M_PriceList_ID", ii); else @@ -489,13 +489,13 @@ public class CalloutOrder extends CalloutEngine { MPriceList pl = new MPriceList(ctx, i, null); if (IsSOTrx == pl.isSOPriceList()) - mTab.setValue("M_PriceList_ID", new Integer(i)); + mTab.setValue("M_PriceList_ID", Integer.valueOf(i)); else { String sql2 = "SELECT M_PriceList_ID FROM M_PriceList WHERE AD_Client_ID=? AND IsSOPriceList=? AND IsActive='Y' ORDER BY IsDefault DESC"; ii = DB.getSQLValue (null, sql2, Env.getAD_Client_ID(ctx), IsSOTrx); if (ii != 0) - mTab.setValue("M_PriceList_ID", new Integer(ii)); + mTab.setValue("M_PriceList_ID", Integer.valueOf(ii)); } } } @@ -518,7 +518,7 @@ public class CalloutOrder extends CalloutEngine if (bill_Location_ID == 0) mTab.setValue("Bill_Location_ID", null); else - mTab.setValue("Bill_Location_ID", new Integer(bill_Location_ID)); + mTab.setValue("Bill_Location_ID", Integer.valueOf(bill_Location_ID)); // Contact - overwritten by InfoBP selection int contID = rs.getInt("AD_User_ID"); @@ -531,7 +531,7 @@ public class CalloutOrder extends CalloutEngine if (contID == 0) mTab.setValue("Bill_User_ID", null); else - mTab.setValue("Bill_User_ID", new Integer(contID)); + mTab.setValue("Bill_User_ID", Integer.valueOf(contID)); // CreditAvailable if (IsSOTrx) @@ -577,7 +577,7 @@ public class CalloutOrder extends CalloutEngine if (s != null && s.length() != 0) mTab.setValue("PaymentRule", s); // Payment Term - ii = new Integer(rs.getInt(IsSOTrx ? "C_PaymentTerm_ID" : "PO_PaymentTerm_ID")); + ii = Integer.valueOf(rs.getInt(IsSOTrx ? "C_PaymentTerm_ID" : "PO_PaymentTerm_ID")); if (!rs.wasNull()) mTab.setValue("C_PaymentTerm_ID", ii); // InvoiceRule @@ -783,9 +783,9 @@ public class CalloutOrder extends CalloutEngine mTab.setValue("PriceLimit", pp.getPriceLimit()); mTab.setValue("PriceActual", pp.getPriceStd()); mTab.setValue("PriceEntered", pp.getPriceStd()); - mTab.setValue("C_Currency_ID", new Integer(pp.getC_Currency_ID())); + mTab.setValue("C_Currency_ID", Integer.valueOf(pp.getC_Currency_ID())); mTab.setValue("Discount", pp.getDiscount()); - mTab.setValue("C_UOM_ID", new Integer(pp.getC_UOM_ID())); + mTab.setValue("C_UOM_ID", Integer.valueOf(pp.getC_UOM_ID())); mTab.setValue("QtyOrdered", mTab.getValue("QtyEntered")); Env.setContext(ctx, WindowNo, "EnforcePriceLimit", pp.isEnforcePriceLimit() ? "Y" : "N"); Env.setContext(ctx, WindowNo, "DiscountSchema", pp.isDiscountSchema() ? "Y" : "N"); @@ -795,7 +795,7 @@ public class CalloutOrder extends CalloutEngine // Integer wh = (Integer)mTab.getValue("M_Warehouse_ID"); // if (wh.intValue() != M_Warehouse_ID) // { - // mTab.setValue("M_Warehouse_ID", new Integer(M_Warehouse_ID)); + // mTab.setValue("M_Warehouse_ID", Integer.valueOf(M_Warehouse_ID)); // ADialog.warn(,WindowNo, "WarehouseChanged"); // } @@ -822,7 +822,7 @@ public class CalloutOrder extends CalloutEngine { Integer C_OrderLine_ID = (Integer)mTab.getValue("C_OrderLine_ID"); if (C_OrderLine_ID == null) - C_OrderLine_ID = new Integer(0); + C_OrderLine_ID = Integer.valueOf(0); BigDecimal notReserved = MOrderLine.getNotReserved(ctx, M_Warehouse_ID, M_Product_ID, M_AttributeSetInstance_ID, C_OrderLine_ID.intValue()); @@ -869,7 +869,7 @@ public class CalloutOrder extends CalloutEngine } mTab.setValue("M_AttributeSetInstance_ID", null); mTab.setValue("S_ResourceAssignment_ID", null); - mTab.setValue("C_UOM_ID", new Integer(100)); // EA + mTab.setValue("C_UOM_ID", Integer.valueOf(100)); // EA Env.setContext(ctx, WindowNo, "DiscountSchema", "N"); String sql = "SELECT ChargeAmt FROM C_Charge WHERE C_Charge_ID=?"; @@ -976,7 +976,7 @@ public class CalloutOrder extends CalloutEngine if (C_Tax_ID == 0) mTab.fireDataStatusEEvent(CLogger.retrieveError()); else - mTab.setValue("C_Tax_ID", new Integer(C_Tax_ID)); + mTab.setValue("C_Tax_ID", Integer.valueOf(C_Tax_ID)); // if (steps) log.warning("fini"); return amt(ctx, WindowNo, mTab, mField, value); @@ -1315,7 +1315,7 @@ public class CalloutOrder extends CalloutEngine { Integer C_OrderLine_ID = (Integer)mTab.getValue("C_OrderLine_ID"); if (C_OrderLine_ID == null) - C_OrderLine_ID = new Integer(0); + C_OrderLine_ID = Integer.valueOf(0); BigDecimal notReserved = MOrderLine.getNotReserved(ctx, M_Warehouse_ID, M_Product_ID, M_AttributeSetInstance_ID, C_OrderLine_ID.intValue()); diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutPaymentAllocate.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutPaymentAllocate.java index f02ea7bdd1..dd875b23a1 100644 --- a/org.adempiere.base.callout/src/org/compiere/model/CalloutPaymentAllocate.java +++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutPaymentAllocate.java @@ -95,9 +95,9 @@ public class CalloutPaymentAllocate extends CalloutEngine rs = pstmt.executeQuery(); if (rs.next()) { - // mTab.setValue("C_BPartner_ID", new Integer(rs.getInt(1))); + // mTab.setValue("C_BPartner_ID", Integer.valueOf(rs.getInt(1))); // int C_Currency_ID = rs.getInt(2); // Set Invoice Currency - // mTab.setValue("C_Currency_ID", new Integer(C_Currency_ID)); + // mTab.setValue("C_Currency_ID", Integer.valueOf(C_Currency_ID)); // BigDecimal InvoiceOpen = rs.getBigDecimal(3); // Set Invoice OPen Amount if (InvoiceOpen == null) diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutProductCategory.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutProductCategory.java index 1a54bbebbd..7a9cbd9f94 100644 --- a/org.adempiere.base.callout/src/org/compiere/model/CalloutProductCategory.java +++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutProductCategory.java @@ -43,7 +43,7 @@ public class CalloutProductCategory extends CalloutEngine Integer productCategoryId = (Integer) mTab.getValue(MProductCategory.COLUMNNAME_M_Product_Category_ID); if (productCategoryId == null) - productCategoryId = new Integer(0); + productCategoryId = Integer.valueOf(0); if (productCategoryId.intValue() > 0) { MProductCategory pc = new MProductCategory(ctx, productCategoryId.intValue(), null); diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutProduction.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutProduction.java index e1fef1647a..8d686f27e6 100644 --- a/org.adempiere.base.callout/src/org/compiere/model/CalloutProduction.java +++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutProduction.java @@ -51,7 +51,7 @@ public class CalloutProduction extends CalloutEngine if (Env.getContextAsInt(ctx, WindowNo, Env.TAB_INFO, "M_Product_ID") == M_Product_ID.intValue() && Env.getContextAsInt(ctx, WindowNo, Env.TAB_INFO, "M_AttributeSetInstance_ID") != 0) { - mTab.setValue("M_AttributeSetInstance_ID", new Integer(Env.getContextAsInt(ctx, WindowNo, Env.TAB_INFO, "M_AttributeSetInstance_ID"))); + mTab.setValue("M_AttributeSetInstance_ID", Integer.valueOf(Env.getContextAsInt(ctx, WindowNo, Env.TAB_INFO, "M_AttributeSetInstance_ID"))); } else { diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutRequest.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutRequest.java index 5ae3fd5c16..af0f100e31 100644 --- a/org.adempiere.base.callout/src/org/compiere/model/CalloutRequest.java +++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutRequest.java @@ -138,7 +138,7 @@ public class CalloutRequest extends CalloutEngine MRequestType rt = MRequestType.get(ctx, R_RequestType_ID); int R_Status_ID = rt.getDefaultR_Status_ID(); if (R_Status_ID != 0) - mTab.setValue("R_Status_ID", new Integer(R_Status_ID)); + mTab.setValue("R_Status_ID", Integer.valueOf(R_Status_ID)); return ""; } // type diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutTimeExpense.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutTimeExpense.java index b26c16a5a1..83f0341425 100644 --- a/org.adempiere.base.callout/src/org/compiere/model/CalloutTimeExpense.java +++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutTimeExpense.java @@ -98,7 +98,7 @@ public class CalloutTimeExpense extends CalloutEngine if (priceActual == null) priceActual = rs.getBigDecimal("PriceLimit"); // Currency - Integer ii = new Integer(rs.getInt("C_Currency_ID")); + Integer ii = Integer.valueOf(rs.getInt("C_Currency_ID")); if (!rs.wasNull()) mTab.setValue("C_Currency_ID", ii); } @@ -143,7 +143,7 @@ public class CalloutTimeExpense extends CalloutEngine if (priceActual == null) priceActual = rs.getBigDecimal("PriceLimit"); // Currency - Integer ii = new Integer(rs.getInt("C_Currency_ID")); + Integer ii = Integer.valueOf(rs.getInt("C_Currency_ID")); if (!rs.wasNull()) mTab.setValue("C_Currency_ID", ii); } diff --git a/org.adempiere.base.process/src/org/adempiere/process/Export.java b/org.adempiere.base.process/src/org/adempiere/process/Export.java index 5f366a04c3..091f33c20c 100644 --- a/org.adempiere.base.process/src/org/adempiere/process/Export.java +++ b/org.adempiere.base.process/src/org/adempiere/process/Export.java @@ -173,7 +173,7 @@ public class Export extends SvrProcess if (rs.next()) { HashMap variableMap = new HashMap(); - variableMap.put(TOTAL_SEGMENTS, new Integer(1)); + variableMap.put(TOTAL_SEGMENTS, Integer.valueOf(1)); Element rootElement = outDocument.createElement(exportFormat.getValue()); rootElement.appendChild(outDocument.createComment(exportFormat.getDescription())); @@ -395,11 +395,11 @@ public class Export extends SvrProcess if (variableName != null && !"".equals(variableName) ) { Integer var = variableMap.get(variableName); if (var == null) { - var = new Integer(0); + var = Integer.valueOf(0); } int intValue = var.intValue(); intValue++; - variableMap.put(variableName, new Integer(intValue)); + variableMap.put(variableName, Integer.valueOf(intValue)); } } diff --git a/org.adempiere.base.process/src/org/compiere/process/AcctSchemaCopyAcct.java b/org.adempiere.base.process/src/org/compiere/process/AcctSchemaCopyAcct.java index 8d32c72762..b21313997a 100644 --- a/org.adempiere.base.process/src/org/compiere/process/AcctSchemaCopyAcct.java +++ b/org.adempiere.base.process/src/org/compiere/process/AcctSchemaCopyAcct.java @@ -122,7 +122,7 @@ public class AcctSchemaCopyAcct extends SvrProcess String columnName = pp.getName(); MAccount sourceAccount = MAccount.get(getCtx(), sourceC_ValidCombination_ID); MAccount targetAccount = createAccount(targetAS, sourceAccount); - target.setValue(columnName, new Integer(targetAccount.getC_ValidCombination_ID())); + target.setValue(columnName, Integer.valueOf(targetAccount.getC_ValidCombination_ID())); } if (!target.save()) throw new AdempiereSystemError("Could not Save GL"); @@ -147,7 +147,7 @@ public class AcctSchemaCopyAcct extends SvrProcess String columnName = pp.getName(); MAccount sourceAccount = MAccount.get(getCtx(), sourceC_ValidCombination_ID); MAccount targetAccount = createAccount(targetAS, sourceAccount); - target.setValue(columnName, new Integer(targetAccount.getC_ValidCombination_ID())); + target.setValue(columnName, Integer.valueOf(targetAccount.getC_ValidCombination_ID())); } if (!target.save()) throw new AdempiereSystemError("Could not Save Default"); diff --git a/org.adempiere.base.process/src/org/compiere/process/DunningPrint.java b/org.adempiere.base.process/src/org/compiere/process/DunningPrint.java index 484a55f868..3ca5c296f2 100644 --- a/org.adempiere.base.process/src/org/compiere/process/DunningPrint.java +++ b/org.adempiere.base.process/src/org/compiere/process/DunningPrint.java @@ -159,7 +159,7 @@ public class DunningPrint extends SvrProcess // query MQuery query = new MQuery("C_Dunning_Header_v"); query.addRestriction("C_DunningRunEntry_ID", MQuery.EQUAL, - new Integer(entry.getC_DunningRunEntry_ID())); + Integer.valueOf(entry.getC_DunningRunEntry_ID())); // Engine PrintInfo info = new PrintInfo( diff --git a/org.adempiere.base.process/src/org/compiere/process/InvoicePrint.java b/org.adempiere.base.process/src/org/compiere/process/InvoicePrint.java index 2d73778a12..b621f48f3c 100644 --- a/org.adempiere.base.process/src/org/compiere/process/InvoicePrint.java +++ b/org.adempiere.base.process/src/org/compiere/process/InvoicePrint.java @@ -275,7 +275,7 @@ public class InvoicePrint extends SvrProcess format.setTranslationLanguage(language); // query MQuery query = new MQuery("C_Invoice_Header_v"); - query.addRestriction("C_Invoice_ID", MQuery.EQUAL, new Integer(C_Invoice_ID)); + query.addRestriction("C_Invoice_ID", MQuery.EQUAL, Integer.valueOf(C_Invoice_ID)); // Engine PrintInfo info = new PrintInfo( diff --git a/org.adempiere.base.process/src/org/compiere/process/ReplicationLocal.java b/org.adempiere.base.process/src/org/compiere/process/ReplicationLocal.java index 0ae55bbb6b..0afed49056 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ReplicationLocal.java +++ b/org.adempiere.base.process/src/org/compiere/process/ReplicationLocal.java @@ -170,7 +170,7 @@ public class ReplicationLocal extends SvrProcess + "WHERE rt.IsActive='Y' AND t.IsActive='Y'" + " AND AD_ReplicationStrategy_ID=? " // #1 + "ORDER BY t.LoadSeq"; - RowSet rowset = getRowSet(sql, new Object[]{new Integer(m_replication.getAD_ReplicationStrategy_ID())}); + RowSet rowset = getRowSet(sql, new Object[]{Integer.valueOf(m_replication.getAD_ReplicationStrategy_ID())}); if (rowset == null) throw new Exception("setupRemote - No RowSet Data"); @@ -222,7 +222,7 @@ public class ReplicationLocal extends SvrProcess + " AND AD_ReplicationStrategy_ID=?" // #1 + " AND rt.ReplicationType='M' " // Merge + "ORDER BY t.LoadSeq"; - RowSet rowset = getRowSet(sql, new Object[]{new Integer(m_replication.getAD_ReplicationStrategy_ID())}); + RowSet rowset = getRowSet(sql, new Object[]{Integer.valueOf(m_replication.getAD_ReplicationStrategy_ID())}); try { while (rowset.next()) @@ -400,7 +400,7 @@ public class ReplicationLocal extends SvrProcess + " AND AD_ReplicationStrategy_ID=?" // #1 + " AND rt.ReplicationType='R' " // Reference + "ORDER BY t.LoadSeq"; - RowSet rowset = getRowSet(sql, new Object[]{new Integer(m_replication.getAD_ReplicationStrategy_ID())}); + RowSet rowset = getRowSet(sql, new Object[]{Integer.valueOf(m_replication.getAD_ReplicationStrategy_ID())}); try { while (rowset.next()) diff --git a/org.adempiere.base/src/com/akunagroup/uk/postcode/AddressLookup.java b/org.adempiere.base/src/com/akunagroup/uk/postcode/AddressLookup.java index 16e9d4f042..39ba901d73 100644 --- a/org.adempiere.base/src/com/akunagroup/uk/postcode/AddressLookup.java +++ b/org.adempiere.base/src/com/akunagroup/uk/postcode/AddressLookup.java @@ -252,7 +252,7 @@ public class AddressLookup implements AddressLookupInterface { NodeList firstValueList = firstElement.getElementsByTagName("Value"); Element ValueElement = (Element) firstValueList.item(0); if (log.isLoggable(Level.FINE)){log.log(Level.FINE, "Value: " + ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim() + " Node: " + i);} - resultCode = (int) new Integer(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim()); + resultCode = (int) Integer.valueOf(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim()); } } diff --git a/org.adempiere.base/src/org/adempiere/base/DefaultModelFactory.java b/org.adempiere.base/src/org/adempiere/base/DefaultModelFactory.java index 8a48f6c49e..309f58a47d 100644 --- a/org.adempiere.base/src/org/adempiere/base/DefaultModelFactory.java +++ b/org.adempiere.base/src/org/adempiere/base/DefaultModelFactory.java @@ -269,7 +269,7 @@ public class DefaultModelFactory implements IModelFactory { s_log.warning("No transaction Constructor for " + clazz + " (" + msg + ")"); } - PO po = constructor!=null ? (PO)constructor.newInstance(new Object[] {Env.getCtx(), new Integer(Record_ID), trxName}) : null; + PO po = constructor!=null ? (PO)constructor.newInstance(new Object[] {Env.getCtx(), Integer.valueOf(Record_ID), trxName}) : null; return po; } catch (Exception e) diff --git a/org.adempiere.base/src/org/adempiere/model/GenericPO.java b/org.adempiere.base/src/org/adempiere/model/GenericPO.java index e65deb5f10..6fd50521e6 100644 --- a/org.adempiere.base/src/org/adempiere/model/GenericPO.java +++ b/org.adempiere.base/src/org/adempiere/model/GenericPO.java @@ -114,7 +114,7 @@ public class GenericPO extends PO { if (AD_OrgTrx_ID == 0) set_Value("AD_OrgTrx_ID", null); else - set_Value("AD_OrgTrx_ID", new Integer(AD_OrgTrx_ID)); + set_Value("AD_OrgTrx_ID", Integer.valueOf(AD_OrgTrx_ID)); } /** diff --git a/org.adempiere.base/src/org/adempiere/model/MBroadcastMessage.java b/org.adempiere.base/src/org/adempiere/model/MBroadcastMessage.java index 240c61e860..7dbe1287ac 100644 --- a/org.adempiere.base/src/org/adempiere/model/MBroadcastMessage.java +++ b/org.adempiere.base/src/org/adempiere/model/MBroadcastMessage.java @@ -50,7 +50,7 @@ public class MBroadcastMessage extends X_AD_BroadcastMessage public static MBroadcastMessage get (Properties ctx, int AD_BroadcastMessage_ID) { - Integer key = new Integer(AD_BroadcastMessage_ID); + Integer key = Integer.valueOf(AD_BroadcastMessage_ID); MBroadcastMessage retValue = (MBroadcastMessage)s_cache.get(key); if (retValue == null) { diff --git a/org.adempiere.base/src/org/adempiere/util/AbstractDocumentSearch.java b/org.adempiere.base/src/org/adempiere/util/AbstractDocumentSearch.java index 126a137bc0..539ffd1418 100644 --- a/org.adempiere.base/src/org/adempiere/util/AbstractDocumentSearch.java +++ b/org.adempiere.base/src/org/adempiere/util/AbstractDocumentSearch.java @@ -216,7 +216,7 @@ public abstract class AbstractDocumentSearch { rsSO = pstmtSO.executeQuery(); Vector idSO = new Vector(); while (rsSO.next()) { - idSO.add(new Integer(rsSO.getInt(1))); + idSO.add(Integer.valueOf(rsSO.getInt(1))); } if (role.getWindowAccess(msd.getAD_Window_ID()) != null) { msglog = new StringBuilder("Open Window: ").append(msd.getAD_Window_ID()).append(" / Table: ") @@ -225,7 +225,7 @@ public abstract class AbstractDocumentSearch { if (idSO.size() == 0 && (searchString == null || searchString.trim().length() == 0)) { // No search string - open the window with new record - idSO.add(new Integer(0)); + idSO.add(Integer.valueOf(0)); } openWindow(idSO, table.getTableName(), msd.getAD_Window_ID()); @@ -239,7 +239,7 @@ public abstract class AbstractDocumentSearch { rsPO = pstmtPO.executeQuery(); Vector idPO = new Vector(); while (rsPO.next()) { - idPO.add(new Integer(rsPO.getInt(1))); + idPO.add(Integer.valueOf(rsPO.getInt(1))); } if (role.getWindowAccess(msd.getPO_Window_ID()) != null) { msglog = new StringBuilder("Open Window: ").append(msd.getPO_Window_ID()).append(" / Table: ") diff --git a/org.adempiere.base/src/org/adempiere/util/GenerateModelJPA.java b/org.adempiere.base/src/org/adempiere/util/GenerateModelJPA.java index 7be10ba92d..19b1427911 100755 --- a/org.adempiere.base/src/org/adempiere/util/GenerateModelJPA.java +++ b/org.adempiere.base/src/org/adempiere/util/GenerateModelJPA.java @@ -406,7 +406,7 @@ public class GenerateModelJPA sb.append("if (").append (columnName).append (" <= 0) ") .append(setValue).append(" (\"").append(columnName).append("\", null); else \n"); } - sb.append(setValue).append(" (\"").append(columnName).append("\", new Integer(").append(columnName).append("));"); + sb.append(setValue).append(" (\"").append(columnName).append("\", Integer.valueOf(").append(columnName).append("));"); } else if (clazz.equals(Boolean.class)) sb.append(setValue).append(" (\"").append(columnName).append("\", Boolean.valueOf(").append(columnName).append("));"); diff --git a/org.adempiere.base/src/org/compiere/acct/Doc.java b/org.adempiere.base/src/org/compiere/acct/Doc.java index 1bc38d49ce..e4057ae418 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc.java @@ -1036,12 +1036,12 @@ public abstract class Doc } // Get All Currencies HashSet set = new HashSet(); - set.add(new Integer(getC_Currency_ID())); + set.add(Integer.valueOf(getC_Currency_ID())); for (int i = 0; p_lines != null && i < p_lines.length; i++) { int C_Currency_ID = p_lines[i].getC_Currency_ID(); if (C_Currency_ID != NO_CURRENCY) - set.add(new Integer(C_Currency_ID)); + set.add(Integer.valueOf(C_Currency_ID)); } // just one and the same diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_Order.java b/org.adempiere.base/src/org/compiere/acct/Doc_Order.java index e62ecb3521..451a5fc74e 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_Order.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_Order.java @@ -159,7 +159,7 @@ public class Doc_Order extends Doc for (int i = 0; i < oLines.length; i++) { MOrderLine line = oLines[i]; - qtys.put(new Integer(line.getC_OrderLine_ID()), line.getQtyOrdered()); + qtys.put(Integer.valueOf(line.getC_OrderLine_ID()), line.getQtyOrdered()); } // ArrayList list = new ArrayList(); @@ -182,7 +182,7 @@ public class Doc_Order extends Doc DocLine docLine = new DocLine (line, this); // Quantity - not more then OrderLine // Issue: Split of Requisition to multiple POs & different price - Integer key = new Integer(line.getC_OrderLine_ID()); + Integer key = Integer.valueOf(line.getC_OrderLine_ID()); BigDecimal maxQty = qtys.get(key); BigDecimal Qty = line.getQty().max(maxQty); if (Qty.signum() == 0) diff --git a/org.adempiere.base/src/org/compiere/acct/Fact.java b/org.adempiere.base/src/org/compiere/acct/Fact.java index ff5803466f..943f9a5abb 100644 --- a/org.adempiere.base/src/org/compiere/acct/Fact.java +++ b/org.adempiere.base/src/org/compiere/acct/Fact.java @@ -378,7 +378,7 @@ public final class Fact for (int i = 0; i < m_lines.size(); i++) { FactLine line = (FactLine)m_lines.get(i); - Integer key = new Integer(line.getAD_Org_ID()); + Integer key = Integer.valueOf(line.getAD_Org_ID()); BigDecimal bal = line.getSourceBalance(); BigDecimal oldBal = (BigDecimal)map.get(key); if (oldBal != null) @@ -445,7 +445,7 @@ public final class Fact for (int i = 0; i < m_lines.size(); i++) { FactLine line = (FactLine)m_lines.get(i); - Integer key = new Integer(line.getAD_Org_ID()); + Integer key = Integer.valueOf(line.getAD_Org_ID()); // BigDecimal balance = line.getSourceBalance(); Balance oldBalance = (Balance)map.get(key); if (oldBalance == null) diff --git a/org.adempiere.base/src/org/compiere/cm/WebProjectDeploy.java b/org.adempiere.base/src/org/compiere/cm/WebProjectDeploy.java index 5ab1d0cba3..4016683e86 100644 --- a/org.adempiere.base/src/org/compiere/cm/WebProjectDeploy.java +++ b/org.adempiere.base/src/org/compiere/cm/WebProjectDeploy.java @@ -94,7 +94,7 @@ public class WebProjectDeploy extends SvrProcess // Stage MCStage[] stages = MCStage.getStages(m_project); for (int i = 0; i < stages.length; i++) - m_map.put(new Integer(stages[i].getCM_CStage_ID()), stages[i]); + m_map.put(Integer.valueOf(stages[i].getCM_CStage_ID()), stages[i]); // Copy Stage Tree MTree treeS = new MTree (getCtx(), m_project.getAD_TreeCMS_ID(), false, false, get_TrxName()); @@ -106,7 +106,7 @@ public class WebProjectDeploy extends SvrProcess for (int i = 0; i < containers.length; i++) { MContainer container = containers[i]; - if (!m_idList.contains(new Integer(container.getCM_Container_ID()))) + if (!m_idList.contains(Integer.valueOf(container.getCM_Container_ID()))) { String name = container.getName(); if (container.delete(true)) { @@ -155,14 +155,14 @@ public class WebProjectDeploy extends SvrProcess private void copyStage (MTreeNode node, String path) { org.compiere.cm.CacheHandler thisHandler = new org.compiere.cm.CacheHandler(org.compiere.cm.CacheHandler.convertJNPURLToCacheURL(getCtx().getProperty("java.naming.provider.url")), log, getCtx(), get_TrxName()); - Integer ID = new Integer(node.getNode_ID()); + Integer ID = Integer.valueOf(node.getNode_ID()); MCStage stage = m_map.get(ID); // int size = node.getChildCount(); for (int i = 0; i < size; i++) { MTreeNode child = (MTreeNode)node.getChildAt(i); - ID = new Integer(child.getNode_ID()); + ID = Integer.valueOf(child.getNode_ID()); stage = m_map.get(ID); if (stage == null) { diff --git a/org.adempiere.base/src/org/compiere/model/CalloutEngine.java b/org.adempiere.base/src/org/compiere/model/CalloutEngine.java index c734b8e437..c17bfae198 100644 --- a/org.adempiere.base/src/org/compiere/model/CalloutEngine.java +++ b/org.adempiere.base/src/org/compiere/model/CalloutEngine.java @@ -103,9 +103,9 @@ public class CalloutEngine implements Callout { Object[] args = null; if (argLength == 6) - args = new Object[] {ctx, new Integer(WindowNo), mTab, mField, value, oldValue}; + args = new Object[] {ctx, Integer.valueOf(WindowNo), mTab, mField, value, oldValue}; else - args = new Object[] {ctx, new Integer(WindowNo), mTab, mField, value}; + args = new Object[] {ctx, Integer.valueOf(WindowNo), mTab, mField, value}; retValue = (String)method.invoke(this, args); } catch (Exception e) diff --git a/org.adempiere.base/src/org/compiere/model/GridField.java b/org.adempiere.base/src/org/compiere/model/GridField.java index 12618898a2..1f26b575df 100644 --- a/org.adempiere.base/src/org/compiere/model/GridField.java +++ b/org.adempiere.base/src/org/compiere/model/GridField.java @@ -791,14 +791,14 @@ public class GridField && (m_vo.ColumnName.equals("AD_Client_ID") || m_vo.ColumnName.equals("AD_Org_ID"))) { if (log.isLoggable(Level.FINE)) log.fine("[SystemAccess] " + m_vo.ColumnName + "=0"); - return new Integer(0); + return Integer.valueOf(0); } // Set Org to System, if Client access else if (X_AD_Table.ACCESSLEVEL_SystemPlusClient.equals(Env.getContext(m_vo.ctx, m_vo.WindowNo, m_vo.TabNo, GridTab.CTX_AccessLevel)) && m_vo.ColumnName.equals("AD_Org_ID")) { if (log.isLoggable(Level.FINE)) log.fine("[ClientAccess] " + m_vo.ColumnName + "=0"); - return new Integer(0); + return Integer.valueOf(0); } return null; @@ -1057,17 +1057,17 @@ public class GridField int ii = Integer.parseInt(value); if (ii < 0) return null; - return new Integer(ii); + return Integer.valueOf(ii); } catch (Exception e) { log.warning("Cannot parse: " + value + " - " + e.getMessage()); } - return new Integer(0); + return Integer.valueOf(0); } // Integer if (m_vo.displayType == DisplayType.Integer) - return new Integer(value); + return Integer.valueOf(value); // Number if (DisplayType.isNumeric(m_vo.displayType)) @@ -2057,7 +2057,7 @@ public class GridField || (DisplayType.isID(dt) && getColumnName().endsWith("_ID"))) { int i = Integer.parseInt(newValue); - setValue (new Integer(i), inserting); + setValue (Integer.valueOf(i), inserting); } // Return BigDecimal else if (DisplayType.isNumeric(dt)) diff --git a/org.adempiere.base/src/org/compiere/model/GridFieldVO.java b/org.adempiere.base/src/org/compiere/model/GridFieldVO.java index f2c08f4e79..479b719e52 100644 --- a/org.adempiere.base/src/org/compiere/model/GridFieldVO.java +++ b/org.adempiere.base/src/org/compiere/model/GridFieldVO.java @@ -870,7 +870,7 @@ public class GridFieldVO implements Serializable public static class SeqNoComparator implements Comparator { @Override public int compare(GridFieldVO gf1, GridFieldVO gf2) { - return (new Integer(gf1.SeqNo)).compareTo(new Integer(gf2.SeqNo)); + return (Integer.valueOf(gf1.SeqNo)).compareTo(Integer.valueOf(gf2.SeqNo)); } } diff --git a/org.adempiere.base/src/org/compiere/model/GridTab.java b/org.adempiere.base/src/org/compiere/model/GridTab.java index 3e12193eb0..32ae99bec6 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTab.java +++ b/org.adempiere.base/src/org/compiere/model/GridTab.java @@ -1818,7 +1818,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable if (rs.next()) { // {0} - Number of lines - Integer lines = new Integer(rs.getInt(1)); + Integer lines = Integer.valueOf(rs.getInt(1)); arguments[0] = lines; // {1} - Line net Double net = Double.valueOf(rs.getDouble(2)); @@ -1905,7 +1905,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable if (rs.next()) { // {0} - Number of lines - Integer lines = new Integer(rs.getInt(1)); + Integer lines = Integer.valueOf(rs.getInt(1)); arguments[0] = lines; // {1} - Line toral Double lineTotal = Double.valueOf(rs.getDouble(3)); @@ -1979,7 +1979,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable if (rs.next()) { // {0} - Number of lines - Integer lines = new Integer(rs.getInt(1)); + Integer lines = Integer.valueOf(rs.getInt(1)); arguments[0] = lines; // {1} - Line total Double total = Double.valueOf(rs.getDouble(2)); @@ -2234,7 +2234,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable rs = pstmt.executeQuery(); while (rs.next()) { - Integer key = new Integer(rs.getInt(1)); + Integer key = Integer.valueOf(rs.getInt(1)); m_Lock.add(key); } } @@ -2264,7 +2264,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable if (m_Lock == null || m_Lock.isEmpty()) return false; // - Integer key = new Integer(m_mTable.getKeyID (m_currentRow)); + Integer key = Integer.valueOf(m_mTable.getKeyID (m_currentRow)); return m_Lock.contains(key); } // isLocked @@ -3190,9 +3190,9 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable lineNoCurrentRow = (Integer) m_mTable.getValueAt(from, lineCol); lineNoNextRow = (Integer) m_mTable.getValueAt(to, lineCol); } else if (m_mTable.getValueAt(from, lineCol) instanceof BigDecimal) { - lineNoCurrentRow = new Integer(((BigDecimal) m_mTable.getValueAt(from, lineCol)) + lineNoCurrentRow = Integer.valueOf(((BigDecimal) m_mTable.getValueAt(from, lineCol)) .intValue()); - lineNoNextRow = new Integer(((BigDecimal) m_mTable.getValueAt(to, lineCol)) + lineNoNextRow = Integer.valueOf(((BigDecimal) m_mTable.getValueAt(to, lineCol)) .intValue()); } else { log.fine("unknown value format - return"); diff --git a/org.adempiere.base/src/org/compiere/model/GridTable.java b/org.adempiere.base/src/org/compiere/model/GridTable.java index dfd26c2762..cc11e1a1e8 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTable.java +++ b/org.adempiere.base/src/org/compiere/model/GridTable.java @@ -1303,8 +1303,8 @@ public class GridTable extends AbstractTableModel // Save old value m_oldValue = new Object[3]; - m_oldValue[0] = new Integer(row); - m_oldValue[1] = new Integer(col); + m_oldValue[0] = Integer.valueOf(row); + m_oldValue[1] = Integer.valueOf(col); m_oldValue[2] = oldValue; // Set Data item @@ -1894,7 +1894,7 @@ public class GridTable extends AbstractTableModel if (dd instanceof Integer) iii = (Integer)dd; else - iii = new Integer(dd.toString()); + iii = Integer.valueOf(dd.toString()); if (encrypted) iii = (Integer)encrypt(iii, getAD_Client_ID()); if (manualUpdate) @@ -3242,7 +3242,7 @@ public class GridTable extends AbstractTableModel // Integer, ID, Lookup if (displayType == DisplayType.Integer || (DisplayType.isID(displayType) && !(columnName.equals("EntityType") || columnName.equals("AD_Language")))) { - rowData[j] = new Integer(rs.getInt(j+1)); // Integer + rowData[j] = Integer.valueOf(rs.getInt(j+1)); // Integer if (rs.wasNull()) rowData[j] = null; } diff --git a/org.adempiere.base/src/org/compiere/model/MAcctSchema.java b/org.adempiere.base/src/org/compiere/model/MAcctSchema.java index 495bf66133..58bd6f7dde 100644 --- a/org.adempiere.base/src/org/compiere/model/MAcctSchema.java +++ b/org.adempiere.base/src/org/compiere/model/MAcctSchema.java @@ -62,7 +62,7 @@ public class MAcctSchema extends X_C_AcctSchema public static MAcctSchema get (Properties ctx, int C_AcctSchema_ID, String trxName) { // Check Cache - Integer key = new Integer(C_AcctSchema_ID); + Integer key = Integer.valueOf(C_AcctSchema_ID); MAcctSchema retValue = (MAcctSchema)s_cache.get(key); if (retValue != null) return retValue; @@ -93,7 +93,7 @@ public class MAcctSchema extends X_C_AcctSchema public static synchronized MAcctSchema[] getClientAcctSchema (Properties ctx, int AD_Client_ID, String trxName) { // Check Cache - Integer key = new Integer(AD_Client_ID); + Integer key = Integer.valueOf(AD_Client_ID); if (s_schema.containsKey(key)) return (MAcctSchema[])s_schema.get(key); diff --git a/org.adempiere.base/src/org/compiere/model/MAging.java b/org.adempiere.base/src/org/compiere/model/MAging.java index 9396a52e91..05d5332fd0 100644 --- a/org.adempiere.base/src/org/compiere/model/MAging.java +++ b/org.adempiere.base/src/org/compiere/model/MAging.java @@ -116,9 +116,9 @@ public class MAging extends X_T_Aging // Optional // setC_Invoice_ID (C_Invoice_ID); // may be zero - set_ValueNoCheck ("C_Invoice_ID", new Integer(C_Invoice_ID)); + set_ValueNoCheck ("C_Invoice_ID", Integer.valueOf(C_Invoice_ID)); // setC_InvoicePaySchedule_ID(C_InvoicePaySchedule_ID); // may be zero - set_Value ("C_InvoicePaySchedule_ID", new Integer(C_InvoicePaySchedule_ID)); + set_Value ("C_InvoicePaySchedule_ID", Integer.valueOf(C_InvoicePaySchedule_ID)); setIsListInvoices(C_Invoice_ID != 0); // setDueDate(DueDate); // only sensible if List invoices @@ -156,9 +156,9 @@ public class MAging extends X_T_Aging // Optional // setC_Invoice_ID (C_Invoice_ID); // may be zero - set_ValueNoCheck ("C_Invoice_ID", new Integer(C_Invoice_ID)); + set_ValueNoCheck ("C_Invoice_ID", Integer.valueOf(C_Invoice_ID)); // setC_InvoicePaySchedule_ID(C_InvoicePaySchedule_ID); // may be zero - set_Value ("C_InvoicePaySchedule_ID", new Integer(C_InvoicePaySchedule_ID)); + set_Value ("C_InvoicePaySchedule_ID", Integer.valueOf(C_InvoicePaySchedule_ID)); setIsListInvoices(C_Invoice_ID != 0); // setDueDate(DueDate); // only sensible if List invoices diff --git a/org.adempiere.base/src/org/compiere/model/MBPartner.java b/org.adempiere.base/src/org/compiere/model/MBPartner.java index d704367e27..7cdff9a3a9 100644 --- a/org.adempiere.base/src/org/compiere/model/MBPartner.java +++ b/org.adempiere.base/src/org/compiere/model/MBPartner.java @@ -63,7 +63,7 @@ public class MBPartner extends X_C_BPartner // Reset if (template != null) { - template.set_ValueNoCheck ("C_BPartner_ID", new Integer(0)); + template.set_ValueNoCheck ("C_BPartner_ID", Integer.valueOf(0)); template.set_ValueNoCheck ("C_BPartner_UU", (String)null); template.setAD_OrgBP_ID(0); template.setLogo_ID(0); diff --git a/org.adempiere.base/src/org/compiere/model/MBPartnerLocation.java b/org.adempiere.base/src/org/compiere/model/MBPartnerLocation.java index 11b5aa17b1..dc3866976c 100644 --- a/org.adempiere.base/src/org/compiere/model/MBPartnerLocation.java +++ b/org.adempiere.base/src/org/compiere/model/MBPartnerLocation.java @@ -105,7 +105,7 @@ public class MBPartnerLocation extends X_C_BPartner_Location { this(bp.getCtx(), 0, bp.get_TrxName()); setClientOrg(bp); // may (still) be 0 - set_ValueNoCheck("C_BPartner_ID", new Integer(bp.getC_BPartner_ID())); + set_ValueNoCheck("C_BPartner_ID", Integer.valueOf(bp.getC_BPartner_ID())); } // MBPartner_Location /** diff --git a/org.adempiere.base/src/org/compiere/model/MChangeLog.java b/org.adempiere.base/src/org/compiere/model/MChangeLog.java index a282041244..8ed28049c6 100644 --- a/org.adempiere.base/src/org/compiere/model/MChangeLog.java +++ b/org.adempiere.base/src/org/compiere/model/MChangeLog.java @@ -72,7 +72,7 @@ public class MChangeLog extends X_AD_ChangeLog pstmt = DB.prepareStatement(sql, null); rs = pstmt.executeQuery(); while (rs.next()) - list.add(new Integer(rs.getInt(1))); + list.add(Integer.valueOf(rs.getInt(1))); } catch (Exception e) { diff --git a/org.adempiere.base/src/org/compiere/model/MConversionType.java b/org.adempiere.base/src/org/compiere/model/MConversionType.java index 93b9bc42f2..eff54e7928 100644 --- a/org.adempiere.base/src/org/compiere/model/MConversionType.java +++ b/org.adempiere.base/src/org/compiere/model/MConversionType.java @@ -66,7 +66,7 @@ public class MConversionType extends X_C_ConversionType + "ORDER BY IsDefault DESC, AD_Client_ID DESC"; C_ConversionType_ID = DB.getSQLValue(null, sql, AD_Client_ID); // Return - s_cache.put(key, new Integer(C_ConversionType_ID)); + s_cache.put(key, Integer.valueOf(C_ConversionType_ID)); return C_ConversionType_ID; } // getDefault diff --git a/org.adempiere.base/src/org/compiere/model/MCurrency.java b/org.adempiere.base/src/org/compiere/model/MCurrency.java index daf865d361..efae23d85f 100644 --- a/org.adempiere.base/src/org/compiere/model/MCurrency.java +++ b/org.adempiere.base/src/org/compiere/model/MCurrency.java @@ -125,7 +125,7 @@ public class MCurrency extends X_C_Currency public static MCurrency get (Properties ctx, int C_Currency_ID) { // Try Cache - Integer key = new Integer(C_Currency_ID); + Integer key = Integer.valueOf(C_Currency_ID); MCurrency retValue = (MCurrency)s_currencies.get(key); if (retValue != null) return retValue; diff --git a/org.adempiere.base/src/org/compiere/model/MDesktop.java b/org.adempiere.base/src/org/compiere/model/MDesktop.java index 98f0eb066e..88ab8c587c 100644 --- a/org.adempiere.base/src/org/compiere/model/MDesktop.java +++ b/org.adempiere.base/src/org/compiere/model/MDesktop.java @@ -223,7 +223,7 @@ public class MDesktop while (rs.next()) { int AD_Workbench_ID = rs.getInt(1); - m_workbenches.add (new Integer(AD_Workbench_ID)); + m_workbenches.add (Integer.valueOf(AD_Workbench_ID)); } } catch (SQLException e) diff --git a/org.adempiere.base/src/org/compiere/model/MInOutLine.java b/org.adempiere.base/src/org/compiere/model/MInOutLine.java index b79c2a8d5b..b43b326926 100644 --- a/org.adempiere.base/src/org/compiere/model/MInOutLine.java +++ b/org.adempiere.base/src/org/compiere/model/MInOutLine.java @@ -283,7 +283,7 @@ public class MInOutLine extends X_M_InOutLine if (M_Locator_ID < 0) throw new IllegalArgumentException ("M_Locator_ID is mandatory."); // set to 0 explicitly to reset - set_Value (COLUMNNAME_M_Locator_ID, new Integer(M_Locator_ID)); + set_Value (COLUMNNAME_M_Locator_ID, Integer.valueOf(M_Locator_ID)); } // setM_Locator_ID /** diff --git a/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java b/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java index 586eb649a1..7793e8c437 100644 --- a/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java +++ b/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java @@ -192,7 +192,7 @@ public class MInvoiceLine extends X_C_InvoiceLine m_C_BPartner_ID = invoice.getC_BPartner_ID(); m_C_BPartner_Location_ID = invoice.getC_BPartner_Location_ID(); m_IsSOTrx = invoice.isSOTrx(); - m_precision = new Integer(invoice.getPrecision()); + m_precision = Integer.valueOf(invoice.getPrecision()); } // setOrder /** @@ -343,7 +343,7 @@ public class MInvoiceLine extends X_C_InvoiceLine public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID) { if (M_AttributeSetInstance_ID == 0) // 0 is valid ID - set_Value("M_AttributeSetInstance_ID", new Integer(0)); + set_Value("M_AttributeSetInstance_ID", Integer.valueOf(0)); else super.setM_AttributeSetInstance_ID (M_AttributeSetInstance_ID); } // setM_AttributeSetInstance_ID @@ -768,7 +768,7 @@ public class MInvoiceLine extends X_C_InvoiceLine log.warning("getPrecision = " + i + " - set to 2"); i = 2; } - m_precision = new Integer(i); + m_precision = Integer.valueOf(i); return m_precision.intValue(); } // getPrecision diff --git a/org.adempiere.base/src/org/compiere/model/MInvoiceTax.java b/org.adempiere.base/src/org/compiere/model/MInvoiceTax.java index e888b88f45..8256ba56ca 100644 --- a/org.adempiere.base/src/org/compiere/model/MInvoiceTax.java +++ b/org.adempiere.base/src/org/compiere/model/MInvoiceTax.java @@ -159,7 +159,7 @@ public class MInvoiceTax extends X_C_InvoiceTax */ protected void setPrecision (int precision) { - m_precision = new Integer(precision); + m_precision = Integer.valueOf(precision); } // setPrecision /** diff --git a/org.adempiere.base/src/org/compiere/model/MLocatorLookup.java b/org.adempiere.base/src/org/compiere/model/MLocatorLookup.java index 65d041dd29..5ea53dbd65 100644 --- a/org.adempiere.base/src/org/compiere/model/MLocatorLookup.java +++ b/org.adempiere.base/src/org/compiere/model/MLocatorLookup.java @@ -229,7 +229,7 @@ public final class MLocatorLookup extends Lookup implements Serializable // int key = loc.getM_Locator_ID(); if (saveInCache) - m_lookup.put(new Integer(key), loc); + m_lookup.put(Integer.valueOf(key), loc); NamePair retValue = new KeyNamePair(key, loc.toString()); return retValue; } // getDirect @@ -375,7 +375,7 @@ public final class MLocatorLookup extends Lookup implements Serializable { int M_Locator_ID = rs.getInt(1); MLocator loc = MLocator.get(m_ctx, M_Locator_ID); - m_lookup.put(new Integer(M_Locator_ID), loc); + m_lookup.put(Integer.valueOf(M_Locator_ID), loc); } } catch (SQLException e) diff --git a/org.adempiere.base/src/org/compiere/model/MLookup.java b/org.adempiere.base/src/org/compiere/model/MLookup.java index 7f44ec8928..fbf48b26cc 100644 --- a/org.adempiere.base/src/org/compiere/model/MLookup.java +++ b/org.adempiere.base/src/org/compiere/model/MLookup.java @@ -101,7 +101,7 @@ public final class MLookup extends Lookup implements Serializable /** Number of max rows to load */ private static final int MAX_ROWS = 5000; /** Indicator for Null */ - private static Integer MINUS_ONE = new Integer(-1); + private static Integer MINUS_ONE = Integer.valueOf(-1); /** The Lookup Info Value Object */ private MLookupInfo m_info = null; @@ -539,7 +539,7 @@ public final class MLookup extends Lookup implements Serializable int keyValue = rs.getInt(1); KeyNamePair p = new KeyNamePair(keyValue, name.toString()); if (saveInCache) // save if - m_lookup.put(new Integer(keyValue), p); + m_lookup.put(Integer.valueOf(keyValue), p); directValue = p; } else @@ -878,7 +878,7 @@ public final class MLookup extends Lookup implements Serializable { int key = rs.getInt(1); KeyNamePair p = new KeyNamePair(key, name.toString()); - m_lookup.put(new Integer(key), p); + m_lookup.put(Integer.valueOf(key), p); } else { diff --git a/org.adempiere.base/src/org/compiere/model/MOrderLine.java b/org.adempiere.base/src/org/compiere/model/MOrderLine.java index f92d1deb5c..16e76eb6fb 100644 --- a/org.adempiere.base/src/org/compiere/model/MOrderLine.java +++ b/org.adempiere.base/src/org/compiere/model/MOrderLine.java @@ -233,7 +233,7 @@ public class MOrderLine extends X_C_OrderLine public void setHeaderInfo (MOrder order) { m_parent = order; - m_precision = new Integer(order.getPrecision()); + m_precision = Integer.valueOf(order.getPrecision()); m_M_PriceList_ID = order.getM_PriceList_ID(); m_IsSOTrx = order.isSOTrx(); } // setHeaderInfo @@ -410,7 +410,7 @@ public class MOrderLine extends X_C_OrderLine + "FROM C_Currency c INNER JOIN C_Order x ON (x.C_Currency_ID=c.C_Currency_ID) " + "WHERE x.C_Order_ID=?"; int i = DB.getSQLValue(get_TrxName(), sql, getC_Order_ID()); - m_precision = new Integer(i); + m_precision = Integer.valueOf(i); return m_precision.intValue(); } // getPrecision @@ -481,7 +481,7 @@ public class MOrderLine extends X_C_OrderLine public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID) { if (M_AttributeSetInstance_ID == 0) // 0 is valid ID - set_Value("M_AttributeSetInstance_ID", new Integer(0)); + set_Value("M_AttributeSetInstance_ID", Integer.valueOf(0)); else super.setM_AttributeSetInstance_ID (M_AttributeSetInstance_ID); } // setM_AttributeSetInstance_ID diff --git a/org.adempiere.base/src/org/compiere/model/MOrderTax.java b/org.adempiere.base/src/org/compiere/model/MOrderTax.java index 917a9c4120..0a9d37b55f 100644 --- a/org.adempiere.base/src/org/compiere/model/MOrderTax.java +++ b/org.adempiere.base/src/org/compiere/model/MOrderTax.java @@ -178,7 +178,7 @@ public class MOrderTax extends X_C_OrderTax */ protected void setPrecision (int precision) { - m_precision = new Integer(precision); + m_precision = Integer.valueOf(precision); } // setPrecision /** diff --git a/org.adempiere.base/src/org/compiere/model/MPInstance.java b/org.adempiere.base/src/org/compiere/model/MPInstance.java index 5edcdd135c..f1df9917df 100644 --- a/org.adempiere.base/src/org/compiere/model/MPInstance.java +++ b/org.adempiere.base/src/org/compiere/model/MPInstance.java @@ -276,7 +276,7 @@ public class MPInstance extends X_AD_PInstance if (log.isLoggable(Level.INFO)) log.info("Set to 0 from " + Record_ID); Record_ID = 0; } - set_ValueNoCheck ("Record_ID", new Integer(Record_ID)); + set_ValueNoCheck ("Record_ID", Integer.valueOf(Record_ID)); } // setRecord_ID /** diff --git a/org.adempiere.base/src/org/compiere/model/MPOSTerminal.java b/org.adempiere.base/src/org/compiere/model/MPOSTerminal.java index cee86a4956..e1be689b2b 100644 --- a/org.adempiere.base/src/org/compiere/model/MPOSTerminal.java +++ b/org.adempiere.base/src/org/compiere/model/MPOSTerminal.java @@ -65,7 +65,7 @@ public class MPOSTerminal extends X_U_POSTerminal */ public static MPOSTerminal get(Properties ctx, int U_POSTerminal_ID) { - Integer key = new Integer(U_POSTerminal_ID); + Integer key = Integer.valueOf(U_POSTerminal_ID); MPOSTerminal retValue = (MPOSTerminal)s_cache.get(key); if (retValue == null) { @@ -133,7 +133,7 @@ public class MPOSTerminal extends X_U_POSTerminal if (success) { - s_cache.remove(new Integer(get_ID())); + s_cache.remove(Integer.valueOf(get_ID())); } return success; diff --git a/org.adempiere.base/src/org/compiere/model/MPeriod.java b/org.adempiere.base/src/org/compiere/model/MPeriod.java index 943ed0135c..7f9e351c37 100644 --- a/org.adempiere.base/src/org/compiere/model/MPeriod.java +++ b/org.adempiere.base/src/org/compiere/model/MPeriod.java @@ -68,7 +68,7 @@ public class MPeriod extends X_C_Period if (C_Period_ID <= 0) return null; // - Integer key = new Integer(C_Period_ID); + Integer key = Integer.valueOf(C_Period_ID); MPeriod retValue = (MPeriod) s_cache.get (key); if (retValue != null) return retValue; @@ -170,7 +170,7 @@ public class MPeriod extends X_C_Period while (rs.next()) { MPeriod period = new MPeriod(ctx, rs, trxName); - Integer key = new Integer(period.getC_Period_ID()); + Integer key = Integer.valueOf(period.getC_Period_ID()); s_cache.put (key, period); if (period.isStandardPeriod()) retValue = period; diff --git a/org.adempiere.base/src/org/compiere/model/MPrivateAccess.java b/org.adempiere.base/src/org/compiere/model/MPrivateAccess.java index cc75c46764..15e42d7a53 100644 --- a/org.adempiere.base/src/org/compiere/model/MPrivateAccess.java +++ b/org.adempiere.base/src/org/compiere/model/MPrivateAccess.java @@ -94,7 +94,7 @@ public class MPrivateAccess extends X_AD_Private_Access pstmt.setInt(2, AD_User_ID); ResultSet rs = pstmt.executeQuery(); while (rs.next()) - list.add(new Integer(rs.getInt(1))); + list.add(Integer.valueOf(rs.getInt(1))); rs.close(); pstmt.close(); pstmt = null; diff --git a/org.adempiere.base/src/org/compiere/model/MProductCategory.java b/org.adempiere.base/src/org/compiere/model/MProductCategory.java index 4c1603765e..d6296be2a1 100644 --- a/org.adempiere.base/src/org/compiere/model/MProductCategory.java +++ b/org.adempiere.base/src/org/compiere/model/MProductCategory.java @@ -86,7 +86,7 @@ public class MProductCategory extends X_M_Product_Category pstmt.setInt (1, M_Product_ID); rs = pstmt.executeQuery (); if (rs.next ()) - category = new Integer(rs.getInt(1)); + category = Integer.valueOf(rs.getInt(1)); } catch (Exception e) { diff --git a/org.adempiere.base/src/org/compiere/model/MQuery.java b/org.adempiere.base/src/org/compiere/model/MQuery.java index b814cdef2e..f04c37fe4a 100644 --- a/org.adempiere.base/src/org/compiere/model/MQuery.java +++ b/org.adempiere.base/src/org/compiere/model/MQuery.java @@ -311,7 +311,7 @@ public class MQuery implements Serializable MQuery query = new MQuery(); if (columnName.endsWith("_ID")) query.setTableName(columnName.substring(0, columnName.length()-3)); - query.addRestriction(columnName, EQUAL, new Integer(value)); + query.addRestriction(columnName, EQUAL, Integer.valueOf(value)); query.setRecordCount(1); // guess return query; } // getEqualQuery @@ -527,7 +527,7 @@ public class MQuery implements Serializable int Code) { Restriction r = new Restriction (ColumnName, Operator, - new Integer(Code), null, null, true, 0); + Integer.valueOf(Code), null, null, true, 0); m_list.add(r); } // addRestriction @@ -1024,7 +1024,7 @@ class Restriction implements Serializable if (code instanceof Boolean) Code = ((Boolean)code).booleanValue() ? "Y" : "N"; else if (code instanceof KeyNamePair) - Code = new Integer(((KeyNamePair)code).getKey()); + Code = Integer.valueOf(((KeyNamePair)code).getKey()); else if (code instanceof ValueNamePair) Code = ((ValueNamePair)code).getValue(); else diff --git a/org.adempiere.base/src/org/compiere/model/MRMATax.java b/org.adempiere.base/src/org/compiere/model/MRMATax.java index bd80356233..c5d312af37 100644 --- a/org.adempiere.base/src/org/compiere/model/MRMATax.java +++ b/org.adempiere.base/src/org/compiere/model/MRMATax.java @@ -171,7 +171,7 @@ public class MRMATax extends X_M_RMATax */ protected void setPrecision (int precision) { - m_precision = new Integer(precision); + m_precision = Integer.valueOf(precision); } // setPrecision /** diff --git a/org.adempiere.base/src/org/compiere/model/MRegistrationAttribute.java b/org.adempiere.base/src/org/compiere/model/MRegistrationAttribute.java index eb90a0d5b6..1e17010d66 100644 --- a/org.adempiere.base/src/org/compiere/model/MRegistrationAttribute.java +++ b/org.adempiere.base/src/org/compiere/model/MRegistrationAttribute.java @@ -64,7 +64,7 @@ public class MRegistrationAttribute extends X_A_RegistrationAttribute while (rs.next()) { MRegistrationAttribute value = new MRegistrationAttribute(ctx, rs, null); - Integer key = new Integer(value.getA_RegistrationAttribute_ID()); + Integer key = Integer.valueOf(value.getA_RegistrationAttribute_ID()); s_cache.put(key, value); list.add(value); } @@ -93,7 +93,7 @@ public class MRegistrationAttribute extends X_A_RegistrationAttribute */ public static MRegistrationAttribute get (Properties ctx, int A_RegistrationAttribute_ID, String trxName) { - Integer key = new Integer(A_RegistrationAttribute_ID); + Integer key = Integer.valueOf(A_RegistrationAttribute_ID); MRegistrationAttribute retValue = (MRegistrationAttribute)s_cache.get(key); if (retValue == null) { diff --git a/org.adempiere.base/src/org/compiere/model/MRequest.java b/org.adempiere.base/src/org/compiere/model/MRequest.java index 1f39b11155..5dcfc70c7c 100644 --- a/org.adempiere.base/src/org/compiere/model/MRequest.java +++ b/org.adempiere.base/src/org/compiere/model/MRequest.java @@ -119,8 +119,8 @@ public class MRequest extends X_R_Request int R_RequestType_ID, String Summary, boolean isSelfService, String trxName) { this(ctx, 0, trxName); - set_Value ("SalesRep_ID", new Integer(SalesRep_ID)); // could be 0 - set_Value ("R_RequestType_ID", new Integer(R_RequestType_ID)); + set_Value ("SalesRep_ID", Integer.valueOf(SalesRep_ID)); // could be 0 + set_Value ("R_RequestType_ID", Integer.valueOf(R_RequestType_ID)); setSummary (Summary); setIsSelfService(isSelfService); getRequestType(); diff --git a/org.adempiere.base/src/org/compiere/model/MRole.java b/org.adempiere.base/src/org/compiere/model/MRole.java index fb3ab43877..8238abc2d8 100644 --- a/org.adempiere.base/src/org/compiere/model/MRole.java +++ b/org.adempiere.base/src/org/compiere/model/MRole.java @@ -902,7 +902,7 @@ public final class MRole extends X_AD_Role rs = pstmt.executeQuery(); while (rs.next()) { - Integer ii = new Integer(rs.getInt(1)); + Integer ii = Integer.valueOf(rs.getInt(1)); m_tableAccessLevel.put(ii, rs.getString(2)); String tableName = rs.getString(3); m_tableName.put(tableName, ii); @@ -1345,7 +1345,7 @@ public final class MRole extends X_AD_Role // AccessLevel // 1 = Org - 2 = Client - 4 = System // 3 = Org+Client - 6 = Client+System - 7 = All - String roleAccessLevel = (String)m_tableAccessLevel.get(new Integer(AD_Table_ID)); + String roleAccessLevel = (String)m_tableAccessLevel.get(Integer.valueOf(AD_Table_ID)); if (roleAccessLevel == null) { if (log.isLoggable(Level.FINE)) log.fine("NO - No AccessLevel - AD_Table_ID=" + AD_Table_ID); @@ -1542,7 +1542,7 @@ public final class MRole extends X_AD_Role pstmt.setInt(1, getAD_Role_ID()); rs = pstmt.executeQuery(); while (rs.next()) { - Integer winId = new Integer(rs.getInt(1)); + Integer winId = Integer.valueOf(rs.getInt(1)); if ("N".equals(rs.getString(3))) { // inactive window on direct access if (m_windowAccess.containsKey(winId)) { @@ -1627,7 +1627,7 @@ public final class MRole extends X_AD_Role pstmt.setInt(1, getAD_Role_ID()); rs = pstmt.executeQuery(); while (rs.next()) { - Integer procId = new Integer(rs.getInt(1)); + Integer procId = Integer.valueOf(rs.getInt(1)); if ("N".equals(rs.getString(3))) { // inactive process on direct access if (m_processAccess.containsKey(procId)) { @@ -1707,7 +1707,7 @@ public final class MRole extends X_AD_Role pstmt.setInt(1, getAD_Role_ID()); rs = pstmt.executeQuery(); while (rs.next()) { - Integer taskId = new Integer(rs.getInt(1)); + Integer taskId = Integer.valueOf(rs.getInt(1)); if ("N".equals(rs.getString(3))) { // inactive task on direct access if (m_taskAccess.containsKey(taskId)) { @@ -1787,7 +1787,7 @@ public final class MRole extends X_AD_Role pstmt.setInt(1, getAD_Role_ID()); rs = pstmt.executeQuery(); while (rs.next()) { - Integer formId = new Integer(rs.getInt(1)); + Integer formId = Integer.valueOf(rs.getInt(1)); if ("N".equals(rs.getString(3))) { // inactive form on direct access if (m_formAccess.containsKey(formId)) { @@ -1867,7 +1867,7 @@ public final class MRole extends X_AD_Role pstmt.setInt(1, getAD_Role_ID()); rs = pstmt.executeQuery(); while (rs.next()) { - Integer formId = new Integer(rs.getInt(1)); + Integer formId = Integer.valueOf(rs.getInt(1)); if ("N".equals(rs.getString(3))) { // inactive workflow on direct access if (m_workflowAccess.containsKey(formId)) { @@ -3137,7 +3137,7 @@ public final class MRole extends X_AD_Role pstmt.setInt(1, getAD_Role_ID()); rs = pstmt.executeQuery(); while (rs.next()) { - Integer infoId = new Integer(rs.getInt(1)); + Integer infoId = Integer.valueOf(rs.getInt(1)); if ("N".equals(rs.getString(2))) { // inactive info on direct access if (m_infoAccess.containsKey(infoId)) { diff --git a/org.adempiere.base/src/org/compiere/model/MSequence.java b/org.adempiere.base/src/org/compiere/model/MSequence.java index ef52c5dcad..446fde29d3 100644 --- a/org.adempiere.base/src/org/compiere/model/MSequence.java +++ b/org.adempiere.base/src/org/compiere/model/MSequence.java @@ -1229,7 +1229,7 @@ public class MSequence extends X_AD_Sequence try { int no = DB.getNextID(0, "Test", null); - s_list.add(new Integer(no)); + s_list.add(Integer.valueOf(no)); // System.out.println("#" + m_i + ": " + no); } catch (Exception e) diff --git a/org.adempiere.base/src/org/compiere/model/MSession.java b/org.adempiere.base/src/org/compiere/model/MSession.java index 6800c1f5f3..e77d6c9826 100644 --- a/org.adempiere.base/src/org/compiere/model/MSession.java +++ b/org.adempiere.base/src/org/compiere/model/MSession.java @@ -59,7 +59,7 @@ public class MSession extends X_AD_Session int AD_Session_ID = Env.getContextAsInt(ctx, "#AD_Session_ID"); MSession session = null; if (AD_Session_ID > 0) - session = (MSession)s_sessions.get(new Integer(AD_Session_ID)); + session = (MSession)s_sessions.get(Integer.valueOf(AD_Session_ID)); // Try to load if (session == null && AD_Session_ID > 0) { @@ -76,7 +76,7 @@ public class MSession extends X_AD_Session session.saveEx(); AD_Session_ID = session.getAD_Session_ID(); Env.setContext (ctx, "#AD_Session_ID", AD_Session_ID); - s_sessions.put (new Integer(AD_Session_ID), session); + s_sessions.put (Integer.valueOf(AD_Session_ID), session); } return session; } // get @@ -94,14 +94,14 @@ public class MSession extends X_AD_Session int AD_Session_ID = Env.getContextAsInt(ctx, "#AD_Session_ID"); MSession session = null; if (AD_Session_ID > 0) - session = (MSession)s_sessions.get(new Integer(AD_Session_ID)); + session = (MSession)s_sessions.get(Integer.valueOf(AD_Session_ID)); if (session == null) { session = new MSession (ctx, Remote_Addr, Remote_Host, WebSession, null); // remote session session.saveEx(); AD_Session_ID = session.getAD_Session_ID(); Env.setContext(ctx, "#AD_Session_ID", AD_Session_ID); - s_sessions.put(new Integer(AD_Session_ID), session); + s_sessions.put(Integer.valueOf(AD_Session_ID), session); } return session; } // get @@ -238,7 +238,7 @@ public class MSession extends X_AD_Session { setProcessed(true); saveEx(); - s_sessions.remove(new Integer(getAD_Session_ID())); + s_sessions.remove(Integer.valueOf(getAD_Session_ID())); if (log.isLoggable(Level.INFO)) log.info(TimeUtil.formatElapsed(getCreated(), getUpdated())); } // logout diff --git a/org.adempiere.base/src/org/compiere/model/MStatus.java b/org.adempiere.base/src/org/compiere/model/MStatus.java index 968c5a984c..88e5d6a11a 100644 --- a/org.adempiere.base/src/org/compiere/model/MStatus.java +++ b/org.adempiere.base/src/org/compiere/model/MStatus.java @@ -69,7 +69,7 @@ public class MStatus extends X_R_Status */ public static MStatus getDefault (Properties ctx, int R_RequestType_ID) { - Integer key = new Integer(R_RequestType_ID); + Integer key = Integer.valueOf(R_RequestType_ID); MStatus retValue = (MStatus)s_cacheDefault.get(key); if (retValue != null) return retValue; diff --git a/org.adempiere.base/src/org/compiere/model/MStyle.java b/org.adempiere.base/src/org/compiere/model/MStyle.java index 762269ba8b..b2b6e2aeb3 100644 --- a/org.adempiere.base/src/org/compiere/model/MStyle.java +++ b/org.adempiere.base/src/org/compiere/model/MStyle.java @@ -37,7 +37,7 @@ public class MStyle extends X_AD_Style { public static MStyle get (Properties ctx, int AD_Style_ID) { - Integer key = new Integer(AD_Style_ID); + Integer key = Integer.valueOf(AD_Style_ID); MStyle retValue = (MStyle)s_cache.get(key); if (retValue == null) { diff --git a/org.adempiere.base/src/org/compiere/model/MTree_NodeCMC.java b/org.adempiere.base/src/org/compiere/model/MTree_NodeCMC.java index cb564c71cf..25b17f5316 100644 --- a/org.adempiere.base/src/org/compiere/model/MTree_NodeCMC.java +++ b/org.adempiere.base/src/org/compiere/model/MTree_NodeCMC.java @@ -149,6 +149,6 @@ public class MTree_NodeCMC extends X_AD_TreeNodeCMC */ public void setParent_ID (int Parent_ID) { - set_Value ("Parent_ID", new Integer(Parent_ID)); + set_Value ("Parent_ID", Integer.valueOf(Parent_ID)); } } // MTree_NodeCMC diff --git a/org.adempiere.base/src/org/compiere/model/MUser.java b/org.adempiere.base/src/org/compiere/model/MUser.java index 956457c375..05ce2ac997 100644 --- a/org.adempiere.base/src/org/compiere/model/MUser.java +++ b/org.adempiere.base/src/org/compiere/model/MUser.java @@ -136,7 +136,7 @@ public class MUser extends X_AD_User */ public static MUser get (Properties ctx, int AD_User_ID) { - Integer key = new Integer(AD_User_ID); + Integer key = Integer.valueOf(AD_User_ID); MUser retValue = (MUser)s_cache.get(key); if (retValue == null) { diff --git a/org.adempiere.base/src/org/compiere/model/MUserRoles.java b/org.adempiere.base/src/org/compiere/model/MUserRoles.java index be673ee89e..9521ecef3c 100644 --- a/org.adempiere.base/src/org/compiere/model/MUserRoles.java +++ b/org.adempiere.base/src/org/compiere/model/MUserRoles.java @@ -120,7 +120,7 @@ public class MUserRoles extends X_AD_User_Roles */ public void setAD_User_ID (int AD_User_ID) { - set_ValueNoCheck ("AD_User_ID", new Integer(AD_User_ID)); + set_ValueNoCheck ("AD_User_ID", Integer.valueOf(AD_User_ID)); } // setAD_User_ID /** @@ -130,7 +130,7 @@ public class MUserRoles extends X_AD_User_Roles **/ public void setAD_Role_ID (int AD_Role_ID) { - set_ValueNoCheck ("AD_Role_ID", new Integer(AD_Role_ID)); + set_ValueNoCheck ("AD_Role_ID", Integer.valueOf(AD_Role_ID)); } // setAD_Role_ID @Override diff --git a/org.adempiere.base/src/org/compiere/model/MWarehouse.java b/org.adempiere.base/src/org/compiere/model/MWarehouse.java index 7943bc89e7..71382d3d0c 100644 --- a/org.adempiere.base/src/org/compiere/model/MWarehouse.java +++ b/org.adempiere.base/src/org/compiere/model/MWarehouse.java @@ -63,7 +63,7 @@ public class MWarehouse extends X_M_Warehouse */ public static MWarehouse get (Properties ctx, int M_Warehouse_ID, String trxName) { - Integer key = new Integer(M_Warehouse_ID); + Integer key = Integer.valueOf(M_Warehouse_ID); MWarehouse retValue = (MWarehouse)s_cache.get(key); if (retValue != null) return retValue; diff --git a/org.adempiere.base/src/org/compiere/model/PO.java b/org.adempiere.base/src/org/compiere/model/PO.java index 63d9e1e972..c0f4576511 100644 --- a/org.adempiere.base/src/org/compiere/model/PO.java +++ b/org.adempiere.base/src/org/compiere/model/PO.java @@ -256,7 +256,7 @@ public abstract class PO private HashMap m_attributes = null; /** Zero Integer */ - protected static final Integer I_ZERO = new Integer(0); + protected static final Integer I_ZERO = Integer.valueOf(0); /** Accounting Columns */ private ArrayList s_acctColumns = null; @@ -657,7 +657,7 @@ public abstract class PO { int result = ((Integer)nValue).intValue(); result -= ((Integer)oValue).intValue(); - return new Integer(result); + return Integer.valueOf(result); } // log.warning("Invalid type - New=" + nValue); @@ -830,7 +830,7 @@ public abstract class PO && p_info.getColumnClass(index) == Integer.class) try { - m_newValues[index] = new Integer((String)value); + m_newValues[index] = Integer.valueOf((String)value); } catch (NumberFormatException e) { @@ -1283,7 +1283,7 @@ public abstract class PO if (ID > 0) { setKeyInfo(); - m_IDs = new Object[] {new Integer(ID)}; + m_IDs = new Object[] {Integer.valueOf(ID)}; //m_KeyColumns = new String[] {p_info.getTableName() + "_ID"}; load(trxName); } @@ -1399,7 +1399,7 @@ public abstract class PO try { if (clazz == Integer.class) - m_oldValues[index] = decrypt(index, new Integer(rs.getInt(columnName))); + m_oldValues[index] = decrypt(index, Integer.valueOf(rs.getInt(columnName))); else if (clazz == BigDecimal.class) m_oldValues[index] = decrypt(index, rs.getBigDecimal(columnName)); else if (clazz == Boolean.class) @@ -1475,7 +1475,7 @@ public abstract class PO try { if (clazz == Integer.class) - m_oldValues[index] = new Integer(value); + m_oldValues[index] = Integer.valueOf(value); else if (clazz == BigDecimal.class) m_oldValues[index] = new BigDecimal(value); else if (clazz == Boolean.class) @@ -1634,9 +1634,9 @@ public abstract class PO else if (colName.equals("IsActive")) m_newValues[i] = Boolean.TRUE; else if (colName.equals("AD_Client_ID")) - m_newValues[i] = new Integer(Env.getAD_Client_ID(p_ctx)); + m_newValues[i] = Integer.valueOf(Env.getAD_Client_ID(p_ctx)); else if (colName.equals("AD_Org_ID")) - m_newValues[i] = new Integer(Env.getAD_Org_ID(p_ctx)); + m_newValues[i] = Integer.valueOf(Env.getAD_Org_ID(p_ctx)); else if (colName.equals("Processed")) m_newValues[i] = Boolean.FALSE; else if (colName.equals("Processing")) @@ -1748,7 +1748,7 @@ public abstract class PO */ final protected void setAD_Client_ID (int AD_Client_ID) { - set_ValueNoCheck ("AD_Client_ID", new Integer(AD_Client_ID)); + set_ValueNoCheck ("AD_Client_ID", Integer.valueOf(AD_Client_ID)); } // setAD_Client_ID /** @@ -1769,7 +1769,7 @@ public abstract class PO */ final public void setAD_Org_ID (int AD_Org_ID) { - set_ValueNoCheck ("AD_Org_ID", new Integer(AD_Org_ID)); + set_ValueNoCheck ("AD_Org_ID", Integer.valueOf(AD_Org_ID)); } // setAD_Org_ID /** @@ -1875,7 +1875,7 @@ public abstract class PO */ final protected void setUpdatedBy (int AD_User_ID) { - set_ValueNoCheck ("UpdatedBy", new Integer(AD_User_ID)); + set_ValueNoCheck ("UpdatedBy", Integer.valueOf(AD_User_ID)); } // setAD_User_ID /** Cache */ @@ -2502,7 +2502,7 @@ public abstract class PO if (!changes && !updatedBy) { int AD_User_ID = Env.getContextAsInt(p_ctx, "#AD_User_ID"); - set_ValueNoCheck("UpdatedBy", new Integer(AD_User_ID)); + set_ValueNoCheck("UpdatedBy", Integer.valueOf(AD_User_ID)); sql.append("UpdatedBy=").append(AD_User_ID); changes = true; updatedBy = true; @@ -2681,7 +2681,7 @@ public abstract class PO if (!updatedBy) // UpdatedBy not explicitly set { int AD_User_ID = Env.getContextAsInt(p_ctx, "#AD_User_ID"); - set_ValueNoCheck("UpdatedBy", new Integer(AD_User_ID)); + set_ValueNoCheck("UpdatedBy", Integer.valueOf(AD_User_ID)); if (withValues) { sql.append(",UpdatedBy=").append(AD_User_ID); @@ -2755,7 +2755,7 @@ public abstract class PO log.severe("No NextID (" + no + ")"); return saveFinish (true, false); } - m_IDs[0] = new Integer(no); + m_IDs[0] = Integer.valueOf(no); set_ValueNoCheck(m_KeyColumns[0], m_IDs[0]); } //uuid secondary key @@ -4341,7 +4341,7 @@ public abstract class PO pstmt = DB.prepareStatement(sql.toString(), trxName); rs = pstmt.executeQuery(); while (rs.next()) - list.add(new Integer(rs.getInt(1))); + list.add(Integer.valueOf(rs.getInt(1))); } catch (SQLException e) { diff --git a/org.adempiere.base/src/org/compiere/model/PO_Record.java b/org.adempiere.base/src/org/compiere/model/PO_Record.java index 8eee24c98d..c1e58926f9 100644 --- a/org.adempiere.base/src/org/compiere/model/PO_Record.java +++ b/org.adempiere.base/src/org/compiere/model/PO_Record.java @@ -108,7 +108,7 @@ public class PO_Record // DELETE FROM table WHERE AD_Table_ID=#1 AND Record_ID=#2 if (s_cascades[i] != AD_Table_ID) { - Object[] params = new Object[]{new Integer(AD_Table_ID), new Integer(Record_ID)}; + Object[] params = new Object[]{Integer.valueOf(AD_Table_ID), Integer.valueOf(Record_ID)}; StringBuffer sql = new StringBuffer ("DELETE FROM ") .append(s_cascadeNames[i]) .append(" WHERE AD_Table_ID=? AND Record_ID=?"); @@ -129,7 +129,7 @@ public class PO_Record if (s_parents[j] == AD_Table_ID) { int AD_Table_IDchild = s_parentChilds[j]; - Object[] params = new Object[]{new Integer(AD_Table_IDchild), new Integer(Record_ID)}; + Object[] params = new Object[]{Integer.valueOf(AD_Table_IDchild), Integer.valueOf(Record_ID)}; for (int i = 0; i < s_cascades.length; i++) { StringBuffer sql = new StringBuffer ("DELETE FROM ") diff --git a/org.adempiere.base/src/org/compiere/model/StandardTaxProvider.java b/org.adempiere.base/src/org/compiere/model/StandardTaxProvider.java index a508cc3250..31aed1bd80 100644 --- a/org.adempiere.base/src/org/compiere/model/StandardTaxProvider.java +++ b/org.adempiere.base/src/org/compiere/model/StandardTaxProvider.java @@ -45,7 +45,7 @@ public class StandardTaxProvider implements ITaxProvider { { MOrderLine line = lines[i]; totalLines = totalLines.add(line.getLineNetAmt()); - Integer taxID = new Integer(line.getC_Tax_ID()); + Integer taxID = Integer.valueOf(line.getC_Tax_ID()); if (!taxList.contains(taxID)) { MTax tax = new MTax(order.getCtx(), taxID, order.get_TrxName()); @@ -302,7 +302,7 @@ public class StandardTaxProvider implements ITaxProvider { { MRMALine line = lines[i]; totalLines = totalLines.add(line.getLineNetAmt()); - Integer taxID = new Integer(line.getC_Tax_ID()); + Integer taxID = Integer.valueOf(line.getC_Tax_ID()); if (!taxList.contains(taxID)) { MTax tax = new MTax(rma.getCtx(), taxID, rma.get_TrxName()); diff --git a/org.adempiere.base/src/org/compiere/model/TranslationTable.java b/org.adempiere.base/src/org/compiere/model/TranslationTable.java index 0336644ca6..dc8611cbbc 100644 --- a/org.adempiere.base/src/org/compiere/model/TranslationTable.java +++ b/org.adempiere.base/src/org/compiere/model/TranslationTable.java @@ -72,7 +72,7 @@ public class TranslationTable return s_activeLanguages.intValue(); int no = DB.getSQLValue(null, "SELECT COUNT(*) FROM AD_Language WHERE IsActive='Y' AND IsSystemLanguage='Y'"); - s_activeLanguages = new Integer(no); + s_activeLanguages = Integer.valueOf(no); return s_activeLanguages.intValue(); } // getActiveLanguages diff --git a/org.adempiere.base/src/org/compiere/print/MPrintColor.java b/org.adempiere.base/src/org/compiere/print/MPrintColor.java index 9d69c80124..489f3b8f08 100644 --- a/org.adempiere.base/src/org/compiere/print/MPrintColor.java +++ b/org.adempiere.base/src/org/compiere/print/MPrintColor.java @@ -92,7 +92,7 @@ public class MPrintColor extends X_AD_PrintColor { // if (AD_PrintColor_ID == 0) // return new MPrintColor (ctx, 0); - Integer key = new Integer(AD_PrintColor_ID); + Integer key = Integer.valueOf(AD_PrintColor_ID); MPrintColor pc = (MPrintColor)s_colors.get(key); if (pc == null) { diff --git a/org.adempiere.base/src/org/compiere/print/MPrintFont.java b/org.adempiere.base/src/org/compiere/print/MPrintFont.java index 5b0d28dd54..ea70daabc4 100644 --- a/org.adempiere.base/src/org/compiere/print/MPrintFont.java +++ b/org.adempiere.base/src/org/compiere/print/MPrintFont.java @@ -205,7 +205,7 @@ public class MPrintFont extends X_AD_PrintFont */ static public MPrintFont get (int AD_PrintFont_ID) { - Integer key = new Integer(AD_PrintFont_ID); + Integer key = Integer.valueOf(AD_PrintFont_ID); MPrintFont pf = (MPrintFont)s_fonts.get(key); if (pf == null) { diff --git a/org.adempiere.base/src/org/compiere/print/MPrintFormat.java b/org.adempiere.base/src/org/compiere/print/MPrintFormat.java index 90381f9579..a69b64d256 100644 --- a/org.adempiere.base/src/org/compiere/print/MPrintFormat.java +++ b/org.adempiere.base/src/org/compiere/print/MPrintFormat.java @@ -147,7 +147,7 @@ public class MPrintFormat extends X_AD_PrintFormat { // Sort Order and Column must be > 0 if (m_items[i].getSortNo() != 0 && m_items[i].getAD_Column_ID() != 0) - map.put(new Integer(m_items[i].getSortNo()), new Integer(m_items[i].getAD_Column_ID())); + map.put(Integer.valueOf(m_items[i].getSortNo()), Integer.valueOf(m_items[i].getAD_Column_ID())); } // Get SortNo and Sort them Integer[] keys = new Integer[map.keySet().size()]; @@ -174,7 +174,7 @@ public class MPrintFormat extends X_AD_PrintFormat for (int i = 0; i < m_items.length; i++) { if (m_items[i].getAD_Column_ID() != 0 && m_items[i].isPrinted()) - list.add(new Integer(m_items[i].getAD_Column_ID())); + list.add(Integer.valueOf(m_items[i].getAD_Column_ID())); } // Convert int[] retValue = new int[list.size()]; @@ -1087,7 +1087,7 @@ public class MPrintFormat extends X_AD_PrintFormat */ static public MPrintFormat get (Properties ctx, int AD_PrintFormat_ID, boolean readFromDisk) { - Integer key = new Integer(AD_PrintFormat_ID); + Integer key = Integer.valueOf(AD_PrintFormat_ID); MPrintFormat pf = null; if (!readFromDisk) pf = (MPrintFormat)s_formats.get(key); @@ -1154,7 +1154,7 @@ public class MPrintFormat extends X_AD_PrintFormat */ static public void deleteFromCache (int AD_PrintFormat_ID) { - Integer key = new Integer(AD_PrintFormat_ID); + Integer key = Integer.valueOf(AD_PrintFormat_ID); s_formats.put(key, null); } // deleteFromCache @@ -1197,9 +1197,9 @@ public class MPrintFormat extends X_AD_PrintFormat // add sql parameter List lsParameter = new ArrayList(); - lsParameter.add(new Integer(AD_Table_ID)); + lsParameter.add(Integer.valueOf(AD_Table_ID)); if (AD_Window_ID > 0) - lsParameter.add(new Integer(AD_Window_ID)); + lsParameter.add(Integer.valueOf(AD_Window_ID)); // init query Query query = new Query(Env.getCtx(), MPrintFormat.Table_Name, sqlWhere, trxName); diff --git a/org.adempiere.base/src/org/compiere/print/MPrintFormatItem.java b/org.adempiere.base/src/org/compiere/print/MPrintFormatItem.java index 8035008339..96c2bf1145 100644 --- a/org.adempiere.base/src/org/compiere/print/MPrintFormatItem.java +++ b/org.adempiere.base/src/org/compiere/print/MPrintFormatItem.java @@ -392,7 +392,7 @@ public class MPrintFormatItem extends X_AD_PrintFormatItem public String getColumnName() { if (m_columnName == null) // Get Column Name from AD_Column not index - m_columnName = getColumnName (new Integer(getAD_Column_ID())); + m_columnName = getColumnName (Integer.valueOf(getAD_Column_ID())); return m_columnName; } // getColumnName diff --git a/org.adempiere.base/src/org/compiere/print/MPrintPaper.java b/org.adempiere.base/src/org/compiere/print/MPrintPaper.java index ed153ab6e0..d6bb08dc5a 100644 --- a/org.adempiere.base/src/org/compiere/print/MPrintPaper.java +++ b/org.adempiere.base/src/org/compiere/print/MPrintPaper.java @@ -62,7 +62,7 @@ public class MPrintPaper extends X_AD_PrintPaper */ static public MPrintPaper get (int AD_PrintPaper_ID) { - Integer key = new Integer(AD_PrintPaper_ID); + Integer key = Integer.valueOf(AD_PrintPaper_ID); MPrintPaper pp = (MPrintPaper)s_papers.get(key); if (pp == null) { diff --git a/org.adempiere.base/src/org/compiere/print/PrintData.java b/org.adempiere.base/src/org/compiere/print/PrintData.java index 9af356724d..723760c46f 100644 --- a/org.adempiere.base/src/org/compiere/print/PrintData.java +++ b/org.adempiere.base/src/org/compiere/print/PrintData.java @@ -252,9 +252,9 @@ public class PrintData implements Serializable { m_matrix.addRow(nodes); if (functionRow) - m_functionRows.add(new Integer(m_matrix.getRowIndex())); + m_functionRows.add(Integer.valueOf(m_matrix.getRowIndex())); if (m_hasLevelNo && levelNo != 0) - addNode(new PrintDataElement(LEVEL_NO, new Integer(levelNo), DisplayType.Integer, null)); + addNode(new PrintDataElement(LEVEL_NO, Integer.valueOf(levelNo), DisplayType.Integer, null)); } // addRow /** @@ -301,7 +301,7 @@ public class PrintData implements Serializable */ public boolean isFunctionRow (int row) { - return m_functionRows.contains(new Integer(row)); + return m_functionRows.contains(Integer.valueOf(row)); } // isFunctionRow /** @@ -310,7 +310,7 @@ public class PrintData implements Serializable */ public boolean isFunctionRow () { - return m_functionRows.contains(new Integer(m_matrix.getRowIndex())); + return m_functionRows.contains(Integer.valueOf(m_matrix.getRowIndex())); } // isFunctionRow /** diff --git a/org.adempiere.base/src/org/compiere/print/ReportEngine.java b/org.adempiere.base/src/org/compiere/print/ReportEngine.java index 0de7d5fcbc..f8577f1ee5 100644 --- a/org.adempiere.base/src/org/compiere/print/ReportEngine.java +++ b/org.adempiere.base/src/org/compiere/print/ReportEngine.java @@ -729,7 +729,7 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount) { td td = new td(); tr.addElement(td); - Object obj = m_printData.getNode(new Integer(item.getAD_Column_ID())); + Object obj = m_printData.getNode(Integer.valueOf(item.getAD_Column_ID())); if (obj == null){ td.addElement(" "); if (colSuppressRepeats[printColIndex]){ @@ -945,7 +945,7 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount) else { printColIndex++; - Object obj = m_printData.getNode(new Integer(item.getAD_Column_ID())); + Object obj = m_printData.getNode(Integer.valueOf(item.getAD_Column_ID())); String data = ""; if (obj == null){ if (colSuppressRepeats[printColIndex]){ diff --git a/org.adempiere.base/src/org/compiere/print/layout/ImageElement.java b/org.adempiere.base/src/org/compiere/print/layout/ImageElement.java index 170b01cb0c..1aa56b9982 100644 --- a/org.adempiere.base/src/org/compiere/print/layout/ImageElement.java +++ b/org.adempiere.base/src/org/compiere/print/layout/ImageElement.java @@ -89,7 +89,7 @@ public class ImageElement extends PrintElement */ public static ImageElement get (int AD_PrintFormatItem_ID) { - Object key = new Integer(AD_PrintFormatItem_ID); + Object key = Integer.valueOf(AD_PrintFormatItem_ID); ImageElement image = (ImageElement)s_cache.get(key); if (image == null) { diff --git a/org.adempiere.base/src/org/compiere/print/layout/LayoutEngine.java b/org.adempiere.base/src/org/compiere/print/layout/LayoutEngine.java index e2abc30d48..4e551fb4c8 100644 --- a/org.adempiere.base/src/org/compiere/print/layout/LayoutEngine.java +++ b/org.adempiere.base/src/org/compiere/print/layout/LayoutEngine.java @@ -1233,7 +1233,7 @@ public class LayoutEngine implements Pageable, Printable, Doc int AD_Column_ID = item.getAD_Column_ID(); if (log.isLoggable(Level.INFO)) log.info(format + " - Item=" + item.getName() + " (" + AD_Column_ID + ")"); // - Object obj = data.getNode(new Integer(AD_Column_ID)); + Object obj = data.getNode(Integer.valueOf(AD_Column_ID)); // Object obj = data.getNode(item.getColumnName()); // slower if (obj == null) { @@ -1267,7 +1267,7 @@ public class LayoutEngine implements Pageable, Printable, Doc return null; } MQuery query = new MQuery (format.getAD_Table_ID()); - query.addRestriction(item.getColumnName(), MQuery.EQUAL, new Integer(Record_ID)); + query.addRestriction(item.getColumnName(), MQuery.EQUAL, Integer.valueOf(Record_ID)); format.setTranslationViewQuery(query); if (log.isLoggable(Level.FINE)) log.fine(query.toString()); @@ -1363,7 +1363,7 @@ public class LayoutEngine implements Pageable, Printable, Doc String FieldAlignmentType, boolean isForm) { // Get Data - Object obj = m_data.getNode(new Integer(item.getAD_Column_ID())); + Object obj = m_data.getNode(Integer.valueOf(item.getAD_Column_ID())); if (obj == null) return null; else if (obj instanceof PrintDataElement) @@ -1479,7 +1479,7 @@ public class LayoutEngine implements Pageable, Printable, Doc */ private PrintElement createImageElement (MPrintFormatItem item, PrintData printData) { - Object obj = printData.getNode(new Integer(item.getAD_Column_ID())); + Object obj = printData.getNode(Integer.valueOf(item.getAD_Column_ID())); if (obj == null) return null; else if (obj instanceof PrintDataElement) @@ -1518,7 +1518,7 @@ public class LayoutEngine implements Pageable, Printable, Doc private PrintElement createBarcodeElement (MPrintFormatItem item, PrintData printData) { // Get Data - Object obj = printData.getNode(new Integer(item.getAD_Column_ID())); + Object obj = printData.getNode(Integer.valueOf(item.getAD_Column_ID())); if (obj == null) return null; else if (obj instanceof PrintDataElement) @@ -1620,7 +1620,7 @@ public class LayoutEngine implements Pageable, Printable, Doc { if (item.isNextLine() && item.getBelowColumn() != 0) { - additionalLines.put(new Integer(col), new Integer(item.getBelowColumn()-1)); + additionalLines.put(Integer.valueOf(col), Integer.valueOf(item.getBelowColumn()-1)); if (!item.isSuppressNull()) { item.setIsSuppressNull(true); // display size will be set to 0 in TableElement @@ -1676,13 +1676,13 @@ public class LayoutEngine implements Pageable, Printable, Doc printData.setRowIndex(row); if (printData.isFunctionRow()) { - functionRows.add(new Integer(row)); + functionRows.add(Integer.valueOf(row)); rowColFont.put(new Point(row, TableElement.ALL), tf.getFunct_Font()); rowColColor.put(new Point(row, TableElement.ALL), tf.getFunctFG_Color()); rowColBackground.put(new Point(row, TableElement.ALL), tf.getFunctBG_Color()); if (printData.isPageBreak()) { - pageBreak.add(new Integer(row)); + pageBreak.add(Integer.valueOf(row)); if (log.isLoggable(Level.FINER)) log.finer("PageBreak row=" + row); } @@ -1737,7 +1737,7 @@ public class LayoutEngine implements Pageable, Printable, Doc { Object obj = null; if (item.getAD_Column_ID() > 0) // teo_sarca, [ 1673542 ] - obj = printData.getNode(new Integer(item.getAD_Column_ID())); + obj = printData.getNode(Integer.valueOf(item.getAD_Column_ID())); if (obj == null) ; else if (obj instanceof PrintDataElement) diff --git a/org.adempiere.base/src/org/compiere/print/layout/StringElement.java b/org.adempiere.base/src/org/compiere/print/layout/StringElement.java index 445d6a5f88..c892872ed2 100644 --- a/org.adempiere.base/src/org/compiere/print/layout/StringElement.java +++ b/org.adempiere.base/src/org/compiere/print/layout/StringElement.java @@ -380,7 +380,7 @@ public class StringElement extends PrintElement String tableName = MQuery.getZoomTableName(columnName); Object code = m_ID.getID(); if (m_ID instanceof KeyNamePair) - code = new Integer(((KeyNamePair)m_ID).getKey()); + code = Integer.valueOf(((KeyNamePair)m_ID).getKey()); // MQuery query = new MQuery(tableName); query.addRestriction(columnName, MQuery.EQUAL, code); diff --git a/org.adempiere.base/src/org/compiere/print/layout/TableElement.java b/org.adempiere.base/src/org/compiere/print/layout/TableElement.java index fe44beeec6..f77a8ed583 100644 --- a/org.adempiere.base/src/org/compiere/print/layout/TableElement.java +++ b/org.adempiere.base/src/org/compiere/print/layout/TableElement.java @@ -301,9 +301,9 @@ public class TableElement extends PrintElement { int col = dataCol; // Print below existing column - if (m_additionalLines.containsKey(new Integer(dataCol))) + if (m_additionalLines.containsKey(Integer.valueOf(dataCol))) { - col = ((Integer)m_additionalLines.get(new Integer(dataCol))).intValue(); + col = ((Integer)m_additionalLines.get(Integer.valueOf(dataCol))).intValue(); if (log.isLoggable(Level.FINEST)) log.finest("DataColumn=" + dataCol + ", BelowColumn=" + col); } float colWidth = 0; @@ -614,7 +614,7 @@ public class TableElement extends PrintElement if (m_firstPage.height >= p_height && m_pageBreak.size() == 0) { if (log.isLoggable(Level.FINEST)) log.finest("Page Y=1 - PageHeight=" + m_firstPage.height + " - TableHeight=" + p_height); - m_firstRowOnPage.add(new Integer(0)); // Y + m_firstRowOnPage.add(Integer.valueOf(0)); // Y m_pageHeight.add(Float.valueOf(p_height)); // Y index only } // multiple pages on Y | Axis @@ -652,7 +652,7 @@ public class TableElement extends PrintElement if (pageBreak) { availableHeight = firstPage ? m_firstPage.height : m_nextPages.height; - m_firstRowOnPage.add(new Integer(dataRow+addlRows)); // Y + m_firstRowOnPage.add(Integer.valueOf(dataRow+addlRows)); // Y if (!firstPage) { m_pageHeight.add(Float.valueOf(usedHeight)); // Y index only @@ -688,7 +688,7 @@ public class TableElement extends PrintElement { if (log.isLoggable(Level.FINEST)) log.finest("Page X=1 - PageWidth=" + m_firstPage.width + " - TableWidth=" + p_width); - m_firstColumnOnPage.add(new Integer(0)); // X + m_firstColumnOnPage.add(Integer.valueOf(0)); // X // distributeColumns (m_firstPage.width-(int)p_width, 0, m_columnWidths.size()); } @@ -706,7 +706,7 @@ public class TableElement extends PrintElement if (col != 0) distributeColumns (availableWidth, lastStart, col); // - m_firstColumnOnPage.add(new Integer(col)); // X + m_firstColumnOnPage.add(Integer.valueOf(col)); // X if (log.isLoggable(Level.FINEST)) log.finest("Page X=" + m_firstColumnOnPage.size() + " - Col=" + col); lastStart = col; @@ -1073,7 +1073,7 @@ public class TableElement extends PrintElement String tableName = MQuery.getZoomTableName(columnName); Object code = pp.getID(); if (pp instanceof KeyNamePair) - code = new Integer(((KeyNamePair)pp).getKey()); + code = Integer.valueOf(((KeyNamePair)pp).getKey()); // MQuery query = new MQuery(tableName); query.addRestriction(columnName, MQuery.EQUAL, code, null, pp.toString()); @@ -1612,8 +1612,8 @@ public class TableElement extends PrintElement else { // next line is a funcion column -> underline this - boolean nextIsFunction = m_functionRows.contains(new Integer(row+1)); - if (nextIsFunction && m_functionRows.contains(new Integer(row))) + boolean nextIsFunction = m_functionRows.contains(Integer.valueOf(row+1)); + if (nextIsFunction && m_functionRows.contains(Integer.valueOf(row))) nextIsFunction = false; // this is a function line too if (nextIsFunction) { diff --git a/org.adempiere.base/src/org/compiere/report/FinReportJasper.java b/org.adempiere.base/src/org/compiere/report/FinReportJasper.java index b60797e30b..129b5c2869 100644 --- a/org.adempiere.base/src/org/compiere/report/FinReportJasper.java +++ b/org.adempiere.base/src/org/compiere/report/FinReportJasper.java @@ -61,7 +61,7 @@ public class FinReportJasper extends FinReport for (int i = 0; i < oldpara.length; i++) list.add (oldpara[i]); // and add the T_Report_AD_PInstance_ID parameter - list.add (new ProcessInfoParameter("T_Report_AD_PInstance_ID", new Integer(getAD_PInstance_ID()), null, null, null)); + list.add (new ProcessInfoParameter("T_Report_AD_PInstance_ID", Integer.valueOf(getAD_PInstance_ID()), null, null, null)); ProcessInfoParameter[] pars = new ProcessInfoParameter[list.size()]; list.toArray(pars); diff --git a/org.adempiere.base/src/org/compiere/report/MReportTree.java b/org.adempiere.base/src/org/compiere/report/MReportTree.java index a2a97a3e88..8d16fab310 100644 --- a/org.adempiere.base/src/org/compiere/report/MReportTree.java +++ b/org.adempiere.base/src/org/compiere/report/MReportTree.java @@ -303,7 +303,7 @@ public class MReportTree MTreeNode nn = (MTreeNode)en.nextElement(); if (!nn.isSummary()) { - list.add(new Integer(nn.getNode_ID())); + list.add(Integer.valueOf(nn.getNode_ID())); if (log.isLoggable(Level.FINEST)) log.finest("- " + nn); } else @@ -311,7 +311,7 @@ public class MReportTree } } else // not found or not summary - list.add(new Integer(ID)); + list.add(Integer.valueOf(ID)); // Integer[] retValue = new Integer[list.size()]; list.toArray(retValue); diff --git a/org.adempiere.base/src/org/compiere/report/core/RModel.java b/org.adempiere.base/src/org/compiere/report/core/RModel.java index dd1ada7c34..713bf10706 100644 --- a/org.adempiere.base/src/org/compiere/report/core/RModel.java +++ b/org.adempiere.base/src/org/compiere/report/core/RModel.java @@ -226,7 +226,7 @@ public class RModel implements Serializable if (log.isLoggable(Level.CONFIG)) log.config( "RModel.setGroup col=" + col); if (col < 0 || col >= m_data.cols.size()) return; - Integer ii = new Integer(col); + Integer ii = Integer.valueOf(col); if (!m_data.groups.contains(ii)) m_data.groups.add(ii); } // setGroup @@ -262,7 +262,7 @@ public class RModel implements Serializable if (log.isLoggable(Level.CONFIG)) log.config( "RModel.setFunction col=" + col + " - " + function); if (col < 0 || col >= m_data.cols.size()) return; - m_data.functions.put(new Integer(col), function); + m_data.functions.put(Integer.valueOf(col), function); } // setFunction /*************************************************************************/ 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 c6d02eaef7..1adbb75652 100644 --- a/org.adempiere.base/src/org/compiere/report/core/RModelData.java +++ b/org.adempiere.base/src/org/compiere/report/core/RModelData.java @@ -150,7 +150,7 @@ public class RModelData else if (rc.getColClass() == Double.class) row.add(Double.valueOf(rs.getDouble(index++))); else if (rc.getColClass() == Integer.class) - row.add(new Integer(rs.getInt(index++))); + row.add(Integer.valueOf(rs.getInt(index++))); else if (rc.getColClass() == Timestamp.class) row.add(rs.getTimestamp(index++)); else if (rc.getColClass() == Boolean.class) @@ -290,7 +290,7 @@ public class RModelData } } // for all columns // - m_groupRows.add(new Integer(rows.size())); // group row indicator + m_groupRows.add(Integer.valueOf(rows.size())); // group row indicator rows.add(newRow); groupBysValue[level] = row.get(idx); } @@ -347,7 +347,7 @@ public class RModelData // remove empty row added earlier to force group change if (gSize > 0) rows.remove(rows.size()-1); - m_groupRows.add(new Integer(rows.size())); // group row indicator + m_groupRows.add(Integer.valueOf(rows.size())); // group row indicator rows.add(newRow); } if (log.isLoggable(Level.FINE)) log.fine("End Rows=" + rows.size()); @@ -367,7 +367,7 @@ public class RModelData { m_groupRowsIndicator = new ArrayList(rows.size()); for (int r = 0; r < rows.size(); r++) - m_groupRowsIndicator.add(Boolean.valueOf(m_groupRows.contains(new Integer(r)))); + m_groupRowsIndicator.add(Boolean.valueOf(m_groupRows.contains(Integer.valueOf(r)))); } if (row < 0 || row >= m_groupRowsIndicator.size()) return false; diff --git a/org.adempiere.base/src/org/compiere/util/DB.java b/org.adempiere.base/src/org/compiere/util/DB.java index 189c020788..955ab0b7b7 100644 --- a/org.adempiere.base/src/org/compiere/util/DB.java +++ b/org.adempiere.base/src/org/compiere/util/DB.java @@ -961,7 +961,7 @@ public final class DB */ public static int executeUpdate (String sql, int param, String trxName, int timeOut) { - return executeUpdate (sql, new Object[]{new Integer(param)}, false, trxName, timeOut); + return executeUpdate (sql, new Object[]{Integer.valueOf(param)}, false, trxName, timeOut); } // executeUpdate /** @@ -990,7 +990,7 @@ public final class DB */ public static int executeUpdate (String sql, int param, boolean ignoreError, String trxName, int timeOut) { - return executeUpdate (sql, new Object[]{new Integer(param)}, ignoreError, trxName, timeOut); + return executeUpdate (sql, new Object[]{Integer.valueOf(param)}, ignoreError, trxName, timeOut); } // executeUpdate /** diff --git a/org.adempiere.base/src/org/eevolution/model/MDDOrderLine.java b/org.adempiere.base/src/org/eevolution/model/MDDOrderLine.java index b6ea792e48..1846e021b9 100644 --- a/org.adempiere.base/src/org/eevolution/model/MDDOrderLine.java +++ b/org.adempiere.base/src/org/eevolution/model/MDDOrderLine.java @@ -285,7 +285,7 @@ public class MDDOrderLine extends X_DD_OrderLine public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID) { if (M_AttributeSetInstance_ID == 0) // 0 is valid ID - set_Value("M_AttributeSetInstance_ID", new Integer(0)); + set_Value("M_AttributeSetInstance_ID", Integer.valueOf(0)); else super.setM_AttributeSetInstance_ID (M_AttributeSetInstance_ID); } // setM_AttributeSetInstance_ID diff --git a/org.adempiere.extend/src/compiere/model/CalloutUser.java b/org.adempiere.extend/src/compiere/model/CalloutUser.java index 1469b04c7f..f29ceb060d 100644 --- a/org.adempiere.extend/src/compiere/model/CalloutUser.java +++ b/org.adempiere.extend/src/compiere/model/CalloutUser.java @@ -112,7 +112,7 @@ public class CalloutUser extends CalloutEngine if (locID == 0) mTab.setValue("C_BPartner_Location_ID", null); else - mTab.setValue("C_BPartner_Location_ID", new Integer(locID)); + mTab.setValue("C_BPartner_Location_ID", Integer.valueOf(locID)); // Contact - overwritten by InfoBP selection int contID = rs.getInt("AD_User_ID"); @@ -125,7 +125,7 @@ public class CalloutUser extends CalloutEngine if (contID == 0) mTab.setValue("AD_User_ID", null); else - mTab.setValue("AD_User_ID", new Integer(contID)); + mTab.setValue("AD_User_ID", Integer.valueOf(contID)); } } catch (SQLException e) diff --git a/org.adempiere.extend/src/test/AdempiereTestCase.java b/org.adempiere.extend/src/test/AdempiereTestCase.java index 1260481f08..b53f677ba8 100644 --- a/org.adempiere.extend/src/test/AdempiereTestCase.java +++ b/org.adempiere.extend/src/test/AdempiereTestCase.java @@ -148,8 +148,8 @@ public class AdempiereTestCase extends TestCase //m_Ctx = new Properties(); m_Ctx = Env.getCtx(); - m_Ctx.setProperty("#AD_User_ID", new Integer(AD_User_ID_Value).toString()); - m_Ctx.setProperty("#AD_Client_ID", new Integer(AD_Client_ID_Value).toString()); + m_Ctx.setProperty("#AD_User_ID", Integer.valueOf(AD_User_ID_Value).toString()); + m_Ctx.setProperty("#AD_Client_ID", Integer.valueOf(AD_Client_ID_Value).toString()); if (fileName_Value.length() < 1) { assertEquals("Please specify path to idempiere.properties file!", true, false); diff --git a/org.adempiere.extend/src/test/performance/SingleMProductTest.java b/org.adempiere.extend/src/test/performance/SingleMProductTest.java index b6183034f3..42ec6e259f 100644 --- a/org.adempiere.extend/src/test/performance/SingleMProductTest.java +++ b/org.adempiere.extend/src/test/performance/SingleMProductTest.java @@ -45,7 +45,7 @@ public class SingleMProductTest extends TestCase { AD_User_ID_Value = Integer.parseInt(testProperties.getProperty(AD_User_ID_Key, AD_User_ID_DefaultValue) ); m_Ctx = new Properties(); - m_Ctx.setProperty("#AD_User_ID", new Integer(AD_User_ID_Value).toString()); + m_Ctx.setProperty("#AD_User_ID", Integer.valueOf(AD_User_ID_Value).toString()); System.out.println("m_Ctx: " + m_Ctx); if (fileName_Value.length() < 1) { diff --git a/org.adempiere.install/src/org/compiere/install/util/AppsAction.java b/org.adempiere.install/src/org/compiere/install/util/AppsAction.java index df9f8cfbca..de5a507b5e 100644 --- a/org.adempiere.install/src/org/compiere/install/util/AppsAction.java +++ b/org.adempiere.install/src/org/compiere/install/util/AppsAction.java @@ -100,7 +100,7 @@ public final class AppsAction extends AbstractAction if (ch != ' ') { toolTipText = toolTipText.substring(0, pos) + toolTipText.substring(pos+1); - putValue(Action.MNEMONIC_KEY, new Integer(ch.hashCode())); + putValue(Action.MNEMONIC_KEY, Integer.valueOf(ch.hashCode())); } } // @@ -125,7 +125,7 @@ public final class AppsAction extends AbstractAction putValue(Action.SHORT_DESCRIPTION, toolTipText); // Tooltip putValue(Action.ACTION_COMMAND_KEY, m_action); // ActionCammand putValue(Action.ACCELERATOR_KEY, accelerator); // KeyStroke - // putValue(Action.MNEMONIC_KEY, new Integer(0)); // Mnemonic + // putValue(Action.MNEMONIC_KEY, Integer.valueOf(0)); // Mnemonic // putValue(Action.DEFAULT, text); // Not Used // Create Button diff --git a/org.adempiere.pipo/src/org/adempiere/pipo2/PackOut.java b/org.adempiere.pipo/src/org/adempiere/pipo2/PackOut.java index 1eaf2ee448..c6d3a59ca6 100644 --- a/org.adempiere.pipo/src/org/adempiere/pipo2/PackOut.java +++ b/org.adempiere.pipo/src/org/adempiere/pipo2/PackOut.java @@ -197,7 +197,7 @@ public class PackOut SAXTransformerFactory packoutFactory = (SAXTransformerFactory) SAXTransformerFactory.newInstance(); //indent-number attribute support is not guarantee try { - packoutFactory.setAttribute("indent-number", new Integer(4)); + packoutFactory.setAttribute("indent-number", Integer.valueOf(4)); } catch (Exception e) {} TransformerHandler packoutHandler = packoutFactory.newTransformerHandler(); Transformer packoutTransformer = packoutHandler.getTransformer(); @@ -247,7 +247,7 @@ public class PackOut SAXTransformerFactory transformerFactory = (SAXTransformerFactory) SAXTransformerFactory.newInstance(); //indent-number attribute support is not guarantee try { - transformerFactory.setAttribute("indent-number", new Integer(4)); + transformerFactory.setAttribute("indent-number", Integer.valueOf(4)); } catch (Exception e) {} TransformerHandler docHandler = transformerFactory.newTransformerHandler(); Transformer transformer = docHandler.getTransformer(); diff --git a/org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java b/org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java index 25a1a6334c..8414308d7f 100644 --- a/org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java +++ b/org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java @@ -131,7 +131,7 @@ public class PoFiller{ if (value!=null && value.trim().length() == 0) value = null; - Integer i = value != null ? new Integer(value) : null; + Integer i = value != null ? Integer.valueOf(value) : null; Object oldValue = po.get_Value(qName); if (oldValue == null && i == null) @@ -267,7 +267,7 @@ public class PoFiller{ //only import official id if (qName.equalsIgnoreCase(po.get_TableName()+"_ID")) { String value = e != null ? e.contents.toString() : null; - Integer i = !Util.isEmpty(value) ? new Integer(value) : null; + Integer i = !Util.isEmpty(value) ? Integer.valueOf(value) : null; if (i != null && i.intValue() > 0 && i.intValue() <= MTable.MAX_OFFICIAL_ID) { if (po.get_ID() != i.intValue()) { //make sure id have not been used by other client diff --git a/org.adempiere.replication/src/org/adempiere/process/rpl/exp/ExportHelper.java b/org.adempiere.replication/src/org/adempiere/process/rpl/exp/ExportHelper.java index f5f81c3c6f..8e617b8c06 100644 --- a/org.adempiere.replication/src/org/adempiere/process/rpl/exp/ExportHelper.java +++ b/org.adempiere.replication/src/org/adempiere/process/rpl/exp/ExportHelper.java @@ -473,11 +473,11 @@ public class ExportHelper { if (variableName != null && !"".equals(variableName) ) { Integer var = variableMap.get(variableName); if (var == null) { - var = new Integer(0); + var = Integer.valueOf(0); } int intValue = var.intValue(); intValue++; - variableMap.put(variableName, new Integer(intValue)); + variableMap.put(variableName, Integer.valueOf(intValue)); } } 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 9ee4b79b2f..4a75b62048 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 @@ -128,9 +128,9 @@ public class ImportHelper { throw new Exception(Msg.getMsg(ctx, "XMLVersionAttributeMandatory")); } ///Getting Attributes. - int ReplicationMode = new Integer(rootElement.getAttribute("ReplicationMode")); + int ReplicationMode = Integer.valueOf(rootElement.getAttribute("ReplicationMode")); String ReplicationType = rootElement.getAttribute("ReplicationType"); - int ReplicationEvent = new Integer(rootElement.getAttribute("ReplicationEvent")); + int ReplicationEvent = Integer.valueOf(rootElement.getAttribute("ReplicationEvent")); MClient client = null; client = getAD_ClientByValue(ctx, AD_Client_Value, trxName); @@ -354,7 +354,7 @@ public class ImportHelper { { refRecord_ID = getID(ctx, referencedExpFormat, referencedNode, line.getValue(), po.get_TrxName()); if (log.isLoggable(Level.INFO)) log.info("refRecord_ID = " + refRecord_ID); - value = new Integer(refRecord_ID); + value = Integer.valueOf(refRecord_ID); } else { @@ -485,7 +485,7 @@ public class ImportHelper { if (! Util.isEmpty(value.toString())) { int intValue = Integer.parseInt(value.toString()); - value = new Integer( intValue ); + value = Integer.valueOf( intValue ); }else { value=null; @@ -654,7 +654,7 @@ public class ImportHelper { if (log.isLoggable(Level.INFO)) log.info("record_ID = " + record_ID); - cols[col] = new Integer(record_ID); + cols[col] = Integer.valueOf(record_ID); } else { @@ -680,7 +680,7 @@ public class ImportHelper { if (!Util.isEmpty(value.toString())) { //double doubleValue = Double.parseDouble(value.toString()); - value = new Integer(value.toString()); + value = Integer.valueOf(value.toString()); if (DisplayType.ID == column.getAD_Reference_ID()) { replication_id = (Integer) value; diff --git a/org.adempiere.report.jasper/src/org/adempiere/report/jasper/ReportStarter.java b/org.adempiere.report.jasper/src/org/adempiere/report/jasper/ReportStarter.java index dcec5b808d..866794474c 100644 --- a/org.adempiere.report.jasper/src/org/adempiere/report/jasper/ReportStarter.java +++ b/org.adempiere.report.jasper/src/org/adempiere/report/jasper/ReportStarter.java @@ -560,16 +560,16 @@ public class ReportStarter implements ProcessCall, ClientProcess } if (Record_ID > 0) - params.put("RECORD_ID", new Integer( Record_ID)); + params.put("RECORD_ID", Integer.valueOf( Record_ID)); // contribution from Ricardo (ralexsander) // in iReports you can 'SELECT' AD_Client_ID, AD_Org_ID and AD_User_ID using only AD_PINSTANCE_ID - params.put("AD_PINSTANCE_ID", new Integer( AD_PInstance_ID)); + params.put("AD_PINSTANCE_ID", Integer.valueOf( AD_PInstance_ID)); // FR [3123850] - Add continuosly needed parameters to Jasper Starter - Carlos Ruiz - GlobalQSS - params.put("AD_CLIENT_ID", new Integer( Env.getAD_Client_ID(Env.getCtx()))); - params.put("AD_ROLE_ID", new Integer( Env.getAD_Role_ID(Env.getCtx()))); - params.put("AD_USER_ID", new Integer( Env.getAD_User_ID(Env.getCtx()))); + params.put("AD_CLIENT_ID", Integer.valueOf( Env.getAD_Client_ID(Env.getCtx()))); + params.put("AD_ROLE_ID", Integer.valueOf( Env.getAD_Role_ID(Env.getCtx()))); + params.put("AD_USER_ID", Integer.valueOf( Env.getAD_User_ID(Env.getCtx()))); params.put("AD_CLIENT_NAME", Env.getContext(Env.getCtx(), "#AD_Client_Name")); params.put("AD_ROLE_NAME", Env.getContext(Env.getCtx(), "#AD_Role_Name")); diff --git a/org.adempiere.server/src/main/server/org/compiere/server/Scheduler.java b/org.adempiere.server/src/main/server/org/compiere/server/Scheduler.java index 1230844383..97022d89d0 100644 --- a/org.adempiere.server/src/main/server/org/compiere/server/Scheduler.java +++ b/org.adempiere.server/src/main/server/org/compiere/server/Scheduler.java @@ -586,7 +586,7 @@ public class Scheduler extends AdempiereServer */ protected static MScheduler get(Properties ctx, int AD_Scheduler_ID) { - Integer key = new Integer(AD_Scheduler_ID); + Integer key = Integer.valueOf(AD_Scheduler_ID); MScheduler retValue = (MScheduler)s_cache.get(key); if (retValue == null) { diff --git a/org.adempiere.server/src/main/server/org/compiere/server/WorkflowProcessor.java b/org.adempiere.server/src/main/server/org/compiere/server/WorkflowProcessor.java index bcab69ed55..6e9f20c596 100644 --- a/org.adempiere.server/src/main/server/org/compiere/server/WorkflowProcessor.java +++ b/org.adempiere.server/src/main/server/org/compiere/server/WorkflowProcessor.java @@ -381,7 +381,7 @@ public class WorkflowProcessor extends AdempiereServer // To Activity Owner if (m_client.sendEMail(activity.getAD_User_ID(), subject, message, pdf)) counter++; - list.add (new Integer(activity.getAD_User_ID())); + list.add (Integer.valueOf(activity.getAD_User_ID())); // To Process Owner if (toProcess @@ -389,7 +389,7 @@ public class WorkflowProcessor extends AdempiereServer { if (m_client.sendEMail(process.getAD_User_ID(), subject, message, pdf)) counter++; - list.add (new Integer(process.getAD_User_ID())); + list.add (Integer.valueOf(process.getAD_User_ID())); } // To Activity Responsible @@ -409,11 +409,11 @@ public class WorkflowProcessor extends AdempiereServer // Processor SuperVisor if (toSupervisor && m_model.getSupervisor_ID() != 0 - && !list.contains(new Integer(m_model.getSupervisor_ID()))) + && !list.contains(Integer.valueOf(m_model.getSupervisor_ID()))) { if (m_client.sendEMail(m_model.getSupervisor_ID(), subject, message, pdf)) counter++; - list.add (new Integer(m_model.getSupervisor_ID())); + list.add (Integer.valueOf(m_model.getSupervisor_ID())); } return counter; @@ -439,11 +439,11 @@ public class WorkflowProcessor extends AdempiereServer // Human else if (MWFResponsible.RESPONSIBLETYPE_Human.equals(responsible.getResponsibleType()) && responsible.getAD_User_ID() != 0 - && !list.contains(new Integer(responsible.getAD_User_ID()))) + && !list.contains(Integer.valueOf(responsible.getAD_User_ID()))) { if (m_client.sendEMail(responsible.getAD_User_ID(), subject, message, pdf)) counter++; - list.add (new Integer(responsible.getAD_User_ID())); + list.add (Integer.valueOf(responsible.getAD_User_ID())); } // Org of the Document else if (MWFResponsible.RESPONSIBLETYPE_Organization.equals(responsible.getResponsibleType())) @@ -453,11 +453,11 @@ public class WorkflowProcessor extends AdempiereServer { MOrgInfo org = MOrgInfo.get (getCtx(), document.getAD_Org_ID(), null); if (org.getSupervisor_ID() != 0 - && !list.contains(new Integer(org.getSupervisor_ID()))) + && !list.contains(Integer.valueOf(org.getSupervisor_ID()))) { if (m_client.sendEMail(org.getSupervisor_ID(), subject, message, pdf)) counter++; - list.add (new Integer(org.getSupervisor_ID())); + list.add (Integer.valueOf(org.getSupervisor_ID())); } } } @@ -472,11 +472,11 @@ public class WorkflowProcessor extends AdempiereServer if (!roles.isActive()) continue; int AD_User_ID = roles.getAD_User_ID(); - if (!list.contains(new Integer(AD_User_ID))) + if (!list.contains(Integer.valueOf(AD_User_ID))) { if (m_client.sendEMail(AD_User_ID, subject, message, pdf)) counter++; - list.add (new Integer(AD_User_ID)); + list.add (Integer.valueOf(AD_User_ID)); } } } diff --git a/org.adempiere.ui.swing/src/org/adempiere/plaf/AdempiereTheme.java b/org.adempiere.ui.swing/src/org/adempiere/plaf/AdempiereTheme.java index 69fa7b41bb..d6135f0e71 100644 --- a/org.adempiere.ui.swing/src/org/adempiere/plaf/AdempiereTheme.java +++ b/org.adempiere.ui.swing/src/org/adempiere/plaf/AdempiereTheme.java @@ -405,8 +405,8 @@ public class AdempiereTheme extends com.jgoodies.looks.plastic.PlasticTheme { "ScrollBar.thumbHighlight", getPrimaryControlHighlight(), PlasticScrollBarUI.MAX_BUMPS_WIDTH_KEY, - new Integer(22), - PlasticScrollBarUI.MAX_BUMPS_WIDTH_KEY, new Integer(30), + Integer.valueOf(22), + PlasticScrollBarUI.MAX_BUMPS_WIDTH_KEY, Integer.valueOf(30), //"TabbedPane.selected", getWhite(), "TabbedPane.selectHighlight", new ColorUIResource(231, 218, 188), ExtendedTheme.ERROR_BG_KEY, diff --git a/org.adempiere.ui.swing/src/org/compiere/acct/AcctViewerData.java b/org.adempiere.ui.swing/src/org/compiere/acct/AcctViewerData.java index 07fc957ff0..0d7826e0aa 100644 --- a/org.adempiere.ui.swing/src/org/compiere/acct/AcctViewerData.java +++ b/org.adempiere.ui.swing/src/org/compiere/acct/AcctViewerData.java @@ -209,7 +209,7 @@ class AcctViewerData // ValueNamePair pp = new ValueNamePair(tableName, name); cb.addItem(pp); - tableInfo.put (tableName, new Integer(id)); + tableInfo.put (tableName, Integer.valueOf(id)); if (id == AD_Table_ID) select = pp; } diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java b/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java index 81517a24c0..a770efee31 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java @@ -856,7 +856,7 @@ public final class APanel extends CPanel // Is this tab included? if (includedMap.size() > 0) { - GridController parent = (GridController)includedMap.get(new Integer(gTab.getAD_Tab_ID())); + GridController parent = (GridController)includedMap.get(Integer.valueOf(gTab.getAD_Tab_ID())); if (parent != null) { // FR [ 1757088 ] @@ -2333,7 +2333,7 @@ public final class APanel extends CPanel { if (queryColumn.endsWith("_ID")) query.addRestriction(queryColumn, MQuery.EQUAL, - new Integer(Env.getContextAsInt(m_ctx, m_curWindowNo, queryColumn)), + Integer.valueOf(Env.getContextAsInt(m_ctx, m_curWindowNo, queryColumn)), infoName, infoDisplay); else query.addRestriction(queryColumn, MQuery.EQUAL, @@ -2366,7 +2366,7 @@ public final class APanel extends CPanel { if (link.endsWith("_ID")) query.addRestriction(link, MQuery.EQUAL, - new Integer(Env.getContextAsInt(m_ctx, m_curWindowNo, link))); + Integer.valueOf(Env.getContextAsInt(m_ctx, m_curWindowNo, link))); else query.addRestriction(link, MQuery.EQUAL, Env.getContext(m_ctx, m_curWindowNo, link)); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/ARequest.java b/org.adempiere.ui.swing/src/org/compiere/apps/ARequest.java index a19a232bee..65a1c01faf 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/ARequest.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/ARequest.java @@ -220,47 +220,47 @@ public class ARequest implements ActionListener { GridTab tab = frame.getAPanel().getCurrentTab(); tab.dataNew (false); - tab.setValue("AD_Table_ID", new Integer(m_AD_Table_ID)); - tab.setValue("Record_ID", new Integer(m_Record_ID)); + tab.setValue("AD_Table_ID", Integer.valueOf(m_AD_Table_ID)); + tab.setValue("Record_ID", Integer.valueOf(m_Record_ID)); // if (m_C_BPartner_ID != 0) - tab.setValue("C_BPartner_ID", new Integer(m_C_BPartner_ID)); + tab.setValue("C_BPartner_ID", Integer.valueOf(m_C_BPartner_ID)); // if (m_AD_Table_ID == MBPartner.Table_ID) - tab.setValue("C_BPartner_ID", new Integer(m_Record_ID)); + tab.setValue("C_BPartner_ID", Integer.valueOf(m_Record_ID)); else if (m_AD_Table_ID == MUser.Table_ID) - tab.setValue("AD_User_ID", new Integer(m_Record_ID)); + tab.setValue("AD_User_ID", Integer.valueOf(m_Record_ID)); // else if (m_AD_Table_ID == MProject.Table_ID) - tab.setValue("C_Project_ID", new Integer(m_Record_ID)); + tab.setValue("C_Project_ID", Integer.valueOf(m_Record_ID)); else if (m_AD_Table_ID == MAsset.Table_ID) - tab.setValue("A_Asset_ID", new Integer(m_Record_ID)); + tab.setValue("A_Asset_ID", Integer.valueOf(m_Record_ID)); // else if (m_AD_Table_ID == MOrder.Table_ID) - tab.setValue("C_Order_ID", new Integer(m_Record_ID)); + tab.setValue("C_Order_ID", Integer.valueOf(m_Record_ID)); else if (m_AD_Table_ID == MInvoice.Table_ID) - tab.setValue("C_Invoice_ID", new Integer(m_Record_ID)); + tab.setValue("C_Invoice_ID", Integer.valueOf(m_Record_ID)); // else if (m_AD_Table_ID == MProduct.Table_ID) - tab.setValue("M_Product_ID", new Integer(m_Record_ID)); + tab.setValue("M_Product_ID", Integer.valueOf(m_Record_ID)); else if (m_AD_Table_ID == MPayment.Table_ID) - tab.setValue("C_Payment_ID", new Integer(m_Record_ID)); + tab.setValue("C_Payment_ID", Integer.valueOf(m_Record_ID)); // else if (m_AD_Table_ID == MInOut.Table_ID) - tab.setValue("M_InOut_ID", new Integer(m_Record_ID)); + tab.setValue("M_InOut_ID", Integer.valueOf(m_Record_ID)); else if (m_AD_Table_ID == MRMA.Table_ID) - tab.setValue("M_RMA_ID", new Integer(m_Record_ID)); + tab.setValue("M_RMA_ID", Integer.valueOf(m_Record_ID)); // else if (m_AD_Table_ID == MCampaign.Table_ID) - tab.setValue("C_Campaign_ID", new Integer(m_Record_ID)); + tab.setValue("C_Campaign_ID", Integer.valueOf(m_Record_ID)); // else if (m_AD_Table_ID == MRequest.Table_ID) - tab.setValue(MRequest.COLUMNNAME_R_RequestRelated_ID, new Integer(m_Record_ID)); + tab.setValue(MRequest.COLUMNNAME_R_RequestRelated_ID, Integer.valueOf(m_Record_ID)); // FR [2842165] - Order Ref link from SO line creating new request else if (m_AD_Table_ID == MOrderLine.Table_ID) { MOrderLine oLine = new MOrderLine(Env.getCtx(), m_Record_ID, null); if (oLine != null) { - tab.setValue(MOrderLine.COLUMNNAME_C_Order_ID, new Integer(oLine.getC_Order_ID())); + tab.setValue(MOrderLine.COLUMNNAME_C_Order_ID, Integer.valueOf(oLine.getC_Order_ID())); } } } diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/AppsAction.java b/org.adempiere.ui.swing/src/org/compiere/apps/AppsAction.java index 5a0edede92..935aae5aaf 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/AppsAction.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/AppsAction.java @@ -101,7 +101,7 @@ public final class AppsAction extends AbstractAction if (ch != ' ') { toolTipText = toolTipText.substring(0, pos) + toolTipText.substring(pos+1); - putValue(Action.MNEMONIC_KEY, new Integer(ch.hashCode())); + putValue(Action.MNEMONIC_KEY, Integer.valueOf(ch.hashCode())); } } // @@ -126,7 +126,7 @@ public final class AppsAction extends AbstractAction putValue(Action.SHORT_DESCRIPTION, toolTipText); // Tooltip putValue(Action.ACTION_COMMAND_KEY, m_action); // ActionCammand putValue(Action.ACCELERATOR_KEY, accelerator); // KeyStroke - // putValue(Action.MNEMONIC_KEY, new Integer(0)); // Mnemonic + // putValue(Action.MNEMONIC_KEY, Integer.valueOf(0)); // Mnemonic // putValue(Action.DEFAULT, text); // Not Used // Create Button diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VAllocation.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VAllocation.java index cead1dfac2..514b1cfe41 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VAllocation.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VAllocation.java @@ -255,7 +255,7 @@ public class VAllocation extends Allocation int AD_Column_ID = COLUMN_C_INVOICE_C_CURRENCY_ID; // C_Invoice.C_Currency_ID MLookup lookupCur = MLookupFactory.get (Env.getCtx(), m_WindowNo, 0, AD_Column_ID, DisplayType.TableDir); currencyPick = new VLookup("C_Currency_ID", true, false, true, lookupCur); - currencyPick.setValue(new Integer(m_C_Currency_ID)); + currencyPick.setValue(Integer.valueOf(m_C_Currency_ID)); currencyPick.addVetoableChangeListener(this); // Organization filter selection @@ -283,7 +283,7 @@ public class VAllocation extends Allocation AD_Column_ID = 61804; // C_AllocationLine.C_Charge_ID MLookup lookupCharge = MLookupFactory.get (Env.getCtx(), m_WindowNo, 0, AD_Column_ID, DisplayType.TableDir); chargePick = new VLookup("C_Charge_ID", false, false, true, lookupCharge); - chargePick.setValue(new Integer(m_C_Charge_ID)); + chargePick.setValue(Integer.valueOf(m_C_Charge_ID)); chargePick.addVetoableChangeListener(this); } // dynInit diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VBOMDrop.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VBOMDrop.java index 358c973afc..7da35141d1 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VBOMDrop.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VBOMDrop.java @@ -422,7 +422,7 @@ public class VBOMDrop extends CPanel this.add(b, new ALayoutConstraint(m_bomLine++, 0)); } // Add to List & display - m_productList.add (new Integer(M_Product_ID)); + m_productList.add (Integer.valueOf(M_Product_ID)); VNumber qty = new VNumber ("Qty", true, false, true, DisplayType.Quantity, name); qty.setValue(lineQty); qty.setReadWrite(selected); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VPayPrint.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VPayPrint.java index 1b506efcd2..8c3535ceb5 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VPayPrint.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VPayPrint.java @@ -245,7 +245,7 @@ public class VPayPrint extends PayPrint implements FormPanel, ActionListener, Ve return; m_C_PaySelection_ID = C_PaySelection_ID; - paySelectSearch.setValue(new Integer(m_C_PaySelection_ID)); + paySelectSearch.setValue(Integer.valueOf(m_C_PaySelection_ID)); loadPaySelectInfo(); } // setsetPaySelection diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VStatementCreateFromBatch.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VStatementCreateFromBatch.java index feea16bb03..5eb8579999 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VStatementCreateFromBatch.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VStatementCreateFromBatch.java @@ -149,7 +149,7 @@ public class VStatementCreateFromBatch extends StatementCreateFromBatch implemen bankAccountField = new VLookup ("C_BankAccount_ID", true, true, true, lookup); // Set Default int C_BankAccount_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "C_BankAccount_ID"); - bankAccountField.setValue(new Integer(C_BankAccount_ID)); + bankAccountField.setValue(Integer.valueOf(C_BankAccount_ID)); bankAccountField.addActionListener(this); // initial Loading authorizationField = new VString ("authorization", false, false, true, 10, 30, null, null); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VTreeBOM.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VTreeBOM.java index 49d1a292f7..508297235e 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VTreeBOM.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VTreeBOM.java @@ -478,7 +478,7 @@ public class VTreeBOM extends CPanel implements FormPanel, ActionListener, TreeS Vector line = new Vector(10); line.add( Boolean.valueOf(M_Product.isActive())); // 0 IsActive - line.add( new Integer(0).toString()); // 1 Line + line.add( Integer.valueOf(0).toString()); // 1 Line KeyNamePair pp = new KeyNamePair(M_Product.getM_Product_ID(),M_Product.getValue().concat("_").concat(M_Product.getName())); line.add(pp); // 2 M_Product_ID MUOM u = new MUOM(M_Product.getCtx(), M_Product.getC_UOM_ID(), M_Product.get_TrxName()); @@ -561,7 +561,7 @@ public class VTreeBOM extends CPanel implements FormPanel, ActionListener, TreeS Vector line = new Vector(10); line.add( Boolean.valueOf(bomline.isActive())); // 0 IsActive - line.add( new Integer(bomline.getLine()).toString()); // 1 Line + line.add( Integer.valueOf(bomline.getLine()).toString()); // 1 Line KeyNamePair pp = new KeyNamePair(M_Product.getM_Product_ID(),M_Product.getValue().concat("_").concat(M_Product.getName())); line.add(pp); // 2 M_Product_ID MUOM u = new MUOM(M_Product.getCtx(), M_Product.getC_UOM_ID(), M_Product.get_TrxName()); @@ -589,7 +589,7 @@ public class VTreeBOM extends CPanel implements FormPanel, ActionListener, TreeS Vector line = new Vector(10); line.add( Boolean.valueOf(M_Product.isActive())); // 0 IsActive - line.add( new Integer(bom.getLine()).toString()); // 1 Line + line.add( Integer.valueOf(bom.getLine()).toString()); // 1 Line KeyNamePair pp = new KeyNamePair(M_Product.getM_Product_ID(),M_Product.getValue().concat("_").concat(M_Product.getName())); line.add(pp); // 2 M_Product_ID MUOM u = new MUOM(M_Product.getCtx(), M_Product.getC_UOM_ID(), M_Product.get_TrxName()); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/Find.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/Find.java index 212f02edc6..7de7c92beb 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/Find.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/Find.java @@ -531,7 +531,7 @@ public final class Find extends CDialog /**/ // TargetFields - m_targetFields.put (new Integer(mField.getAD_Column_ID()), mField); + m_targetFields.put (Integer.valueOf(mField.getAD_Column_ID()), mField); } // for all target tab fields // Disable simple query fields @@ -1444,7 +1444,7 @@ public final class Find extends CDialog if (in instanceof Integer) return in; int i = Integer.parseInt(in.toString()); - return new Integer(i); + return Integer.valueOf(i); } // Return BigDecimal else if (DisplayType.isNumeric(dt)) @@ -1512,7 +1512,7 @@ public final class Find extends CDialog || (DisplayType.isID(dt) && field.getColumnName().endsWith("_ID"))) { int i = Integer.parseInt(in); - return new Integer(i); + return Integer.valueOf(i); } // Return BigDecimal else if (DisplayType.isNumeric(dt)) 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 241bb06a13..96d01c2d5f 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 @@ -1223,7 +1223,7 @@ public abstract class Info extends CDialog else if (c == Double.class) data = Double.valueOf(m_rs.getDouble(colIndex)); else if (c == Integer.class) - data = new Integer(m_rs.getInt(colIndex)); + data = Integer.valueOf(m_rs.getInt(colIndex)); else if (c == KeyNamePair.class) { String display = m_rs.getString(colIndex); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoInOut.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoInOut.java index ce9965462c..a8acede1c1 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoInOut.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoInOut.java @@ -212,7 +212,7 @@ public class InfoInOut extends Info // Set Defaults String bp = Env.getContext(Env.getCtx(), p_WindowNo, "C_BPartner_ID"); if (bp != null && bp.length() != 0) - fBPartner_ID.setValue(new Integer(bp)); + fBPartner_ID.setValue(Integer.valueOf(bp)); // prepare table StringBuilder where = new StringBuilder("i.IsActive='Y'"); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoInvoice.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoInvoice.java index 84b563a2ac..9e052da1a2 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoInvoice.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoInvoice.java @@ -252,7 +252,7 @@ public class InfoInvoice extends Info // Set Defaults String bp = Env.getContext(Env.getCtx(), p_WindowNo, "C_BPartner_ID"); if (bp != null && bp.length() != 0) - fBPartner_ID.setValue(new Integer(bp)); + fBPartner_ID.setValue(Integer.valueOf(bp)); // prepare table StringBuilder where = new StringBuilder("i.IsActive='Y'"); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoOrder.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoOrder.java index 91b4e1a87a..fb000407aa 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoOrder.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoOrder.java @@ -230,7 +230,7 @@ public class InfoOrder extends Info // Set Defaults String bp = Env.getContext(Env.getCtx(), p_WindowNo, "C_BPartner_ID"); if (bp != null && bp.length() != 0) - fBPartner_ID.setValue(new Integer(bp)); + fBPartner_ID.setValue(Integer.valueOf(bp)); // prepare table StringBuilder where = new StringBuilder("o.IsActive='Y'"); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoPayment.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoPayment.java index 86553081d7..87afc3e650 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoPayment.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoPayment.java @@ -229,7 +229,7 @@ public class InfoPayment extends Info // Set Defaults String bp = Env.getContext(Env.getCtx(), p_WindowNo, "C_BPartner_ID"); if (bp != null && bp.length() != 0) - fBPartner_ID.setValue(new Integer(bp)); + fBPartner_ID.setValue(Integer.valueOf(bp)); // prepare table StringBuilder where = new StringBuilder("p.IsActive='Y'"); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromDepositBatchUI.java b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromDepositBatchUI.java index f7402def27..8f07f32ab6 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromDepositBatchUI.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromDepositBatchUI.java @@ -152,7 +152,7 @@ public class VCreateFromDepositBatchUI extends CreateFromDepositBatch implements bankAccountField = new VLookup ("C_BankAccount_ID", true, true, true, lookup); // Set Default int C_BankAccount_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "C_BankAccount_ID"); - bankAccountField.setValue(new Integer(C_BankAccount_ID)); + bankAccountField.setValue(Integer.valueOf(C_BankAccount_ID)); bankAccountField.addActionListener(this); // initial Loading authorizationField = new VString ("authorization", false, false, true, 10, 30, null, null); @@ -161,7 +161,7 @@ public class VCreateFromDepositBatchUI extends CreateFromDepositBatch implements MLookup lookupDocument = MLookupFactory.get (Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MPayment.Table_Name, MPayment.COLUMNNAME_C_DocType_ID), DisplayType.TableDir); documentTypeField = new VLookup (MPayment.COLUMNNAME_C_DocType_ID,false,false,true,lookupDocument); int C_DocType_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "C_DocType_ID"); - documentTypeField.setValue(new Integer(C_DocType_ID)); + documentTypeField.setValue(Integer.valueOf(C_DocType_ID)); documentTypeField.addActionListener(this); MLookup lookupTender = MLookupFactory.get (Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MPayment.Table_Name, MPayment.COLUMNNAME_TenderType), DisplayType.List); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromInvoiceUI.java b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromInvoiceUI.java index 2f9ecb718e..194b7f98ed 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromInvoiceUI.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromInvoiceUI.java @@ -256,7 +256,7 @@ public class VCreateFromInvoiceUI extends CreateFromInvoice implements ActionLis bPartnerField = new VLookup ("C_BPartner_ID", true, false, true, lookup); // int C_BPartner_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "C_BPartner_ID"); - bPartnerField.setValue(new Integer(C_BPartner_ID)); + bPartnerField.setValue(Integer.valueOf(C_BPartner_ID)); // initial loading initBPOrderDetails(C_BPartner_ID, forInvoice); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromRMAUI.java b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromRMAUI.java index 5be14d89a0..e489214b3d 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromRMAUI.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromRMAUI.java @@ -160,7 +160,7 @@ public class VCreateFromRMAUI extends CreateFromRMA implements VetoableChangeLis bPartnerField = new VLookup ("C_BPartner_ID", true, false, true, lookup); // int C_BPartner_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "C_BPartner_ID"); - bPartnerField.setValue(new Integer(C_BPartner_ID)); + bPartnerField.setValue(Integer.valueOf(C_BPartner_ID)); } // initBPartner protected void loadRMA() diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromShipmentUI.java b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromShipmentUI.java index 6d6b0bf4f8..a5993a16d1 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromShipmentUI.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromShipmentUI.java @@ -307,7 +307,7 @@ public class VCreateFromShipmentUI extends CreateFromShipment implements ActionL bPartnerField = new VLookup ("C_BPartner_ID", true, false, true, lookup); // int C_BPartner_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "C_BPartner_ID"); - bPartnerField.setValue(new Integer(C_BPartner_ID)); + bPartnerField.setValue(Integer.valueOf(C_BPartner_ID)); // initial loading initBPOrderDetails(C_BPartner_ID, forInvoice); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromStatementUI.java b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromStatementUI.java index aa6eac8506..1c0ed1cb78 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromStatementUI.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromStatementUI.java @@ -152,7 +152,7 @@ public class VCreateFromStatementUI extends CreateFromStatement implements Actio bankAccountField = new VLookup ("C_BankAccount_ID", true, true, true, lookup); // Set Default int C_BankAccount_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "C_BankAccount_ID"); - bankAccountField.setValue(new Integer(C_BankAccount_ID)); + bankAccountField.setValue(Integer.valueOf(C_BankAccount_ID)); bankAccountField.addActionListener(this); // initial Loading authorizationField = new VString ("authorization", false, false, true, 10, 30, null, null); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCash.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCash.java index 5ccc4e6d68..8c7c75db74 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCash.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCash.java @@ -130,7 +130,7 @@ public class VPaymentFormCash extends PaymentFormCash implements ActionListener bDateField.setValue(m_DateAcct); // Is the currency an EMU currency? - Integer C_Currency_ID = new Integer(m_C_Currency_ID); + Integer C_Currency_ID = Integer.valueOf(m_C_Currency_ID); if (s_Currencies.containsKey(C_Currency_ID)) { Enumeration en = s_Currencies.keys(); while (en.hasMoreElements()) { diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCheck.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCheck.java index 7bb15f412b..ed7400b1ea 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCheck.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCheck.java @@ -132,7 +132,7 @@ public class VPaymentFormCheck extends PaymentFormCheck implements ActionListene } // Is the currency an EMU currency? - Integer C_Currency_ID = new Integer(m_C_Currency_ID); + Integer C_Currency_ID = Integer.valueOf(m_C_Currency_ID); if (s_Currencies.containsKey(C_Currency_ID)) { Enumeration en = s_Currencies.keys(); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/Calendar.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/Calendar.java index 5e6ca43ebe..6b07cfcf67 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/Calendar.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/Calendar.java @@ -300,7 +300,7 @@ public class Calendar extends CDialog // Years m_currentYear = m_calendar.get(java.util.Calendar.YEAR); cYear.setEditor(new JSpinner.NumberEditor(cYear, "0000")); - cYear.setValue(new Integer(m_currentYear)); + cYear.setValue(Integer.valueOf(m_currentYear)); // Months -> 0=Jan 12=_ String[] months = formatDate.getDateFormatSymbols().getMonths(); @@ -443,7 +443,7 @@ public class Calendar extends CDialog // --- Set Month & Year m_setting = true; cMonth.setSelectedIndex(m_currentMonth-1); - cYear.setValue(new Integer(m_currentYear)); + cYear.setValue(Integer.valueOf(m_currentYear)); m_setting = false; // --- Set Day @@ -503,7 +503,7 @@ public class Calendar extends CDialog fHour.setSelectedIndex(index); // Set Minute int m = m_currentMinute; - fMinute.setValue(new Integer(m)); + fMinute.setValue(Integer.valueOf(m)); // Set PM cbPM.setSelected(pm); // Set TZ @@ -880,7 +880,7 @@ class MinuteModel extends SpinnerNumberModel minutes -= 60; // int steps = minutes / m_snapSize; - return new Integer(steps * m_snapSize); + return Integer.valueOf(steps * m_snapSize); } // getNextValue @@ -900,7 +900,7 @@ class MinuteModel extends SpinnerNumberModel steps++; if (steps * m_snapSize > 59) steps = 0; - return new Integer(steps * m_snapSize); + return Integer.valueOf(steps * m_snapSize); } // getNextValue } // MinuteModel diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAccount.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAccount.java index 85ea4c6678..50e120cb7e 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAccount.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAccount.java @@ -420,7 +420,7 @@ public final class VAccount extends JComponent // We have a Value if (C_ValidCombination_ID > 0) { - Integer newValue = new Integer(C_ValidCombination_ID); + Integer newValue = Integer.valueOf(C_ValidCombination_ID); // set & redisplay setValue(newValue); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAccountDialog.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAccountDialog.java index 3b8c83c908..ab0d344a2c 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAccountDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAccountDialog.java @@ -1126,7 +1126,7 @@ public final class VAccountDialog extends CDialog if (log.isLoggable(Level.CONFIG)) log.config("C_ValidCombination_ID=" + m_C_ValidCombination_ID + ", Changed=" + m_changed); if (!m_changed || m_C_ValidCombination_ID == 0) return null; - return new Integer(m_C_ValidCombination_ID); + return Integer.valueOf(m_C_ValidCombination_ID); } /** diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAssignment.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAssignment.java index 4c925c1140..f5479221c1 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAssignment.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAssignment.java @@ -435,7 +435,7 @@ public class VAssignment extends JComponent // Set Value if (ma != null && ma.getS_ResourceAssignment_ID() != 0) { - setValue(new Integer(ma.getS_ResourceAssignment_ID())); + setValue(Integer.valueOf(ma.getS_ResourceAssignment_ID())); try { fireVetoableChange(this.getName(), new Object(), getValue()); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VBPartner.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VBPartner.java index bf42718e98..669d72b9c7 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VBPartner.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VBPartner.java @@ -316,7 +316,7 @@ public final class VBPartner extends CDialog implements ActionListener if (m_pLocation != null) { int location = m_pLocation.getC_Location_ID(); - fAddress.setValue (new Integer(location)); + fAddress.setValue (Integer.valueOf(location)); // fPhone.setText(m_pLocation.getPhone()); fPhone2.setText(m_pLocation.getPhone2()); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VComboBox.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VComboBox.java index 75996b4d3d..94c1bc6fb5 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VComboBox.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VComboBox.java @@ -145,7 +145,7 @@ public class VComboBox extends CComboBox { if (p.getID() == null) // -1 return null return null; - return new Integer(((KeyNamePair)p).getID()); + return Integer.valueOf(((KeyNamePair)p).getID()); } return p.getID(); } // getValue diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VImage.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VImage.java index 8d13ec2e29..1e6bc1b11a 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VImage.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VImage.java @@ -136,7 +136,7 @@ public class VImage extends JButton { if (m_mImage == null || m_mImage.get_ID() == 0) return null; - return new Integer(m_mImage.get_ID()); + return Integer.valueOf(m_mImage.get_ID()); } // getValue /** diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocation.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocation.java index 6ae6998909..7d085750b9 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocation.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocation.java @@ -333,7 +333,7 @@ public class VLocation extends JComponent { if (m_value == null) return null; - return new Integer(m_value.getC_Location_ID()); + return Integer.valueOf(m_value.getC_Location_ID()); } // getValue /** @@ -389,7 +389,7 @@ public class VLocation extends JComponent int C_Location_ID = 0; if (m_value != null) C_Location_ID = m_value.getC_Location_ID(); - Integer ii = new Integer(C_Location_ID); + Integer ii = Integer.valueOf(C_Location_ID); if (C_Location_ID != 0) fireVetoableChange(m_columnName, oldValue, ii); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocator.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocator.java index 055eac9123..06e3870a31 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocator.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocator.java @@ -516,7 +516,7 @@ public class VLocator extends JComponent if (M_Locator_ID == 0) return false; - setValue (new Integer(M_Locator_ID), true); + setValue (Integer.valueOf(M_Locator_ID), true); return true; } // actionText diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLookup.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLookup.java index 1d1bb470cf..480a9b2363 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLookup.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLookup.java @@ -1145,7 +1145,7 @@ public class VLookup extends JComponent if (log.isLoggable(Level.FINE)) log.fine(m_columnName + " - Unique ID=" + id); m_value = null; // forces re-display if value is unchanged but text updated and still unique resetTabInfo(); - actionCombo (new Integer(id)); // data binding + actionCombo (Integer.valueOf(id)); // data binding // // Don't request focus if value was solved - teo_sarca [ 2552901 ] if (id <= 0) @@ -1369,9 +1369,9 @@ public class VLookup extends JComponent && result == BPartner_ID) // the same return; // Maybe new BPartner - put in cache - m_lookup.getDirect(new Integer(result), false, true); + m_lookup.getDirect(Integer.valueOf(result), false, true); - actionCombo (new Integer(result)); // data binding + actionCombo (Integer.valueOf(result)); // data binding } // actionBPartner private void actionLocation () diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VNumber.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VNumber.java index 8a96a17e8a..1acb21ec4c 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VNumber.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VNumber.java @@ -443,7 +443,7 @@ public final class VNumber extends JComponent if (!m_modified) return null; if (m_displayType == DisplayType.Integer) - return new Integer(0); + return Integer.valueOf(0); return Env.ZERO; } if (value.equals(".") || value.equals(",") || value.equals("-")) @@ -459,7 +459,7 @@ public final class VNumber extends JComponent value = number.toString(); // converts it to US w/o thousands BigDecimal bd = new BigDecimal(value); if (m_displayType == DisplayType.Integer) - return new Integer(bd.intValue()); + return Integer.valueOf(bd.intValue()); if (bd.signum() == 0) return bd; return bd.setScale(m_format.getMaximumFractionDigits(), BigDecimal.ROUND_HALF_UP); @@ -470,7 +470,7 @@ public final class VNumber extends JComponent } m_text.setText(m_format.format(0)); if (m_displayType == DisplayType.Integer) - return new Integer(0); + return Integer.valueOf(0); return Env.ZERO; } // getValue @@ -503,7 +503,7 @@ public final class VNumber extends JComponent if (value == null) { if (m_displayType == DisplayType.Integer) - value = new Integer(0); + value = Integer.valueOf(0); else value = Env.ZERO; } @@ -511,7 +511,7 @@ public final class VNumber extends JComponent if (value instanceof BigDecimal) value = ((BigDecimal)value).add(Env.ONE); else - value = new Integer(((Integer)value).intValue() + 1); + value = Integer.valueOf(((Integer)value).intValue() + 1); // setValue(value); return value; @@ -529,7 +529,7 @@ public final class VNumber extends JComponent if (value == null) { if (m_displayType == DisplayType.Integer) - value = new Integer(minimum); + value = Integer.valueOf(minimum); else value = new BigDecimal(minimum); setValue(value); @@ -552,7 +552,7 @@ public final class VNumber extends JComponent i--; if (i < minimum) i = minimum; - value = new Integer(i); + value = Integer.valueOf(i); } // setValue(value); @@ -672,12 +672,12 @@ public final class VNumber extends JComponent if (ii < m_minValue) { error = oo + " < " + m_minValue; - oo = new Integer(m_minValue.intValue()); + oo = Integer.valueOf(m_minValue.intValue()); } else if (ii > m_maxValue) { error = oo + " > " + m_maxValue; - oo = new Integer(m_maxValue.intValue()); + oo = Integer.valueOf(m_maxValue.intValue()); } } else if (oo instanceof BigDecimal) diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPAttribute.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPAttribute.java index 51cf3c35bb..60bd77cb7c 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPAttribute.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPAttribute.java @@ -204,7 +204,7 @@ public class VPAttribute extends JComponent private int m_AD_Column_ID = 0; private GridField m_mField; /** No Instance Key */ - private static Integer NO_INSTANCE = new Integer(0); + private static Integer NO_INSTANCE = Integer.valueOf(0); /** Logger */ private static CLogger log = CLogger.getCLogger(VPAttribute.class); @@ -452,7 +452,7 @@ public class VPAttribute extends JComponent if (M_AttributeSetInstance_ID == 0) setValue(null); else - setValue(new Integer(M_AttributeSetInstance_ID)); + setValue(Integer.valueOf(M_AttributeSetInstance_ID)); // Change Locator if (m_GridTab != null && M_Locator_ID > 0) { 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 14f589a5bc..1025d02cc9 100644 --- a/org.adempiere.ui.swing/src/org/compiere/minigrid/MiniTable.java +++ b/org.adempiere.ui.swing/src/org/compiere/minigrid/MiniTable.java @@ -211,7 +211,7 @@ public class MiniTable extends CTable implements IMiniTable return false; // is the column RW? - if (m_readWriteColumn.contains(new Integer(column))) + if (m_readWriteColumn.contains(Integer.valueOf(column))) return true; return false; } // isCellEditable @@ -224,7 +224,7 @@ public class MiniTable extends CTable implements IMiniTable public void setColumnReadOnly (int column, boolean readOnly) { // Column is ReadWrite - if (m_readWriteColumn.contains(new Integer(column))) + if (m_readWriteColumn.contains(Integer.valueOf(column))) { // Remove from list if (readOnly) @@ -242,7 +242,7 @@ public class MiniTable extends CTable implements IMiniTable } // current column is R/O - ReadWrite - add to list else if (!readOnly) - m_readWriteColumn.add(new Integer(column)); + m_readWriteColumn.add(Integer.valueOf(column)); } // setColumnReadOnly @@ -367,7 +367,7 @@ public class MiniTable extends CTable implements IMiniTable { tc.setCellEditor(new ROCellEditor()); } - m_minWidth.add(new Integer(10)); + m_minWidth.add(Integer.valueOf(10)); tc.setMaxWidth(20); tc.setPreferredWidth(20); tc.setResizable(false); @@ -387,7 +387,7 @@ public class MiniTable extends CTable implements IMiniTable check.setHorizontalAlignment(SwingConstants.CENTER); tc.setCellEditor(new DefaultCellEditor(check)); } - m_minWidth.add(new Integer(30)); + m_minWidth.add(Integer.valueOf(30)); tc.setHeaderRenderer(new VHeaderRenderer(DisplayType.YesNo)); } @@ -399,7 +399,7 @@ public class MiniTable extends CTable implements IMiniTable tc.setCellEditor(new ROCellEditor()); else tc.setCellEditor(new MiniCellEditor(c)); - m_minWidth.add(new Integer(30)); + m_minWidth.add(Integer.valueOf(30)); tc.setHeaderRenderer(new VHeaderRenderer(DisplayType.DateTime)); } @@ -410,12 +410,12 @@ public class MiniTable extends CTable implements IMiniTable if (readOnly) { tc.setCellEditor(new ROCellEditor()); - m_minWidth.add(new Integer(70)); + m_minWidth.add(Integer.valueOf(70)); } else { tc.setCellEditor(new MiniCellEditor(c)); - m_minWidth.add(new Integer(80)); + m_minWidth.add(Integer.valueOf(80)); } tc.setHeaderRenderer(new VHeaderRenderer(DisplayType.Number)); @@ -427,12 +427,12 @@ public class MiniTable extends CTable implements IMiniTable if (readOnly) { tc.setCellEditor(new ROCellEditor()); - m_minWidth.add(new Integer(70)); + m_minWidth.add(Integer.valueOf(70)); } else { tc.setCellEditor(new MiniCellEditor(c)); - m_minWidth.add(new Integer(80)); + m_minWidth.add(Integer.valueOf(80)); } tc.setHeaderRenderer(new VHeaderRenderer(DisplayType.Number)); @@ -445,7 +445,7 @@ public class MiniTable extends CTable implements IMiniTable tc.setCellEditor(new ROCellEditor()); else tc.setCellEditor(new MiniCellEditor(c)); - m_minWidth.add(new Integer(30)); + m_minWidth.add(Integer.valueOf(30)); tc.setHeaderRenderer(new VHeaderRenderer(DisplayType.Number)); } @@ -457,7 +457,7 @@ public class MiniTable extends CTable implements IMiniTable tc.setCellEditor(new ROCellEditor()); else tc.setCellEditor(new MiniCellEditor(String.class)); - m_minWidth.add(new Integer(30)); + m_minWidth.add(Integer.valueOf(30)); tc.setHeaderRenderer(new VHeaderRenderer(DisplayType.String)); } diff --git a/org.adempiere.ui.swing/src/org/compiere/print/Viewer.java b/org.adempiere.ui.swing/src/org/compiere/print/Viewer.java index 3e7362b07b..73cb561a20 100644 --- a/org.adempiere.ui.swing/src/org/compiere/print/Viewer.java +++ b/org.adempiere.ui.swing/src/org/compiere/print/Viewer.java @@ -339,7 +339,7 @@ public class Viewer extends CFrame summary.addActionListener(this); // Max Page m_pageMax = m_viewPanel.getPageCount(); - spinnerModel.setMaximum(new Integer(m_pageMax)); + spinnerModel.setMaximum(Integer.valueOf(m_pageMax)); spinner.addChangeListener(this); fillComboReport(m_reportEngine.getPrintFormat().get_ID()); @@ -490,7 +490,7 @@ public class Viewer extends CFrame public void revalidate() { m_pageMax = m_viewPanel.getPageCount(); - spinnerModel.setMaximum(new Integer(m_pageMax)); + spinnerModel.setMaximum(Integer.valueOf(m_pageMax)); // scroll area (page size dependent) centerScrollPane.setPreferredSize(new Dimension @@ -791,7 +791,7 @@ public class Viewer extends CFrame // System.out.println("scrollTo " + pageRectangle); // Set Page - spinnerModel.setValue(new Integer(m_pageNo)); + spinnerModel.setValue(Integer.valueOf(m_pageNo)); StringBuffer sb = new StringBuffer (Msg.getMsg(m_ctx, "Page")) .append(" ").append(m_pageNo) .append(m_viewPanel.getPageInfo(m_pageNo)) @@ -1359,7 +1359,7 @@ public class Viewer extends CFrame Login.initTest(true); MQuery q = new MQuery("C_Invoice"); - q.addRestriction("C_Invoice_ID", MQuery.EQUAL, new Integer(103)); + q.addRestriction("C_Invoice_ID", MQuery.EQUAL, Integer.valueOf(103)); // 102 = Invoice - 100 = Order PrintInfo i = new PrintInfo("test", X_C_Invoice.Table_ID, 102, 0); diff --git a/org.adempiere.ui.swing/src/org/compiere/swing/CPanel.java b/org.adempiere.ui.swing/src/org/compiere/swing/CPanel.java index abb81ef0b2..e72be47ad2 100644 --- a/org.adempiere.ui.swing/src/org/compiere/swing/CPanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/swing/CPanel.java @@ -165,7 +165,7 @@ public class CPanel extends JPanel if (level == 0) putClientProperty(AdempiereLookAndFeel.TABLEVEL, null); else - putClientProperty(AdempiereLookAndFeel.TABLEVEL, new Integer(level)); + putClientProperty(AdempiereLookAndFeel.TABLEVEL, Integer.valueOf(level)); } // setTabLevel /** diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/ShowMaskWrapper.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/ShowMaskWrapper.java index 870ee87d7a..da3e325a5f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/ShowMaskWrapper.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/ShowMaskWrapper.java @@ -103,7 +103,7 @@ public class ShowMaskWrapper implements ISupportMask { * @param comp */ public static void setFlagShowMask (Component comp){ - comp.setAttribute(ISupportMask.READY_SHOW_MASK_FLAG, new Integer(1), Component.REQUEST_SCOPE); + comp.setAttribute(ISupportMask.READY_SHOW_MASK_FLAG, Integer.valueOf(1), Component.REQUEST_SCOPE); } /** diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WRequest.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WRequest.java index ccb5a1a0c0..69258c35c4 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WRequest.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WRequest.java @@ -230,47 +230,47 @@ public class WRequest implements EventListener { GridTab tab = frame.getADWindowContent().getActiveGridTab(); tab.dataNew (false); - tab.setValue("AD_Table_ID", new Integer(m_AD_Table_ID)); - tab.setValue("Record_ID", new Integer(m_Record_ID)); + tab.setValue("AD_Table_ID", Integer.valueOf(m_AD_Table_ID)); + tab.setValue("Record_ID", Integer.valueOf(m_Record_ID)); // if (m_C_BPartner_ID != 0) - tab.setValue("C_BPartner_ID", new Integer(m_C_BPartner_ID)); + tab.setValue("C_BPartner_ID", Integer.valueOf(m_C_BPartner_ID)); // if (m_AD_Table_ID == MBPartner.Table_ID) - tab.setValue("C_BPartner_ID", new Integer(m_Record_ID)); + tab.setValue("C_BPartner_ID", Integer.valueOf(m_Record_ID)); else if (m_AD_Table_ID == MUser.Table_ID) - tab.setValue("AD_User_ID", new Integer(m_Record_ID)); + tab.setValue("AD_User_ID", Integer.valueOf(m_Record_ID)); // else if (m_AD_Table_ID == MProject.Table_ID) - tab.setValue("C_Project_ID", new Integer(m_Record_ID)); + tab.setValue("C_Project_ID", Integer.valueOf(m_Record_ID)); else if (m_AD_Table_ID == MAsset.Table_ID) - tab.setValue("A_Asset_ID", new Integer(m_Record_ID)); + tab.setValue("A_Asset_ID", Integer.valueOf(m_Record_ID)); // else if (m_AD_Table_ID == MOrder.Table_ID) - tab.setValue("C_Order_ID", new Integer(m_Record_ID)); + tab.setValue("C_Order_ID", Integer.valueOf(m_Record_ID)); else if (m_AD_Table_ID == MInvoice.Table_ID) - tab.setValue("C_Invoice_ID", new Integer(m_Record_ID)); + tab.setValue("C_Invoice_ID", Integer.valueOf(m_Record_ID)); // else if (m_AD_Table_ID == MProduct.Table_ID) - tab.setValue("M_Product_ID", new Integer(m_Record_ID)); + tab.setValue("M_Product_ID", Integer.valueOf(m_Record_ID)); else if (m_AD_Table_ID == MPayment.Table_ID) - tab.setValue("C_Payment_ID", new Integer(m_Record_ID)); + tab.setValue("C_Payment_ID", Integer.valueOf(m_Record_ID)); // else if (m_AD_Table_ID == MInOut.Table_ID) - tab.setValue("M_InOut_ID", new Integer(m_Record_ID)); + tab.setValue("M_InOut_ID", Integer.valueOf(m_Record_ID)); else if (m_AD_Table_ID == MRMA.Table_ID) - tab.setValue("M_RMA_ID", new Integer(m_Record_ID)); + tab.setValue("M_RMA_ID", Integer.valueOf(m_Record_ID)); // else if (m_AD_Table_ID == MCampaign.Table_ID) - tab.setValue("C_Campaign_ID", new Integer(m_Record_ID)); + tab.setValue("C_Campaign_ID", Integer.valueOf(m_Record_ID)); // else if (m_AD_Table_ID == MRequest.Table_ID) - tab.setValue(MRequest.COLUMNNAME_R_RequestRelated_ID, new Integer(m_Record_ID)); + tab.setValue(MRequest.COLUMNNAME_R_RequestRelated_ID, Integer.valueOf(m_Record_ID)); // FR [2842165] - Order Ref link from SO line creating new request else if (m_AD_Table_ID == MOrderLine.Table_ID) { MOrderLine oLine = new MOrderLine(Env.getCtx(), m_Record_ID, null); if (oLine != null) { - tab.setValue(MOrderLine.COLUMNNAME_C_Order_ID, new Integer(oLine.getC_Order_ID())); + tab.setValue(MOrderLine.COLUMNNAME_C_Order_ID, Integer.valueOf(oLine.getC_Order_ID())); } } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewerData.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewerData.java index 6ba01d5a99..6a4385a0dd 100755 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewerData.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewerData.java @@ -241,7 +241,7 @@ public class WAcctViewerData ValueNamePair pp = new ValueNamePair(tableName, name); cb.appendItem(pp.getName(),pp); - tableInfo.put (tableName, new Integer(id)); + tableInfo.put (tableName, Integer.valueOf(id)); if (id == AD_Table_ID) select = pp; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java index 6c76294bd3..4f8a4e9993 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java @@ -2609,7 +2609,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements { if (link.endsWith("_ID")) query.addRestriction(link, MQuery.EQUAL, - new Integer(Env.getContextAsInt(ctx, curWindowNo, link))); + Integer.valueOf(Env.getContextAsInt(ctx, curWindowNo, link))); else query.addRestriction(link, MQuery.EQUAL, Env.getContext(ctx, curWindowNo, link)); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java index ae6aa3f3c9..7adcedeca7 100755 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java @@ -436,7 +436,7 @@ public class WAllocation extends Allocation int AD_Column_ID = COLUMN_C_INVOICE_C_CURRENCY_ID; // C_Invoice.C_Currency_ID MLookup lookupCur = MLookupFactory.get (Env.getCtx(), form.getWindowNo(), 0, AD_Column_ID, DisplayType.TableDir); currencyPick = new WTableDirEditor("C_Currency_ID", true, false, true, lookupCur); - currencyPick.setValue(new Integer(m_C_Currency_ID)); + currencyPick.setValue(Integer.valueOf(m_C_Currency_ID)); currencyPick.addValueChangeListener(this); // Organization filter selection @@ -471,14 +471,14 @@ public class WAllocation extends Allocation AD_Column_ID = 61804; // C_AllocationLine.C_Charge_ID MLookup lookupCharge = MLookupFactory.get (Env.getCtx(), form.getWindowNo(), 0, AD_Column_ID, DisplayType.TableDir); chargePick = new WTableDirEditor("C_Charge_ID", false, false, true, lookupCharge); - chargePick.setValue(new Integer(m_C_Charge_ID)); + chargePick.setValue(Integer.valueOf(m_C_Charge_ID)); chargePick.addValueChangeListener(this); // Charge AD_Column_ID = 212213; // C_AllocationLine.C_Charge_ID MLookup lookupDocType = MLookupFactory.get (Env.getCtx(), form.getWindowNo(), 0, AD_Column_ID, DisplayType.TableDir); DocTypePick = new WTableDirEditor("C_DocType_ID", false, false, true, lookupDocType); - DocTypePick.setValue(new Integer(m_C_DocType_ID)); + DocTypePick.setValue(Integer.valueOf(m_C_DocType_ID)); DocTypePick.addValueChangeListener(this); } // dynInit diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WBOMDrop.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WBOMDrop.java index a8c64247b5..c878505a5c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WBOMDrop.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WBOMDrop.java @@ -573,7 +573,7 @@ public class WBOMDrop extends ADForm implements EventListener productPanel.appendChild(rightInden); // Add to List - m_productList.add (new Integer(M_Product_ID)); + m_productList.add (Integer.valueOf(M_Product_ID)); // add product name selectPanel = createDivPanel(200); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromDepositBatchUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromDepositBatchUI.java index 530b0b2e1a..f89f0d667f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromDepositBatchUI.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromDepositBatchUI.java @@ -154,7 +154,7 @@ public class WCreateFromDepositBatchUI extends CreateFromDepositBatch implements bankAccountField = new WTableDirEditor ("C_BankAccount_ID", true, false, true, lookup); // Set Default int C_BankAccount_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "C_BankAccount_ID"); - bankAccountField.setValue(new Integer(C_BankAccount_ID)); + bankAccountField.setValue(Integer.valueOf(C_BankAccount_ID)); // initial Loading authorizationField = new WStringEditor ("authorization", false, false, true, 10, 30, null, null); // authorizationField.getComponent().addEventListener(Events.ON_CHANGE, this); @@ -162,7 +162,7 @@ public class WCreateFromDepositBatchUI extends CreateFromDepositBatch implements lookup = MLookupFactory.get (Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MPayment.Table_Name, MPayment.COLUMNNAME_C_DocType_ID), DisplayType.TableDir); documentTypeField = new WTableDirEditor (MPayment.COLUMNNAME_C_DocType_ID,false,false,true,lookup); int C_DocType_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "C_DocType_ID"); - documentTypeField.setValue(new Integer(C_DocType_ID)); + documentTypeField.setValue(Integer.valueOf(C_DocType_ID)); // documentTypeField.getComponent().addEventListener(Events.ON_CHANGE, this); lookup = MLookupFactory.get (Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MPayment.Table_Name, MPayment.COLUMNNAME_TenderType), DisplayType.List); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromInvoiceUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromInvoiceUI.java index e0f7f91ada..962cb9d92e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromInvoiceUI.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromInvoiceUI.java @@ -295,7 +295,7 @@ public class WCreateFromInvoiceUI extends CreateFromInvoice implements EventList bPartnerField = new WSearchEditor ("C_BPartner_ID", true, false, true, lookup); // int C_BPartner_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "C_BPartner_ID"); - bPartnerField.setValue(new Integer(C_BPartner_ID)); + bPartnerField.setValue(Integer.valueOf(C_BPartner_ID)); // initial loading initBPOrderDetails(C_BPartner_ID, forInvoice); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromRMAUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromRMAUI.java index c8ddb471fe..47ac42af45 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromRMAUI.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromRMAUI.java @@ -153,7 +153,7 @@ public class WCreateFromRMAUI extends CreateFromRMA implements ValueChangeListen bPartnerField = new WSearchEditor ("C_BPartner_ID", true, false, true, lookup); // int C_BPartner_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "C_BPartner_ID"); - bPartnerField.setValue(new Integer(C_BPartner_ID)); + bPartnerField.setValue(Integer.valueOf(C_BPartner_ID)); } // initBPartner protected void loadRMA() diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java index 8e9f4fc7c4..3e7b265b51 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java @@ -412,7 +412,7 @@ public class WCreateFromShipmentUI extends CreateFromShipment implements EventLi bPartnerField = new WSearchEditor ("C_BPartner_ID", true, false, true, lookup); // int C_BPartner_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "C_BPartner_ID"); - bPartnerField.setValue(new Integer(C_BPartner_ID)); + bPartnerField.setValue(Integer.valueOf(C_BPartner_ID)); // initial loading initBPOrderDetails(C_BPartner_ID, forInvoice); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromStatementUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromStatementUI.java index 637127696e..e9253c63d1 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromStatementUI.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromStatementUI.java @@ -155,7 +155,7 @@ public class WCreateFromStatementUI extends CreateFromStatement implements Event bankAccountField = new WTableDirEditor ("C_BankAccount_ID", true, false, true, lookup); // Set Default int C_BankAccount_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "C_BankAccount_ID"); - bankAccountField.setValue(new Integer(C_BankAccount_ID)); + bankAccountField.setValue(Integer.valueOf(C_BankAccount_ID)); // initial Loading authorizationField = new WStringEditor ("authorization", false, false, true, 10, 30, null, null); authorizationField.getComponent().addEventListener(Events.ON_CHANGE, this); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayPrint.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayPrint.java index c67c55cb63..84f7018ac9 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayPrint.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayPrint.java @@ -267,7 +267,7 @@ public class WPayPrint extends PayPrint implements IFormController, EventListene return; // m_C_PaySelection_ID = C_PaySelection_ID; - paySelectSearch.setValue(new Integer(m_C_PaySelection_ID)); + paySelectSearch.setValue(Integer.valueOf(m_C_PaySelection_ID)); loadPaySelectInfo(); } // setsetPaySelection diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java index 828cd6ad32..8782052149 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java @@ -134,7 +134,7 @@ public class WPaymentFormCash extends PaymentFormCash implements EventListener en = s_Currencies.keys(); while (en.hasMoreElements()) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCheck.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCheck.java index 5d89ace766..1b4638158e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCheck.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCheck.java @@ -160,7 +160,7 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener } // Is the currency an EMU currency? - Integer C_Currency_ID = new Integer(m_C_Currency_ID); + Integer C_Currency_ID = Integer.valueOf(m_C_Currency_ID); if (s_Currencies.containsKey(C_Currency_ID)) { Enumeration en = s_Currencies.keys(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WStatementCreateFromBatch.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WStatementCreateFromBatch.java index 31e3d67ba1..d7ff610192 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WStatementCreateFromBatch.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WStatementCreateFromBatch.java @@ -155,7 +155,7 @@ public class WStatementCreateFromBatch extends StatementCreateFromBatch implemen bankAccountField = new WTableDirEditor ("C_BankAccount_ID", true, false, true, lookup); // Set Default int C_BankAccount_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "C_BankAccount_ID"); - bankAccountField.setValue(new Integer(C_BankAccount_ID)); + bankAccountField.setValue(Integer.valueOf(C_BankAccount_ID)); // initial Loading authorizationField = new WStringEditor ("authorization", false, false, true, 10, 30, null, null); authorizationField.getComponent().addEventListener(Events.ON_CHANGE, this); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeBOM.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeBOM.java index 5f7ea1e8db..98f6b3ff1a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeBOM.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeBOM.java @@ -321,7 +321,7 @@ public class WTreeBOM extends TreeBOM implements IFormController, EventListener< Vector line = new Vector(10); line.add( Boolean.valueOf(product.isActive())); // 0 IsActive - line.add( new Integer(0).toString()); // 1 Line + line.add( Integer.valueOf(0).toString()); // 1 Line KeyNamePair pp = new KeyNamePair(product.getM_Product_ID(),product.getValue().concat("_").concat(product.getName())); line.add(pp); // 2 M_Product_ID MUOM u = new MUOM(product.getCtx(), product.getC_UOM_ID(), product.get_TrxName()); @@ -443,7 +443,7 @@ public class WTreeBOM extends TreeBOM implements IFormController, EventListener< Vector line = new Vector(10); line.add( Boolean.valueOf(bomline.isActive())); // 0 IsActive - line.add( new Integer(bomline.getLine()).toString()); // 1 Line + line.add( Integer.valueOf(bomline.getLine()).toString()); // 1 Line KeyNamePair pp = new KeyNamePair(M_Product.getM_Product_ID(),M_Product.getValue().concat("_").concat(M_Product.getName())); line.add(pp); // 2 M_Product_ID MUOM u = new MUOM(M_Product.getCtx(), M_Product.getC_UOM_ID(), M_Product.get_TrxName()); @@ -472,7 +472,7 @@ public class WTreeBOM extends TreeBOM implements IFormController, EventListener< Vector line = new Vector(10); line.add( Boolean.valueOf(M_Product.isActive())); // 0 IsActive - line.add( new Integer(bom.getLine()).toString()); // 1 Line + line.add( Integer.valueOf(bom.getLine()).toString()); // 1 Line KeyNamePair pp = new KeyNamePair(M_Product.getM_Product_ID(),M_Product.getValue().concat("_").concat(M_Product.getName())); line.add(pp); // 2 M_Product_ID MUOM u = new MUOM(M_Product.getCtx(), M_Product.getC_UOM_ID(), M_Product.get_TrxName()); 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 3a42e3ba0a..59ffdce261 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 @@ -219,7 +219,7 @@ public class WListbox extends Listbox implements IMiniTable, TableValueChangeLis } // is the column read/write? - if (m_readWriteColumn.contains(new Integer(column))) + if (m_readWriteColumn.contains(Integer.valueOf(column))) { return true; } @@ -302,7 +302,7 @@ public class WListbox extends Listbox implements IMiniTable, TableValueChangeLis */ public void setColumnReadOnly (int index, boolean readOnly) { - Integer indexObject = new Integer(index); + Integer indexObject = Integer.valueOf(index); // Column is ReadWrite if (m_readWriteColumn.contains(indexObject)) @@ -627,7 +627,7 @@ public class WListbox extends Listbox implements IMiniTable, TableValueChangeLis } else if (columnClass == Integer.class) { - data = new Integer(rs.getInt(rsColIndex)); + data = Integer.valueOf(rs.getInt(rsColIndex)); } else if (columnClass == KeyNamePair.class) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WAccountEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WAccountEditor.java index 2796cd1889..bb8030727c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WAccountEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WAccountEditor.java @@ -201,7 +201,7 @@ public class WAccountEditor extends WEditor implements ContextMenuListener // We have a Value if (C_ValidCombination_ID > 0) { - Integer newValue = new Integer(C_ValidCombination_ID); + Integer newValue = Integer.valueOf(C_ValidCombination_ID); Object oldValue = m_value; m_value = newValue; ValueChangeEvent changeEvent = new ValueChangeEvent(this, this.getColumnName(), oldValue, newValue); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WAssignmentEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WAssignmentEditor.java index 05d1485a7d..515d99824a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WAssignmentEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WAssignmentEditor.java @@ -221,7 +221,7 @@ public class WAssignmentEditor extends WEditor implements ContextMenuListener { // Set Value if (ma != null && ma.getS_ResourceAssignment_ID() != 0) { - setValue(new Integer(ma.getS_ResourceAssignment_ID())); + setValue(Integer.valueOf(ma.getS_ResourceAssignment_ID())); ValueChangeEvent vce = new ValueChangeEvent(WAssignmentEditor.this, gridField.getColumnName(), oldValue, getValue()); fireValueChange(vce); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WImageEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WImageEditor.java index cf0d2108e1..044bc78d6b 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WImageEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WImageEditor.java @@ -80,7 +80,7 @@ public class WImageEditor extends WEditor { if (m_mImage == null || m_mImage.get_ID() == 0) return null; - return new Integer(m_mImage.get_ID()); + return Integer.valueOf(m_mImage.get_ID()); } @Override diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocationEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocationEditor.java index 358e2247b8..36d513c307 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocationEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocationEditor.java @@ -111,7 +111,7 @@ public class WLocationEditor extends WEditor implements EventListener, Pr { if (m_value == null) return null; - return new Integer(m_value.getC_Location_ID()); + return Integer.valueOf(m_value.getC_Location_ID()); } @Override @@ -194,7 +194,7 @@ public class WLocationEditor extends WEditor implements EventListener, Pr int C_Location_ID = 0; if (m_value != null) C_Location_ID = m_value.getC_Location_ID(); - Integer ii = new Integer(C_Location_ID); + Integer ii = Integer.valueOf(C_Location_ID); if (C_Location_ID != 0 && oldValue == 0) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocatorEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocatorEditor.java index 35f4531da9..0eefaebfee 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocatorEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocatorEditor.java @@ -427,7 +427,7 @@ public class WLocatorEditor extends WEditor implements EventListener, Pro if (M_Locator_ID == 0) return false; - setValue (new Integer(M_Locator_ID), true); + setValue (Integer.valueOf(M_Locator_ID), true); return true; } // actionText diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WNumberEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WNumberEditor.java index d42c7901b7..8454723018 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WNumberEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WNumberEditor.java @@ -176,10 +176,10 @@ public class WNumberEditor extends WEditor implements ContextMenuListener if (displayType == DisplayType.Integer) { if (newValue != null && newValue instanceof BigDecimal) { - newValue = new Integer(((BigDecimal)newValue).intValue()); + newValue = Integer.valueOf(((BigDecimal)newValue).intValue()); } if (oldValue != null && oldValue instanceof BigDecimal) { - oldValue = new Integer(((BigDecimal)oldValue).intValue()); + oldValue = Integer.valueOf(((BigDecimal)oldValue).intValue()); } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPAttributeEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPAttributeEditor.java index 0ae327287e..319095c56e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPAttributeEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPAttributeEditor.java @@ -59,7 +59,7 @@ public class WPAttributeEditor extends WEditor implements ContextMenuListener private GridTab m_GridTab; /** No Instance Key */ - private static Integer NO_INSTANCE = new Integer(0); + private static Integer NO_INSTANCE = Integer.valueOf(0); public WPAttributeEditor(GridTab gridTab, GridField gridField) { @@ -275,7 +275,7 @@ public class WPAttributeEditor extends WEditor implements ContextMenuListener if (M_AttributeSetInstance_ID == 0) setValue(null); else - setValue(new Integer(M_AttributeSetInstance_ID)); + setValue(Integer.valueOf(M_AttributeSetInstance_ID)); ValueChangeEvent vce = new ValueChangeEvent(this, gridField.getColumnName(), new Object(), getValue()); fireValueChange(vce); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WSearchEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WSearchEditor.java index 09fc87c0bf..682fa7e213 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WSearchEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WSearchEditor.java @@ -392,7 +392,7 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value if (log.isLoggable(Level.FINE)) log.fine(getColumnName() + " - Unique ID=" + id); - actionCombo(new Integer(id)); // data binding + actionCombo(Integer.valueOf(id)); // data binding Searchbox comp = getComponent(); Component parent = comp.getParent(); @@ -507,9 +507,9 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value return; // Maybe new Record - put in cache - lookup.getDirect(new Integer(result), false, true); - setValue(new Integer(result)); - actionCombo (new Integer(result)); // data binding + lookup.getDirect(Integer.valueOf(result), false, true); + setValue(Integer.valueOf(result)); + actionCombo (Integer.valueOf(result)); // data binding lookup.refresh(); //setValue(getValue()); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WTableDirEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WTableDirEditor.java index 1639834671..ae46c5d9f1 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WTableDirEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WTableDirEditor.java @@ -565,9 +565,9 @@ ContextMenuListener, IZoomableEditor return; // Maybe new Record - put in cache - Object newValue = new Integer(result); + Object newValue = Integer.valueOf(result); lookup.getDirect(newValue, false, true); - setValue(new Integer(result)); + setValue(Integer.valueOf(result)); ValueChangeEvent changeEvent = new ValueChangeEvent(this, getColumnName(), oldValue, newValue); fireValueChange(changeEvent); oldValue = newValue; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WBPartner.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WBPartner.java index b3107baf55..9e571de890 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WBPartner.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WBPartner.java @@ -343,7 +343,7 @@ public class WBPartner extends Window implements EventListener, ValueChan if (m_pLocation != null) { int location = m_pLocation.getC_Location_ID(); - fAddress.setValue (new Integer(location)); + fAddress.setValue (Integer.valueOf(location)); fPhone.setText(m_pLocation.getPhone()); fPhone2.setText(m_pLocation.getPhone2()); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java index 0a26400341..11751005b4 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java @@ -337,7 +337,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL } // save process_id, handle event will use - btProcess.setAttribute(PROCESS_ID_KEY, new Integer(infoProcess.getAD_Process_ID())); + btProcess.setAttribute(PROCESS_ID_KEY, Integer.valueOf(infoProcess.getAD_Process_ID())); btProcess.addEventListener(Events.ON_CLICK, this); // save info process to use in handle event btProcess.setAttribute(ATT_INFO_PROCESS_KEY, process); 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 9d2eed91ce..ea38cd7714 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 @@ -434,7 +434,7 @@ public class RelatedInfoWindow implements EventListener, Sortable else if (c == Double.class) value = Double.valueOf(rs.getDouble(colIndex)); else if (c == Integer.class) - value = new Integer(rs.getInt(colIndex)); + value = Integer.valueOf(rs.getInt(colIndex)); else if (c == KeyNamePair.class) { if (columnsLayout[col].isKeyPairCol()) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInOutPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInOutPanel.java index f67bb7bb20..c2f551c128 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInOutPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInOutPanel.java @@ -272,7 +272,7 @@ public class InfoInOutPanel extends InfoPanel implements ValueChangeListener, Ev String bp = Env.getContext(Env.getCtx(), p_WindowNo, "C_BPartner_ID"); if (bp != null && bp.length() != 0) - fBPartner_ID.setValue(new Integer(bp)); + fBPartner_ID.setValue(Integer.valueOf(bp)); // Prepare table diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInvoicePanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInvoicePanel.java index 3665f1dc03..dbae3c33d5 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInvoicePanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInvoicePanel.java @@ -305,7 +305,7 @@ public class InfoInvoicePanel extends InfoPanel implements ValueChangeListener // Set Defaults String bp = Env.getContext(Env.getCtx(), p_WindowNo, "C_BPartner_ID"); if (bp != null && bp.length() != 0) - editorBPartner.setValue(new Integer(bp)); + editorBPartner.setValue(Integer.valueOf(bp)); // prepare table StringBuilder where = new StringBuilder("i.IsActive='Y'"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoOrderPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoOrderPanel.java index 111bc79c8f..c8f6766095 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoOrderPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoOrderPanel.java @@ -282,7 +282,7 @@ public class InfoOrderPanel extends InfoPanel implements ValueChangeListener // Set Defaults String bp = Env.getContext(Env.getCtx(), p_WindowNo, "C_BPartner_ID"); if (bp != null && bp.length() != 0) - editorBPartner.setValue(new Integer(bp)); + editorBPartner.setValue(Integer.valueOf(bp)); // prepare table StringBuilder where = new StringBuilder("o.IsActive='Y'"); 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 2a91445125..e71a68e8f0 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 @@ -599,7 +599,7 @@ public abstract class InfoPanel extends Window implements EventListener, else if (c == Double.class) value = Double.valueOf(rs.getDouble(colIndex)); else if (c == Integer.class) - value = new Integer(rs.getInt(colIndex)); + value = Integer.valueOf(rs.getInt(colIndex)); else if (c == KeyNamePair.class) { if (p_layout[col].isKeyPairCol()) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPaymentPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPaymentPanel.java index 7347500add..eed2d4e6cd 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPaymentPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPaymentPanel.java @@ -281,7 +281,7 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener, String bp = Env.getContext(Env.getCtx(), p_WindowNo, "C_BPartner_ID"); if (bp != null && bp.length() != 0) - fBPartner_ID.setValue(new Integer(bp)); + fBPartner_ID.setValue(Integer.valueOf(bp)); // Prepare table StringBuilder where = new StringBuilder("p.IsActive='Y'"); 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 281ee6b533..3423be95f5 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 @@ -810,12 +810,12 @@ public class InfoProductPanel extends InfoPanel implements EventListener ResultSet rs = null; try { - pickPriceList.appendItem("",new Integer(0)); + pickPriceList.appendItem("",Integer.valueOf(0)); pstmt = DB.prepareStatement(SQL, null); rs = pstmt.executeQuery(); while (rs.next()) { - pickPriceList.appendItem(rs.getString(2),new Integer(rs.getInt(1))); + pickPriceList.appendItem(rs.getString(2),Integer.valueOf(rs.getInt(1))); } DB.close(rs, pstmt); rs = null; pstmt = null; @@ -827,12 +827,12 @@ public class InfoProductPanel extends InfoPanel implements EventListener + "WHERE IsActive='Y'", "M_Warehouse", MRole.SQL_NOTQUALIFIED, MRole.SQL_RO) + " ORDER BY Value"; - pickWarehouse.appendItem("", new Integer(0)); + pickWarehouse.appendItem("", Integer.valueOf(0)); pstmt = DB.prepareStatement(SQL, null); rs = pstmt.executeQuery(); while (rs.next()) { - pickWarehouse.appendItem(rs.getString("ValueName"), new Integer(rs.getInt("M_Warehouse_ID"))); + pickWarehouse.appendItem(rs.getString("ValueName"), Integer.valueOf(rs.getInt("M_Warehouse_ID"))); } DB.close(rs, pstmt); rs = null; pstmt = null; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/RolePanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/RolePanel.java index b92ef2e7d8..739cf32c04 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/RolePanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/RolePanel.java @@ -402,7 +402,7 @@ public class RolePanel extends Window implements EventListener, Deferrabl { initDefault=m_userpreference.getProperty( UserPreference.P_ROLE ); } - KeyNamePair clientKNPair = new KeyNamePair(new Integer((String)lstItemClient.getValue()), lstItemClient.getLabel()); + KeyNamePair clientKNPair = new KeyNamePair(Integer.valueOf((String)lstItemClient.getValue()), lstItemClient.getLabel()); KeyNamePair roleKNPairs[] = login.getRoles(m_userName, clientKNPair); if (roleKNPairs != null && roleKNPairs.length > 0) { @@ -457,7 +457,7 @@ public class RolePanel extends Window implements EventListener, Deferrabl { initDefault=m_userpreference.getProperty( UserPreference.P_ORG ); } - KeyNamePair RoleKNPair = new KeyNamePair(new Integer((String)lstItemRole.getValue()), lstItemRole.getLabel()); + KeyNamePair RoleKNPair = new KeyNamePair(Integer.valueOf((String)lstItemRole.getValue()), lstItemRole.getLabel()); KeyNamePair orgKNPairs[] = login.getOrgs(RoleKNPair); if(orgKNPairs != null && orgKNPairs.length > 0) { @@ -496,7 +496,7 @@ public class RolePanel extends Window implements EventListener, Deferrabl { initDefault=m_userpreference.getProperty( UserPreference.P_WAREHOUSE ); } - KeyNamePair organisationKNPair = new KeyNamePair(new Integer((String)lstItemOrganisation.getValue()), lstItemOrganisation.getLabel()); + KeyNamePair organisationKNPair = new KeyNamePair(Integer.valueOf((String)lstItemOrganisation.getValue()), lstItemOrganisation.getLabel()); KeyNamePair warehouseKNPairs[] = login.getWarehouses(organisationKNPair); if(warehouseKNPairs != null && warehouseKNPairs.length > 0) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/process/DunningPrint.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/process/DunningPrint.java index 21f1567fb5..a56528f1ba 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/process/DunningPrint.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/process/DunningPrint.java @@ -170,7 +170,7 @@ public class DunningPrint extends SvrProcess // query MQuery query = new MQuery("C_Dunning_Header_v"); query.addRestriction("C_DunningRunEntry_ID", MQuery.EQUAL, - new Integer(entry.getC_DunningRunEntry_ID())); + Integer.valueOf(entry.getC_DunningRunEntry_ID())); // Engine PrintInfo info = new PrintInfo( diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/process/InvoicePrint.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/process/InvoicePrint.java index 60116946a2..1b3fde0133 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/process/InvoicePrint.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/process/InvoicePrint.java @@ -241,7 +241,7 @@ public class InvoicePrint extends SvrProcess format.setTranslationLanguage(language); // query MQuery query = new MQuery("C_Invoice_Header_v"); - query.addRestriction("C_Invoice_ID", MQuery.EQUAL, new Integer(C_Invoice_ID)); + query.addRestriction("C_Invoice_ID", MQuery.EQUAL, Integer.valueOf(C_Invoice_ID)); // Engine PrintInfo info = new PrintInfo( diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/OSTask.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/OSTask.java index 4489dc3fb1..9b21ed6aa8 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/OSTask.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/OSTask.java @@ -127,7 +127,7 @@ public class OSTask extends Thread if (checkInterrupted()) return; int i = m_child.exitValue(); - exitValue = new Integer(i); + exitValue = Integer.valueOf(i); } catch (Exception ie) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java index f5f558cf30..1d540da0e8 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java @@ -1516,7 +1516,7 @@ public class FindWindow extends Window implements EventListener, ValueCha || (DisplayType.isID(dt) && field.getColumnName().endsWith("_ID"))) { int i = Integer.parseInt(in); - editor.setValue(new Integer(i)); + editor.setValue(Integer.valueOf(i)); } // Return BigDecimal else if (DisplayType.isNumeric(dt)) @@ -2427,7 +2427,7 @@ public class FindWindow extends Window implements EventListener, ValueCha if (in instanceof Integer) return in; int i = Integer.parseInt(in.toString()); - return new Integer(i); + return Integer.valueOf(i); } // Return BigDecimal else if (DisplayType.isNumeric(dt)) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java index 3ba2df914d..01bfc9e6ff 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java @@ -1290,7 +1290,7 @@ public final class WAccountDialog extends Window if (log.isLoggable(Level.CONFIG)) log.config("C_ValidCombination_ID=" + m_C_ValidCombination_ID + ", Changed=" + m_changed); if (!m_changed || m_C_ValidCombination_ID == 0) return null; - return new Integer(m_C_ValidCombination_ID); + return Integer.valueOf(m_C_ValidCombination_ID); } /** diff --git a/org.adempiere.ui/src/org/compiere/apps/form/Allocation.java b/org.adempiere.ui/src/org/compiere/apps/form/Allocation.java index e882e31115..12c4d70920 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/Allocation.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/Allocation.java @@ -101,7 +101,7 @@ public class Allocation return; // Async BPartner Test - Integer key = new Integer(m_C_BPartner_ID); + Integer key = Integer.valueOf(m_C_BPartner_ID); if (!m_bpartnerCheck.contains(key)) { new Thread() @@ -639,7 +639,7 @@ public class Allocation KeyNamePair pp = (KeyNamePair)payment.getValueAt(i, 2); // Value // Payment variables int C_Payment_ID = pp.getKey(); - paymentList.add(new Integer(C_Payment_ID)); + paymentList.add(Integer.valueOf(C_Payment_ID)); // BigDecimal PaymentAmt = (BigDecimal)payment.getValueAt(i, i_payment); // Applied Payment amountList.add(PaymentAmt); diff --git a/org.adempiere.ui/src/org/compiere/apps/form/PayPrint.java b/org.adempiere.ui/src/org/compiere/apps/form/PayPrint.java index 7dd2c792eb..bd3d757f12 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/PayPrint.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/PayPrint.java @@ -219,8 +219,8 @@ public class PayPrint { // if (rs.next()) { - documentNo = new Integer(rs.getInt(1)); - printFormatId = new Integer(rs.getInt(2)); + documentNo = Integer.valueOf(rs.getInt(1)); + printFormatId = Integer.valueOf(rs.getInt(2)); } else { diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentForm.java b/org.adempiere.ui/src/org/compiere/grid/PaymentForm.java index ffd2718012..a8eccd7d10 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentForm.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentForm.java @@ -186,7 +186,7 @@ public abstract class PaymentForm implements IPaymentForm { { int id = rs.getInt(1); String name = rs.getString(2); - s_Currencies.put(new Integer(id), new KeyNamePair(id, name)); + s_Currencies.put(Integer.valueOf(id), new KeyNamePair(id, name)); } } catch (SQLException e) diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java index c5caba8dbc..767c8309ac 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java @@ -404,7 +404,7 @@ public abstract class PaymentFormCash extends PaymentForm { if (m_mPayment.getC_Payment_ID() == 0) getGridTab().setValue("C_Payment_ID", null); else - getGridTab().setValue("C_Payment_ID", new Integer(m_mPayment.getC_Payment_ID())); + getGridTab().setValue("C_Payment_ID", Integer.valueOf(m_mPayment.getC_Payment_ID())); } // Set Cash if (newC_CashLine_ID != m_C_CashLine_ID) @@ -412,7 +412,7 @@ public abstract class PaymentFormCash extends PaymentForm { if (newC_CashLine_ID == 0) getGridTab().setValue("C_CashLine_ID", null); else - getGridTab().setValue("C_CashLine_ID", new Integer(newC_CashLine_ID)); + getGridTab().setValue("C_CashLine_ID", Integer.valueOf(newC_CashLine_ID)); } return true; } diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java index 187ec31009..ec33a788c3 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java @@ -262,7 +262,7 @@ public abstract class PaymentFormCheck extends PaymentForm { if (m_mPayment.getC_Payment_ID() == 0) getGridTab().setValue("C_Payment_ID", null); else - getGridTab().setValue("C_Payment_ID", new Integer(m_mPayment.getC_Payment_ID())); + getGridTab().setValue("C_Payment_ID", Integer.valueOf(m_mPayment.getC_Payment_ID())); } return true; } diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java index d748e8d9df..321e72f74d 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java @@ -387,7 +387,7 @@ public abstract class PaymentFormCreditCard extends PaymentForm { if (m_mPayment.getC_Payment_ID() == 0) getGridTab().setValue("C_Payment_ID", null); else - getGridTab().setValue("C_Payment_ID", new Integer(m_mPayment.getC_Payment_ID())); + getGridTab().setValue("C_Payment_ID", Integer.valueOf(m_mPayment.getC_Payment_ID())); } return true; diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java index 209b96670e..7d5b6efff8 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java @@ -250,7 +250,7 @@ public abstract class PaymentFormDirect extends PaymentForm { if (m_mPayment.getC_Payment_ID() == 0) getGridTab().setValue("C_Payment_ID", null); else - getGridTab().setValue("C_Payment_ID", new Integer(m_mPayment.getC_Payment_ID())); + getGridTab().setValue("C_Payment_ID", Integer.valueOf(m_mPayment.getC_Payment_ID())); } return true; diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormOnCredit.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormOnCredit.java index eb31219957..9bcd98a42b 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormOnCredit.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormOnCredit.java @@ -101,7 +101,7 @@ public abstract class PaymentFormOnCredit extends PaymentForm { public boolean save(int newC_PaymentTerm_ID) { if (newC_PaymentTerm_ID != m_C_PaymentTerm_ID) - getGridTab().setValue("C_PaymentTerm_ID", new Integer(newC_PaymentTerm_ID)); + getGridTab().setValue("C_PaymentTerm_ID", Integer.valueOf(newC_PaymentTerm_ID)); return true; } } diff --git a/org.adempiere.ui/src/org/compiere/minigrid/IDColumn.java b/org.adempiere.ui/src/org/compiere/minigrid/IDColumn.java index 18dccefe67..d0b569adb6 100644 --- a/org.adempiere.ui/src/org/compiere/minigrid/IDColumn.java +++ b/org.adempiere.ui/src/org/compiere/minigrid/IDColumn.java @@ -30,7 +30,7 @@ public class IDColumn */ public IDColumn (int record_ID) { - this(new Integer(record_ID)); + this(Integer.valueOf(record_ID)); } // IDColumn /** diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/ProductCategoryListTag.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/ProductCategoryListTag.java index 7f38e83579..e611d518fb 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/ProductCategoryListTag.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/ProductCategoryListTag.java @@ -99,7 +99,7 @@ public class ProductCategoryListTag extends TagSupport */ private option[] getCategories (int AD_Client_ID) { - option[] options = (option[])s_categories.get(new Integer(AD_Client_ID)); + option[] options = (option[])s_categories.get(Integer.valueOf(AD_Client_ID)); if (options != null) return options; @@ -125,7 +125,7 @@ public class ProductCategoryListTag extends TagSupport } } // - s_categories.put(new Integer(AD_Client_ID), options); + s_categories.put(Integer.valueOf(AD_Client_ID), options); return options; } // getCountries diff --git a/org.apache.ecs/src/org/apache/ecs/ElementAttributes.java b/org.apache.ecs/src/org/apache/ecs/ElementAttributes.java index 927a9ae9ae..7cb2a59577 100644 --- a/org.apache.ecs/src/org/apache/ecs/ElementAttributes.java +++ b/org.apache.ecs/src/org/apache/ecs/ElementAttributes.java @@ -234,7 +234,7 @@ public abstract class ElementAttributes extends GenericElement implements Attrib /** Add an attribute to the element. */ public Element addAttribute(String attribute_name, int attribute_value) { - getElementHashEntry().put(attribute_name, new Integer(attribute_value)); + getElementHashEntry().put(attribute_name, Integer.valueOf(attribute_value)); return(this); } 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 6ff61dbebd..614b4ad727 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 @@ -156,7 +156,7 @@ public class DBDataSource extends compiereDataSource } else if (clazz.equals(java.lang.Integer.class)) { - objValue = new Integer(m_resultSet.getInt(field.getName())); + objValue = Integer.valueOf(m_resultSet.getInt(field.getName())); if(m_resultSet.wasNull()) { objValue = null; diff --git a/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportPool.java b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportPool.java index ff52acdd99..f49fe7bc06 100644 --- a/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportPool.java +++ b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportPool.java @@ -48,7 +48,7 @@ public class ReportPool public ReportInfo getReport (int AD_Process_ID ) { -/* ReportInfo reportinfo = (ReportInfo) pool.get(new Integer(AD_Process_ID)); +/* ReportInfo reportinfo = (ReportInfo) pool.get(Integer.valueOf(AD_Process_ID)); if (reportinfo == null) { reportinfo = loadReport(AD_Process_ID); @@ -78,7 +78,7 @@ public class ReportPool { if(refresh) { - pool.put(new Integer(AD_Process_ID), reportinfo); + pool.put(Integer.valueOf(AD_Process_ID), reportinfo); } else { @@ -95,7 +95,7 @@ public class ReportPool size--; } - pool.put(new Integer(AD_Process_ID), reportinfo); + pool.put(Integer.valueOf(AD_Process_ID), reportinfo); size++; } if (log.isLoggable(Level.INFO)) log.info("Load " + reportinfo + " into Report Pool" + " Size=" + size); diff --git a/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportProcessor.java b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportProcessor.java index 3dcc4121ba..22d1a57bb6 100644 --- a/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportProcessor.java +++ b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportProcessor.java @@ -96,7 +96,7 @@ public class ReportProcessor // add parameter m_Param.putAll(reportInfo.getSubReport()); addProcessParameters( m_AD_PInstance_ID, m_Param); - m_Param.put("RECORD_ID", new Integer( m_Record_ID)); + m_Param.put("RECORD_ID", Integer.valueOf( m_Record_ID)); // Marco LOMBARDO: REPORT_HOME used to express subreports path. m_Param.put("REPORT_HOME", REPORT_HOME); // End Marco LOMBARDO. @@ -145,8 +145,8 @@ public class ReportProcessor MPInstancePara[] pinstancePara = pinstance.getParameters(); m_Record_ID = pinstance.getRecord_ID(); - params.put("AD_Client_ID",new Integer(pinstance.getAD_Client_ID())); - params.put("AD_Org_ID",new Integer(pinstance.getAD_Org_ID())); + params.put("AD_Client_ID",Integer.valueOf(pinstance.getAD_Client_ID())); + params.put("AD_Org_ID",Integer.valueOf(pinstance.getAD_Org_ID())); for(int i=0; i