From a486d1317ce23034cc4f09999643e768b69f1a74 Mon Sep 17 00:00:00 2001 From: Richard Morales Date: Wed, 5 Dec 2012 12:09:37 -0500 Subject: [PATCH] IDEMPIERE-308 Performance: Replace use of StringBuffer and String concatenation with StringBuilder / findbugs fb-contrib pattern LSYC_LOCAL_SYNCHRONIZED_COLLECTION --- .../src/org/compiere/process/Aging.java | 2 +- .../src/org/compiere/process/IndentedBOM.java | 2 +- .../exceptions/DocTypeNotFoundException.java | 2 +- .../exceptions/FillMandatoryException.java | 2 +- .../exceptions/NoUOMConversionException.java | 2 +- .../exceptions/PORelationException.java | 2 +- .../ProductNotOnPriceListException.java | 2 +- .../adempiere/model/PromotionValidator.java | 2 +- .../org/adempiere/model/ZoomInfoFactory.java | 2 +- .../org/adempiere/util/GenerateModelJPA.java | 2 +- .../src/org/adempiere/util/PaymentUtil.java | 6 ++-- .../src/org/compiere/Adempiere.java | 4 +-- .../src/org/compiere/acct/DocLine.java | 2 +- .../org/compiere/acct/Doc_BankStatement.java | 2 +- .../src/org/compiere/acct/Doc_Cash.java | 2 +- .../src/org/compiere/acct/Doc_GLJournal.java | 2 +- .../src/org/compiere/acct/Fact.java | 4 +-- .../src/org/compiere/cm/CacheHandler.java | 2 +- .../src/org/compiere/cm/StringUtil.java | 2 +- .../src/org/compiere/db/CConnection.java | 12 +++---- .../src/org/compiere/db/CreateAdempiere.java | 2 +- .../src/org/compiere/dbPort/Convert.java | 4 +-- .../org/compiere/dbPort/Convert_SQL92.java | 4 +-- .../src/org/compiere/dbPort/Join.java | 2 +- .../src/org/compiere/impexp/ImpFormatRow.java | 4 +-- .../src/org/compiere/impexp/OFX1ToXML.java | 2 +- .../org/compiere/model/AccessSqlParser.java | 4 +-- .../org/compiere/model/DataStatusEvent.java | 4 +-- .../src/org/compiere/model/GridField.java | 4 +-- .../src/org/compiere/model/GridTab.java | 4 +-- .../src/org/compiere/model/GridTable.java | 24 +++++++------- .../compiere/model/LookupDisplayColumn.java | 2 +- .../src/org/compiere/model/MAssetAcct.java | 2 +- .../org/compiere/model/MAssetAddition.java | 6 ++-- .../src/org/compiere/model/MAssetClass.java | 2 +- .../src/org/compiere/model/MAssetReval.java | 2 +- .../org/compiere/model/MAssetTransfer.java | 2 +- .../compiere/model/MDepreciationWorkfile.java | 2 +- .../src/org/compiere/model/MLotCtl.java | 2 +- .../src/org/compiere/model/MMovement.java | 2 +- .../org/compiere/model/MMovementConfirm.java | 2 +- .../org/compiere/model/MMovementLineMA.java | 2 +- .../src/org/compiere/model/MOrder.java | 8 ++--- .../org/compiere/model/MOrderPaySchedule.java | 2 +- .../src/org/compiere/model/MPInstanceLog.java | 4 +-- .../src/org/compiere/model/MPaySelection.java | 2 +- .../compiere/model/MPaySelectionCheck.java | 2 +- .../org/compiere/model/MPaySelectionLine.java | 2 +- .../src/org/compiere/model/MPayment.java | 10 +++--- .../src/org/compiere/model/MPaymentTerm.java | 2 +- .../compiere/model/MPaymentTransaction.java | 2 +- .../org/compiere/model/MPaymentValidate.java | 4 +-- .../src/org/compiere/model/MPeriod.java | 2 +- .../org/compiere/model/MPeriodControl.java | 2 +- .../src/org/compiere/model/MPreference.java | 2 +- .../src/org/compiere/model/MProduct.java | 2 +- .../src/org/compiere/model/MProductBOM.java | 2 +- .../compiere/model/MProductCategoryAcct.java | 2 +- .../src/org/compiere/model/MProductPrice.java | 2 +- .../org/compiere/model/MProductionLine.java | 2 +- .../src/org/compiere/model/MProjectLine.java | 2 +- .../src/org/compiere/model/MProjectPhase.java | 2 +- .../src/org/compiere/model/MProjectTask.java | 2 +- .../src/org/compiere/model/MProjectType.java | 4 +-- .../src/org/compiere/model/MRMA.java | 4 +-- .../src/org/compiere/model/MRecordAccess.java | 2 +- .../compiere/model/MRegistrationValue.java | 2 +- .../src/org/compiere/model/MRequest.java | 4 +-- .../src/org/compiere/model/MRequestType.java | 6 ++-- .../src/org/compiere/model/MRequisition.java | 4 +-- .../compiere/model/MResourceAssignment.java | 2 +- .../src/org/compiere/model/MResourceType.java | 2 +- .../src/org/compiere/model/MRfQ.java | 2 +- .../src/org/compiere/model/MRfQLine.java | 4 +-- .../src/org/compiere/model/MRfQLineQty.java | 2 +- .../src/org/compiere/model/MRfQResponse.java | 2 +- .../org/compiere/model/MRfQResponseLine.java | 2 +- .../compiere/model/MRfQResponseLineQty.java | 2 +- .../src/org/compiere/model/MRole.java | 20 ++++++------ .../org/compiere/model/MRoleOrgAccess.java | 4 +-- .../src/org/compiere/model/MRule.java | 2 +- .../src/org/compiere/model/MSLAMeasure.java | 2 +- .../src/org/compiere/model/MScheduler.java | 2 +- .../org/compiere/model/MSchedulerPara.java | 2 +- .../src/org/compiere/model/MSequence.java | 2 +- .../src/org/compiere/model/MSerNoCtl.java | 2 +- .../src/org/compiere/model/MSetup.java | 2 +- .../src/org/compiere/model/MStatus.java | 2 +- .../org/compiere/model/MStatusCategory.java | 2 +- .../src/org/compiere/model/MStore.java | 4 +-- .../src/org/compiere/model/MSystem.java | 2 +- .../src/org/compiere/model/MTable.java | 2 +- .../src/org/compiere/model/MTableAccess.java | 4 +-- .../compiere/model/MTableScriptValidator.java | 2 +- .../src/org/compiere/model/MTask.java | 4 +-- .../src/org/compiere/model/MTimeExpense.java | 2 +- .../src/org/compiere/model/MTransaction.java | 2 +- .../src/org/compiere/model/MTree.java | 6 ++-- .../src/org/compiere/model/MUOM.java | 2 +- .../org/compiere/model/MUOMConversion.java | 2 +- .../src/org/compiere/model/MUser.java | 4 +-- .../src/org/compiere/model/MUserDefField.java | 2 +- .../src/org/compiere/model/MUserDefTab.java | 2 +- .../org/compiere/model/MUserOrgAccess.java | 4 +-- .../org/compiere/model/MWarehousePrice.java | 4 +-- .../src/org/compiere/model/MYear.java | 2 +- .../compiere/model/ModelValidationEngine.java | 2 +- .../org/compiere/model/NaturalAccountMap.java | 2 +- .../src/org/compiere/model/Obscure.java | 2 +- .../src/org/compiere/model/POInfo.java | 2 +- .../src/org/compiere/model/POInfoColumn.java | 2 +- .../src/org/compiere/model/POIterator.java | 2 +- .../src/org/compiere/model/PO_LOB.java | 2 +- .../org/compiere/model/PaymentProcessor.java | 2 +- .../src/org/compiere/model/PrintInfo.java | 2 +- .../src/org/compiere/model/ProductCost.java | 4 +-- .../src/org/compiere/model/Scriptlet.java | 2 +- .../src/org/compiere/model/SetGetUtil.java | 4 +-- .../org/compiere/model/TranslationTable.java | 8 ++--- .../src/org/compiere/print/CPaper.java | 4 +-- .../src/org/compiere/print/MPrintColor.java | 4 +-- .../src/org/compiere/print/MPrintFont.java | 8 ++--- .../org/compiere/print/MPrintFormatItem.java | 2 +- .../src/org/compiere/print/PrintData.java | 2 +- .../org/compiere/print/PrintDataColumn.java | 2 +- .../org/compiere/print/PrintDataElement.java | 2 +- .../org/compiere/print/PrintDataGroup.java | 2 +- .../src/org/compiere/print/PrintUtil.java | 4 +-- .../src/org/compiere/print/ReportEngine.java | 2 +- .../print/layout/Dimension2DImpl.java | 2 +- .../compiere/print/layout/HTMLElement.java | 2 +- .../compiere/print/layout/LayoutEngine.java | 4 +-- .../src/org/compiere/print/layout/Page.java | 6 ++-- .../compiere/print/layout/PrintElement.java | 2 +- .../compiere/print/layout/StringElement.java | 2 +- .../print/util/SerializableMatrixImpl.java | 2 +- .../org/compiere/process/AdempiereServer.java | 4 +-- .../compiere/process/AdempiereService.java | 2 +- .../compiere/process/DocActionTemplate.java | 2 +- .../src/org/compiere/process/ProcessInfo.java | 4 +-- .../org/compiere/process/ProcessInfoUtil.java | 2 +- .../src/org/compiere/report/FinReport.java | 12 +++---- .../org/compiere/report/FinReportPeriod.java | 6 ++-- .../src/org/compiere/report/FinStatement.java | 2 +- .../src/org/compiere/report/MReport.java | 2 +- .../org/compiere/report/MReportColumn.java | 4 +-- .../src/org/compiere/report/MReportLine.java | 4 +-- .../org/compiere/report/MReportSource.java | 2 +- .../src/org/compiere/report/MReportTree.java | 2 +- .../src/org/compiere/report/TrialBalance.java | 4 +-- .../src/org/compiere/report/core/RColumn.java | 2 +- .../org/compiere/report/core/RModelData.java | 2 +- .../src/org/compiere/tools/FileUtil.java | 2 +- .../compiere/util/AdempiereSystemError.java | 2 +- .../org/compiere/util/AdempiereUserError.java | 2 +- .../src/org/compiere/util/AmtInWords_BG.java | 2 +- .../src/org/compiere/util/AmtInWords_CA.java | 2 +- .../src/org/compiere/util/AmtInWords_EN.java | 2 +- .../src/org/compiere/util/AmtInWords_ES.java | 2 +- .../src/org/compiere/util/AmtInWords_FA.java | 2 +- .../src/org/compiere/util/AmtInWords_FR.java | 2 +- .../src/org/compiere/util/AmtInWords_HR.java | 2 +- .../src/org/compiere/util/AmtInWords_IT.java | 2 +- .../src/org/compiere/util/AmtInWords_MS.java | 2 +- .../src/org/compiere/util/AmtInWords_PL.java | 2 +- .../src/org/compiere/util/AmtInWords_PT.java | 2 +- .../src/org/compiere/util/AmtInWords_SR.java | 2 +- .../src/org/compiere/util/AmtInWords_TH.java | 4 +-- .../src/org/compiere/util/AmtInWords_VI.java | 2 +- .../compiere/util/ArhRuntimeException.java | 2 +- .../src/org/compiere/util/CLogConsole.java | 2 +- .../org/compiere/util/CLogErrorBuffer.java | 2 +- .../src/org/compiere/util/CLogFile.java | 2 +- .../src/org/compiere/util/CLogFormatter.java | 6 ++-- .../src/org/compiere/util/CLogMgt.java | 4 +-- .../src/org/compiere/util/CLogger.java | 2 +- .../src/org/compiere/util/CMemoryUsage.java | 2 +- .../src/org/compiere/util/CStatementVO.java | 2 +- .../src/org/compiere/util/CacheMgt.java | 4 +-- .../src/org/compiere/util/DB.java | 8 ++--- .../src/org/compiere/util/EMail.java | 6 ++-- .../src/org/compiere/util/Env.java | 6 ++-- .../src/org/compiere/util/EnvLoader.java | 4 +-- .../src/org/compiere/util/FileUpload.java | 2 +- .../compiere/util/GenericPaymentExport.java | 2 +- .../src/org/compiere/util/Ini.java | 2 +- .../src/org/compiere/util/Login.java | 8 ++--- .../src/org/compiere/util/MSort.java | 2 +- .../src/org/compiere/util/Msg.java | 6 ++-- .../src/org/compiere/util/NamePair.java | 2 +- .../src/org/compiere/util/Secure.java | 4 +-- .../src/org/compiere/util/SecureEngine.java | 2 +- .../src/org/compiere/util/TimeUtil.java | 2 +- .../src/org/compiere/util/Trx.java | 2 +- .../src/org/compiere/util/Util.java | 12 +++---- .../src/org/compiere/util/WebEnv.java | 6 ++-- .../src/org/compiere/util/WebInfo.java | 2 +- .../src/org/compiere/util/WebUser.java | 2 +- .../src/org/compiere/util/WebUtil.java | 12 +++---- .../src/org/compiere/util/ZipUtil.java | 2 +- .../org/compiere/wf/DocWorkflowManager.java | 2 +- .../src/org/compiere/wf/MWFActivity.java | 14 ++++---- .../src/org/compiere/wf/MWFEventAudit.java | 2 +- .../src/org/compiere/wf/MWFNextCondition.java | 2 +- .../src/org/compiere/wf/MWFNode.java | 4 +-- .../src/org/compiere/wf/MWFNodeNext.java | 2 +- .../src/org/compiere/wf/MWFProcess.java | 4 +-- .../src/org/compiere/wf/MWFResponsible.java | 2 +- .../src/org/compiere/wf/MWorkflow.java | 2 +- .../src/org/eevolution/model/MDDOrder.java | 4 +-- .../process/ImportInventoryMove.java | 4 +-- .../src/org/globalqss/process/CashFlow.java | 2 +- .../fa/exceptions/AssetArrayException.java | 2 +- .../AssetStatusChangedException.java | 2 +- .../src/compiere/model/MyValidator.java | 2 +- .../src/test/functional/POTest.java | 2 +- .../test/functional/inventory/MMScenario.java | 2 +- .../compiere/install/ConfigurationData.java | 2 +- .../src/org/compiere/install/KeyStoreMgt.java | 8 ++--- .../org/compiere/install/util/AppsAction.java | 2 +- .../org/compiere/install/util/OnlineHelp.java | 2 +- .../src/org/compiere/model/PP_Optimal.java | 2 +- .../src/org/compiere/model/PP_PayFlowPro.java | 4 +-- .../org/compiere/model/PP_PayFlowPro4.java | 4 +-- .../handler/CodeSnippetElementHandler.java | 2 +- .../handler/CommonTranslationHandler.java | 4 +-- .../handler/GenericPOElementHandler.java | 2 +- .../handler/ImpFormatRowElementHandler.java | 2 +- .../handler/WorkflowNodeElementHandler.java | 2 +- .../src/org/adempiere/pipo2/IDFinder.java | 8 ++--- .../org/adempiere/pipo2/PackInHandler.java | 2 +- .../org/adempiere/pipo2/ReferenceUtils.java | 4 +-- .../adempiere/model/ExportModelValidator.java | 2 +- .../process/rpl/exp/ExportHelper.java | 4 +-- .../process/rpl/imp/ImportHelper.java | 2 +- .../org/compiere/report/ReportStarter.java | 2 +- .../compiere/ldap/LdapConnectionHandler.java | 2 +- .../compiere/server/AdempiereServerMgr.java | 2 +- .../org/compiere/server/AlertProcessor.java | 2 +- .../org/compiere/server/EMailProcessor.java | 10 +++--- .../apps/graph/PerformanceIndicator.java | 4 +-- .../src/org/compiere/acct/AcctViewer.java | 2 +- .../src/org/compiere/acct/AcctViewerData.java | 6 ++-- .../src/org/compiere/apps/ADialog.java | 8 ++--- .../src/org/compiere/apps/ADialogDialog.java | 2 +- .../src/org/compiere/apps/ALogin.java | 2 +- .../src/org/compiere/apps/APanel.java | 6 ++-- .../src/org/compiere/apps/AppsAction.java | 2 +- .../org/compiere/apps/BeanShellEditor.java | 2 +- .../src/org/compiere/apps/OnlineHelp.java | 2 +- .../src/org/compiere/apps/Preference.java | 2 +- .../org/compiere/apps/ProcessParameter.java | 2 +- .../compiere/apps/ProcessParameterPanel.java | 2 +- .../src/org/compiere/apps/StatusBar.java | 2 +- .../src/org/compiere/apps/form/FormFrame.java | 2 +- .../compiere/apps/form/VFactReconcile.java | 2 +- .../src/org/compiere/apps/form/VGenPanel.java | 2 +- .../src/org/compiere/apps/form/VPayPrint.java | 2 +- .../org/compiere/apps/form/VSQLProcess.java | 4 +-- .../src/org/compiere/apps/form/VTreeBOM.java | 4 +-- .../src/org/compiere/apps/search/Info.java | 6 ++-- .../org/compiere/apps/search/InfoAsset.java | 4 +-- .../compiere/apps/search/InfoAssignment.java | 4 +-- .../compiere/apps/search/InfoBPartner.java | 4 +-- .../compiere/apps/search/InfoCashLine.java | 4 +-- .../org/compiere/apps/search/InfoGeneral.java | 2 +- .../org/compiere/apps/search/InfoInOut.java | 4 +-- .../org/compiere/apps/search/InfoInvoice.java | 4 +-- .../org/compiere/apps/search/InfoOrder.java | 4 +-- .../compiere/apps/search/InfoPAttribute.java | 2 +- .../org/compiere/apps/search/InfoPayment.java | 4 +-- .../org/compiere/apps/search/InfoProduct.java | 6 ++-- .../src/org/compiere/apps/wf/WFPanel.java | 6 ++-- .../org/compiere/dbPort/ConvertDialog.java | 4 +-- .../org/compiere/grid/RecordAccessDialog.java | 2 +- .../org/compiere/grid/VCreateFromDialog.java | 2 +- .../src/org/compiere/grid/VSortTab.java | 6 ++-- .../org/compiere/grid/VTableExcelAdapter.java | 2 +- .../compiere/grid/ed/CityAutoCompleter.java | 2 +- .../src/org/compiere/grid/ed/Editor.java | 2 +- .../src/org/compiere/grid/ed/HTMLEditor.java | 2 +- .../src/org/compiere/grid/ed/MDocNumber.java | 6 ++-- .../src/org/compiere/grid/ed/MDocTime.java | 2 +- .../src/org/compiere/grid/ed/VAccount.java | 2 +- .../org/compiere/grid/ed/VAccountDialog.java | 6 ++-- .../src/org/compiere/grid/ed/VAssignment.java | 2 +- .../compiere/grid/ed/VAssignmentDialog.java | 2 +- .../src/org/compiere/grid/ed/VButton.java | 2 +- .../org/compiere/grid/ed/VLocatorDialog.java | 2 +- .../src/org/compiere/grid/ed/VLookup.java | 2 +- .../src/org/compiere/grid/ed/VNumber.java | 2 +- .../org/compiere/grid/ed/ValuePreference.java | 6 ++-- .../grid/tree/AdempiereTreeModel.java | 4 +-- .../org/compiere/grid/tree/VTreePanel.java | 2 +- .../src/org/compiere/minigrid/MiniTable.java | 2 +- .../src/org/compiere/plaf/CompiereColor.java | 2 +- .../org/compiere/plaf/CompiereToolTipUI.java | 2 +- .../src/org/compiere/pos/PosKeyPanel.java | 2 +- .../src/org/compiere/print/Viewer.java | 4 +-- .../src/org/compiere/swing/CPanel.java | 2 +- .../src/org/compiere/swing/CTabbedPane.java | 2 +- .../org/eevolution/form/VInOutInvoiceGen.java | 12 +++---- .../src/org/adempiere/webui/LayoutUtils.java | 2 +- .../adempiere/webui/TimelineEventFeed.java | 2 +- .../org/adempiere/webui/ValuePreference.java | 6 ++-- .../org/adempiere/webui/acct/WAcctViewer.java | 2 +- .../adempiere/webui/acct/WAcctViewerData.java | 6 ++-- .../adempiere/webui/adwindow/ADSortTab.java | 6 ++-- .../webui/adwindow/AbstractADTabbox.java | 2 +- .../adwindow/AbstractADWindowContent.java | 2 +- .../src/org/adempiere/webui/apps/AEnv.java | 4 +-- .../webui/apps/ProcessParameterPanel.java | 2 +- .../webui/apps/form/WCreateFromWindow.java | 2 +- .../webui/apps/form/WFactReconcile.java | 2 +- .../adempiere/webui/apps/form/WGenForm.java | 2 +- .../adempiere/webui/apps/form/WPayPrint.java | 2 +- .../webui/apps/form/WSQLProcess.java | 4 +-- .../adempiere/webui/apps/form/WTreeBOM.java | 2 +- .../apps/graph/WPerformanceIndicator.java | 4 +-- .../org/adempiere/webui/apps/wf/WFPanel.java | 4 +-- .../webui/component/ADTreeOnDropListener.java | 4 +-- .../adempiere/webui/component/Listbox.java | 2 +- .../adempiere/webui/component/WListbox.java | 2 +- .../webui/dashboard/CalendarWindow.java | 2 +- .../webui/dashboard/DPFavourites.java | 2 +- .../webui/editor/WAssignmentEditor.java | 2 +- .../org/adempiere/webui/editor/WEditor.java | 2 +- .../webui/panel/CustomizeGridViewPanel.java | 2 +- .../adempiere/webui/panel/InfoAssetPanel.java | 4 +-- .../webui/panel/InfoAssignmentPanel.java | 4 +-- .../webui/panel/InfoBPartnerPanel.java | 4 +-- .../webui/panel/InfoCashLinePanel.java | 4 +-- .../webui/panel/InfoGeneralPanel.java | 2 +- .../adempiere/webui/panel/InfoInOutPanel.java | 4 +-- .../webui/panel/InfoInvoicePanel.java | 4 +-- .../adempiere/webui/panel/InfoOrderPanel.java | 4 +-- .../webui/panel/InfoPAttributePanel.java | 2 +- .../org/adempiere/webui/panel/InfoPanel.java | 6 ++-- .../webui/panel/InfoPaymentPanel.java | 4 +-- .../webui/panel/InfoProductPanel.java | 8 ++--- .../webui/panel/MenuTreeFilterPanel.java | 2 +- .../adempiere/webui/panel/StatusBarPanel.java | 2 +- .../org/adempiere/webui/window/FDialog.java | 2 +- .../webui/window/WAccountDialog.java | 6 ++-- .../webui/window/WAssignmentDialog.java | 2 +- .../webui/window/WAutoCompleterCity.java | 2 +- .../webui/window/WLocatorDialog.java | 2 +- .../webui/window/WRecordAccessDialog.java | 2 +- .../src/org/adempiere/webui/window/WTask.java | 2 +- .../webui/window/WTextEditorDialog.java | 2 +- .../adempiere/webui/window/ZkJRViewer.java | 2 +- .../webui/window/ZkReportViewer.java | 4 +-- .../org/compiere/apps/form/Allocation.java | 8 ++--- .../src/org/compiere/apps/form/Archive.java | 2 +- .../org/compiere/apps/form/FactReconcile.java | 4 +-- .../src/org/compiere/apps/form/InOutGen.java | 8 ++--- .../org/compiere/apps/form/InvoiceGen.java | 8 ++--- .../src/org/compiere/apps/form/PaySelect.java | 2 +- .../src/org/compiere/apps/form/TreeBOM.java | 4 +-- .../src/org/compiere/grid/CreateFrom.java | 2 +- .../org/compiere/grid/CreateFromInvoice.java | 4 +-- .../src/org/compiere/grid/CreateFromRMA.java | 2 +- .../org/compiere/grid/CreateFromShipment.java | 6 ++-- .../compiere/grid/CreateFromStatement.java | 2 +- .../src/org/compiere/grid/ed/CityVO.java | 2 +- .../compiere/wstore/AdvertisementServlet.java | 2 +- .../compiere/wstore/IssueReportServlet.java | 2 +- .../src/org/compiere/wstore/OrderServlet.java | 2 +- .../org/compiere/wstore/PaymentServlet.java | 2 +- .../src/org/compiere/wstore/PriceList.java | 2 +- .../org/compiere/wstore/PriceListProduct.java | 2 +- .../org/compiere/wstore/RequestServlet.java | 2 +- .../src/org/compiere/wstore/WebBasket.java | 2 +- .../org/compiere/wstore/WebBasketLine.java | 4 +-- .../src/org/compiere/wstore/WebOrder.java | 2 +- .../db/oracle/config/ConfigOracle.java | 4 +-- .../src/org/compiere/db/DB_PostgreSQL.java | 12 +++---- .../compiere/dbPort/Convert_PostgreSQL.java | 32 +++++++++---------- .../dbPort/Convert_PostgreSQLTest.java | 4 +-- .../compiere/dbPort/PostgresConvertTest.java | 6 ++-- .../_3e/ADInterface/ADDataStatusListener.java | 2 +- .../com/_3e/ADInterface/ADServiceImpl.java | 4 +-- .../src/com/_3e/ADInterface/InfoBPartner.java | 10 +++--- .../src/com/_3e/ADInterface/InfoProduct.java | 10 +++--- .../engine/util/JRQueryExecuter.java | 2 +- 385 files changed, 645 insertions(+), 645 deletions(-) diff --git a/org.adempiere.base.process/src/org/compiere/process/Aging.java b/org.adempiere.base.process/src/org/compiere/process/Aging.java index f686701f1f..980b42a002 100644 --- a/org.adempiere.base.process/src/org/compiere/process/Aging.java +++ b/org.adempiere.base.process/src/org/compiere/process/Aging.java @@ -105,7 +105,7 @@ public class Aging extends SvrProcess //FR 1933937 String dateacct = DB.TO_DATE(p_StatementDate); - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); sql.append("SELECT bp.C_BP_Group_ID, oi.C_BPartner_ID,oi.C_Invoice_ID,oi.C_InvoicePaySchedule_ID, " // 1..4 + "oi.C_Currency_ID, oi.IsSOTrx, " // 5..6 + "oi.DateInvoiced, oi.NetDays,oi.DueDate,oi.DaysDue, "); // 7..10 diff --git a/org.adempiere.base.process/src/org/compiere/process/IndentedBOM.java b/org.adempiere.base.process/src/org/compiere/process/IndentedBOM.java index a55f4583b9..cfaf0631c8 100644 --- a/org.adempiere.base.process/src/org/compiere/process/IndentedBOM.java +++ b/org.adempiere.base.process/src/org/compiere/process/IndentedBOM.java @@ -173,7 +173,7 @@ public class IndentedBOM extends SvrProcess private List getBOMs(MProduct product) { ArrayList params = new ArrayList(); - StringBuffer whereClause = new StringBuffer(); + StringBuilder whereClause = new StringBuilder(); whereClause.append(MProductBOM.COLUMNNAME_M_Product_ID).append("=?"); params.add(product.get_ID()); diff --git a/org.adempiere.base/src/org/adempiere/exceptions/DocTypeNotFoundException.java b/org.adempiere.base/src/org/adempiere/exceptions/DocTypeNotFoundException.java index 0ecb893d7b..769635a687 100644 --- a/org.adempiere.base/src/org/adempiere/exceptions/DocTypeNotFoundException.java +++ b/org.adempiere.base/src/org/adempiere/exceptions/DocTypeNotFoundException.java @@ -51,7 +51,7 @@ public class DocTypeNotFoundException extends AdempiereException { String additionalInfo = super.getMessage(); String docBaseTypeName = MRefList.getListName(Env.getCtx(), MDocType.DOCBASETYPE_AD_Reference_ID, getDocBaseType()); - StringBuffer sb = new StringBuffer("@NotFound@ @C_DocType_ID@"); + StringBuilder sb = new StringBuilder("@NotFound@ @C_DocType_ID@"); sb.append(" - @DocBaseType@ : " + docBaseTypeName); if (!Util.isEmpty(additionalInfo, true)) { diff --git a/org.adempiere.base/src/org/adempiere/exceptions/FillMandatoryException.java b/org.adempiere.base/src/org/adempiere/exceptions/FillMandatoryException.java index 78b761c8d8..b87ea6668f 100644 --- a/org.adempiere.base/src/org/adempiere/exceptions/FillMandatoryException.java +++ b/org.adempiere.base/src/org/adempiere/exceptions/FillMandatoryException.java @@ -31,7 +31,7 @@ public class FillMandatoryException extends AdempiereException private static final String buildMessage(String...fields) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (String f : fields) { if (sb.length() > 0) sb.append(", "); diff --git a/org.adempiere.base/src/org/adempiere/exceptions/NoUOMConversionException.java b/org.adempiere.base/src/org/adempiere/exceptions/NoUOMConversionException.java index 0ec57f73d1..c7d87e5586 100644 --- a/org.adempiere.base/src/org/adempiere/exceptions/NoUOMConversionException.java +++ b/org.adempiere.base/src/org/adempiere/exceptions/NoUOMConversionException.java @@ -36,7 +36,7 @@ public class NoUOMConversionException extends AdempiereException private static String buildMessage(int M_Product_ID, int C_UOM_ID, int C_UOM_To_ID) { - StringBuffer sb = new StringBuffer("@"+AD_Message+"@ - "); + StringBuilder sb = new StringBuilder("@"+AD_Message+"@ - "); // sb.append("@M_Product_ID@:"); MProduct product = MProduct.get(Env.getCtx(), M_Product_ID); diff --git a/org.adempiere.base/src/org/adempiere/exceptions/PORelationException.java b/org.adempiere.base/src/org/adempiere/exceptions/PORelationException.java index 31d3e2d0cf..ef8a5d85b1 100644 --- a/org.adempiere.base/src/org/adempiere/exceptions/PORelationException.java +++ b/org.adempiere.base/src/org/adempiere/exceptions/PORelationException.java @@ -76,7 +76,7 @@ public class PORelationException extends AdempiereException { final String msg = Msg.getMsg(po.getCtx(), MSG_ERR_KEY_COLUMNS_2P, msgParams); - final StringBuffer sb = new StringBuffer(msg); + final StringBuilder sb = new StringBuilder(msg); for (final String keyCol : po.get_KeyColumns()) { sb.append("\n"); diff --git a/org.adempiere.base/src/org/adempiere/exceptions/ProductNotOnPriceListException.java b/org.adempiere.base/src/org/adempiere/exceptions/ProductNotOnPriceListException.java index 077687888c..c654354149 100644 --- a/org.adempiere.base/src/org/adempiere/exceptions/ProductNotOnPriceListException.java +++ b/org.adempiere.base/src/org/adempiere/exceptions/ProductNotOnPriceListException.java @@ -43,7 +43,7 @@ public class ProductNotOnPriceListException extends AdempiereException private static final String buildMessage (MProductPricing pp, int documentLineNo) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); if (documentLineNo > 0) { if (sb.length() > 0) diff --git a/org.adempiere.base/src/org/adempiere/model/PromotionValidator.java b/org.adempiere.base/src/org/adempiere/model/PromotionValidator.java index c8d276a9b3..abdc69ae9d 100644 --- a/org.adempiere.base/src/org/adempiere/model/PromotionValidator.java +++ b/org.adempiere.base/src/org/adempiere/model/PromotionValidator.java @@ -102,7 +102,7 @@ public class PromotionValidator implements ModelValidator { String warehouseFilter = "M_PromotionPreCondition.M_Warehouse_ID IS NULL OR M_PromotionPreCondition.M_Warehouse_ID = ?"; String dateFilter = "M_PromotionPreCondition.StartDate <= ? AND (M_PromotionPreCondition.EndDate >= ? OR M_PromotionPreCondition.EndDate IS NULL)"; - StringBuffer select = new StringBuffer(); + StringBuilder select = new StringBuilder(); select.append(" SELECT M_PromotionPreCondition.M_PromotionPreCondition_ID FROM M_PromotionPreCondition ") .append(" WHERE") .append(" (" + bpFilter + ")") diff --git a/org.adempiere.base/src/org/adempiere/model/ZoomInfoFactory.java b/org.adempiere.base/src/org/adempiere/model/ZoomInfoFactory.java index 84eeae7ed8..07b76a9b12 100644 --- a/org.adempiere.base/src/org/adempiere/model/ZoomInfoFactory.java +++ b/org.adempiere.base/src/org/adempiere/model/ZoomInfoFactory.java @@ -51,7 +51,7 @@ public class ZoomInfoFactory { @Override public String toString() { - final StringBuffer sb = new StringBuffer(); + final StringBuilder sb = new StringBuilder(); sb.append("ZoomInfo["); sb.append("Display="); sb.append(destinationDisplay); diff --git a/org.adempiere.base/src/org/adempiere/util/GenerateModelJPA.java b/org.adempiere.base/src/org/adempiere/util/GenerateModelJPA.java index a5d358ead1..ad2aadad6c 100755 --- a/org.adempiere.base/src/org/adempiere/util/GenerateModelJPA.java +++ b/org.adempiere.base/src/org/adempiere/util/GenerateModelJPA.java @@ -532,7 +532,7 @@ public class GenerateModelJPA private String addListValidation (StringBuffer sb, int AD_Reference_ID, String columnName, boolean nullable) { - StringBuffer retValue = new StringBuffer(); + StringBuilder retValue = new StringBuilder(); retValue.append("\n/** ").append(columnName).append(" AD_Reference_ID=").append(AD_Reference_ID) .append(" */\n") .append("public static final int ").append(columnName.toUpperCase()) .append("_AD_Reference_ID=").append(AD_Reference_ID).append(";"); diff --git a/org.adempiere.base/src/org/adempiere/util/PaymentUtil.java b/org.adempiere.base/src/org/adempiere/util/PaymentUtil.java index 9514c84759..83454bf8d7 100644 --- a/org.adempiere.base/src/org/adempiere/util/PaymentUtil.java +++ b/org.adempiere.base/src/org/adempiere/util/PaymentUtil.java @@ -71,7 +71,7 @@ public class PaymentUtil { Integer valueLength = value.length(); - StringBuffer encryptedCC = new StringBuffer(); + StringBuilder encryptedCC = new StringBuilder(); for (int i = 0; i < (valueLength - 4); i++) { encryptedCC.append("0"); @@ -88,7 +88,7 @@ public class PaymentUtil { else { Integer valueLength = creditCardVV.length(); - StringBuffer encryptedCC = new StringBuffer(); + StringBuilder encryptedCC = new StringBuilder(); for (int i = 0; i < valueLength; i++) { encryptedCC.append("0"); @@ -122,7 +122,7 @@ public class PaymentUtil { String mm = String.valueOf(creditCardExpMM); String yy = String.valueOf(creditCardExpYY); - StringBuffer retValue = new StringBuffer(); + StringBuilder retValue = new StringBuilder(); if (mm.length() == 1) retValue.append("0"); retValue.append(mm); diff --git a/org.adempiere.base/src/org/compiere/Adempiere.java b/org.adempiere.base/src/org/compiere/Adempiere.java index 220ac1cc87..14b08dfd13 100644 --- a/org.adempiere.base/src/org/compiere/Adempiere.java +++ b/org.adempiere.base/src/org/compiere/Adempiere.java @@ -175,7 +175,7 @@ public final class Adempiere */ public static String getSum() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(NAME).append(" ").append(MAIN_VERSION).append(SUB_TITLE); return sb.toString(); } // getSum @@ -187,7 +187,7 @@ public final class Adempiere */ public static String getSummary() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(NAME).append(" ") .append(MAIN_VERSION).append("_").append(DATE_VERSION) .append(" -").append(SUB_TITLE) diff --git a/org.adempiere.base/src/org/compiere/acct/DocLine.java b/org.adempiere.base/src/org/compiere/acct/DocLine.java index 1da62ff4b2..4476cafa67 100644 --- a/org.adempiere.base/src/org/compiere/acct/DocLine.java +++ b/org.adempiere.base/src/org/compiere/acct/DocLine.java @@ -1125,7 +1125,7 @@ public class DocLine */ public String toString() { - StringBuffer sb = new StringBuffer("DocLine=["); + StringBuilder sb = new StringBuilder("DocLine=["); sb.append(p_po.get_ID()); if (getDescription() != null) sb.append(",").append(getDescription()); diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_BankStatement.java b/org.adempiere.base/src/org/compiere/acct/Doc_BankStatement.java index c687355495..6902151eef 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_BankStatement.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_BankStatement.java @@ -126,7 +126,7 @@ public class Doc_BankStatement extends Doc public BigDecimal getBalance() { BigDecimal retValue = Env.ZERO; - StringBuffer sb = new StringBuffer (" ["); + StringBuilder sb = new StringBuilder (" ["); // Total retValue = retValue.add(getAmount(Doc.AMTTYPE_Gross)); sb.append(getAmount(Doc.AMTTYPE_Gross)); diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_Cash.java b/org.adempiere.base/src/org/compiere/acct/Doc_Cash.java index 98f1553b80..4c6e36f6cd 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_Cash.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_Cash.java @@ -105,7 +105,7 @@ public class Doc_Cash extends Doc public BigDecimal getBalance() { BigDecimal retValue = Env.ZERO; - StringBuffer sb = new StringBuffer (" ["); + StringBuilder sb = new StringBuilder (" ["); // Total retValue = retValue.add(getAmount(Doc.AMTTYPE_Gross)); sb.append(getAmount(Doc.AMTTYPE_Gross)); diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_GLJournal.java b/org.adempiere.base/src/org/compiere/acct/Doc_GLJournal.java index 5f57629eee..ece3e6b811 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_GLJournal.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_GLJournal.java @@ -108,7 +108,7 @@ public class Doc_GLJournal extends Doc public BigDecimal getBalance() { BigDecimal retValue = Env.ZERO; - StringBuffer sb = new StringBuffer (" ["); + StringBuilder sb = new StringBuilder (" ["); // Lines for (int i = 0; i < p_lines.length; i++) { diff --git a/org.adempiere.base/src/org/compiere/acct/Fact.java b/org.adempiere.base/src/org/compiere/acct/Fact.java index d87b7a0816..9ddd5cbe10 100644 --- a/org.adempiere.base/src/org/compiere/acct/Fact.java +++ b/org.adempiere.base/src/org/compiere/acct/Fact.java @@ -796,7 +796,7 @@ public final class Fact */ public String toString() { - StringBuffer sb = new StringBuffer("Fact["); + StringBuilder sb = new StringBuilder("Fact["); sb.append(m_doc.toString()); sb.append(",").append(m_acctSchema.toString()); sb.append(",PostType=").append(m_postingType); @@ -933,7 +933,7 @@ public final class Fact */ public String toString () { - StringBuffer sb = new StringBuffer ("Balance["); + StringBuilder sb = new StringBuilder ("Balance["); sb.append ("DR=").append(DR) .append ("-CR=").append(CR) .append(" = ").append(getBalance()) diff --git a/org.adempiere.base/src/org/compiere/cm/CacheHandler.java b/org.adempiere.base/src/org/compiere/cm/CacheHandler.java index 0c2951cc6d..ad5522704a 100644 --- a/org.adempiere.base/src/org/compiere/cm/CacheHandler.java +++ b/org.adempiere.base/src/org/compiere/cm/CacheHandler.java @@ -155,7 +155,7 @@ public class CacheHandler { urlConn.connect(); Reader stream = new java.io.InputStreamReader( urlConn.getInputStream()); - StringBuffer srvOutput = new StringBuffer(); + StringBuilder srvOutput = new StringBuilder(); try { int c; diff --git a/org.adempiere.base/src/org/compiere/cm/StringUtil.java b/org.adempiere.base/src/org/compiere/cm/StringUtil.java index a6db67d412..7d0e52f3e9 100644 --- a/org.adempiere.base/src/org/compiere/cm/StringUtil.java +++ b/org.adempiere.base/src/org/compiere/cm/StringUtil.java @@ -117,7 +117,7 @@ public class StringUtil { * @return new String with result */ public static String replaceOne(String original, String search, String replace) { - StringBuffer toriginal = new StringBuffer(original); + StringBuilder toriginal = new StringBuilder(original); if (toriginal.toString().indexOf(search)>=0) { toriginal.replace(toriginal.toString().indexOf(search),toriginal.toString().indexOf(search)+search.length(),replace); } diff --git a/org.adempiere.base/src/org/compiere/db/CConnection.java b/org.adempiere.base/src/org/compiere/db/CConnection.java index df891990ac..6f77bc3a57 100644 --- a/org.adempiere.base/src/org/compiere/db/CConnection.java +++ b/org.adempiere.base/src/org/compiere/db/CConnection.java @@ -968,7 +968,7 @@ public class CConnection implements Serializable, Cloneable */ public String toString () { - StringBuffer sb = new StringBuffer (m_apps_host); + StringBuilder sb = new StringBuilder (m_apps_host); sb.append ("{").append (m_db_host) .append ("-").append (m_db_name) .append ("-").append (m_db_uid) @@ -982,7 +982,7 @@ public class CConnection implements Serializable, Cloneable */ public String toStringDetail () { - StringBuffer sb = new StringBuffer (m_apps_host); + StringBuilder sb = new StringBuilder (m_apps_host); sb.append ("{").append (m_db_host) .append ("-").append (m_db_name) .append ("-").append (m_db_uid) @@ -1019,7 +1019,7 @@ public class CConnection implements Serializable, Cloneable { if (m_dbInfo != null) return m_dbInfo; - StringBuffer sb = new StringBuffer (); + StringBuilder sb = new StringBuilder (); Connection conn = getConnection (true, Connection.TRANSACTION_READ_COMMITTED); if (conn != null) @@ -1053,7 +1053,7 @@ public class CConnection implements Serializable, Cloneable */ public String toStringLong () { - StringBuffer sb = new StringBuffer ("CConnection["); + StringBuilder sb = new StringBuilder ("CConnection["); sb.append ("name=").append (escape(m_name)) .append (",AppsHost=").append (escape(m_apps_host)) .append (",WebPort=").append (m_webPort) @@ -1197,7 +1197,7 @@ public class CConnection implements Serializable, Cloneable */ public String getInfo () { - StringBuffer sb = new StringBuffer (m_info[0] != null ? m_info[0] : ""); + StringBuilder sb = new StringBuilder (m_info[0] != null ? m_info[0] : ""); sb.append (" - ").append (m_info[1] != null ? m_info[1] : "") .append ("\n").append (getDatabase ().toString ()) .append ("\nAppsServerOK=").append (isAppsServerOK (false)) @@ -1471,7 +1471,7 @@ public class CConnection implements Serializable, Cloneable */ public String getStatus() { - StringBuffer sb = new StringBuffer (m_apps_host); + StringBuilder sb = new StringBuilder (m_apps_host); sb.append ("{").append (m_db_host) .append ("-").append (m_db_name) .append ("-").append (m_db_uid) diff --git a/org.adempiere.base/src/org/compiere/db/CreateAdempiere.java b/org.adempiere.base/src/org/compiere/db/CreateAdempiere.java index a74c73d929..54c82b4ab9 100644 --- a/org.adempiere.base/src/org/compiere/db/CreateAdempiere.java +++ b/org.adempiere.base/src/org/compiere/db/CreateAdempiere.java @@ -351,7 +351,7 @@ public class CreateAdempiere // MColumn[] columns = mTable.getColumns(false); - StringBuffer sb = new StringBuffer("CREATE TABLE "); + StringBuilder sb = new StringBuilder("CREATE TABLE "); sb.append(tableName).append(" ("); try { diff --git a/org.adempiere.base/src/org/compiere/dbPort/Convert.java b/org.adempiere.base/src/org/compiere/dbPort/Convert.java index edf38dd6d9..349694dd12 100644 --- a/org.adempiere.base/src/org/compiere/dbPort/Convert.java +++ b/org.adempiere.base/src/org/compiere/dbPort/Convert.java @@ -205,7 +205,7 @@ public abstract class Convert public String convertAll (String sqlStatements) { String[] sql = convert (sqlStatements); - StringBuffer sb = new StringBuffer (sqlStatements.length() + 10); + StringBuilder sb = new StringBuilder (sqlStatements.length() + 10); for (int i = 0; i < sql.length; i++) { // line.separator @@ -323,7 +323,7 @@ public abstract class Convert * @return string */ protected String recoverQuotedStrings(String retValue, VectorretVars) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (int i = 0; i < retVars.size(); i++) { //hengsin, special character in replacement can cause exception String replacement = (String) retVars.get(i); diff --git a/org.adempiere.base/src/org/compiere/dbPort/Convert_SQL92.java b/org.adempiere.base/src/org/compiere/dbPort/Convert_SQL92.java index e7522d55b5..c7fc608817 100644 --- a/org.adempiere.base/src/org/compiere/dbPort/Convert_SQL92.java +++ b/org.adempiere.base/src/org/compiere/dbPort/Convert_SQL92.java @@ -311,7 +311,7 @@ public abstract class Convert_SQL92 extends Convert { if (trace) log.info(newFrom.toString()); // - StringBuffer retValue = new StringBuffer (sqlStatement.length()+20); + StringBuilder retValue = new StringBuilder (sqlStatement.length()+20); retValue.append(selectPart) .append(newFrom).append(" ") .append(newWherePart).append(rest); @@ -334,7 +334,7 @@ public abstract class Convert_SQL92 extends Convert { { // log.info("DECODE<== " + sqlStatement); String statement = sqlStatement; - StringBuffer sb = new StringBuffer("CASE"); + StringBuilder sb = new StringBuilder("CASE"); int index = statement.toUpperCase().indexOf("DECODE", fromIndex); if (index <= 0) return sqlStatement; diff --git a/org.adempiere.base/src/org/compiere/dbPort/Join.java b/org.adempiere.base/src/org/compiere/dbPort/Join.java index ba8ed4e42b..84f338cce7 100644 --- a/org.adempiere.base/src/org/compiere/dbPort/Join.java +++ b/org.adempiere.base/src/org/compiere/dbPort/Join.java @@ -198,7 +198,7 @@ public class Join */ public String toString() { - StringBuffer sb = new StringBuffer ("Join["); + StringBuilder sb = new StringBuilder ("Join["); sb.append(m_joinClause) .append(" - Main=").append(m_mainTable).append("/").append(m_mainAlias) .append(", Join=").append(m_joinTable).append("/").append(m_joinAlias) diff --git a/org.adempiere.base/src/org/compiere/impexp/ImpFormatRow.java b/org.adempiere.base/src/org/compiere/impexp/ImpFormatRow.java index 9d4b77d7aa..9317e2870f 100644 --- a/org.adempiere.base/src/org/compiere/impexp/ImpFormatRow.java +++ b/org.adempiere.base/src/org/compiere/impexp/ImpFormatRow.java @@ -441,7 +441,7 @@ public final class ImpFormatRow retValue = retValue.substring(0, m_maxLength); // copy characters (wee need to look through anyway) - StringBuffer out = new StringBuffer(retValue.length()); + StringBuilder out = new StringBuilder(retValue.length()); for (int i = 0; i < retValue.length(); i++) { char c = retValue.charAt(i); @@ -477,7 +477,7 @@ public final class ImpFormatRow // remove everything but digits & '.' & '-' char[] charArray = info.toCharArray(); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (int i = 0; i < charArray.length; i++) if (Character.isDigit(charArray[i]) || charArray[i] == '.' || charArray[i] == '-') sb.append(charArray[i]); diff --git a/org.adempiere.base/src/org/compiere/impexp/OFX1ToXML.java b/org.adempiere.base/src/org/compiere/impexp/OFX1ToXML.java index 9853d643f4..bda4f78cfd 100644 --- a/org.adempiere.base/src/org/compiere/impexp/OFX1ToXML.java +++ b/org.adempiere.base/src/org/compiere/impexp/OFX1ToXML.java @@ -214,7 +214,7 @@ public final class OFX1ToXML extends InputStream implements Runnable if (text == null) return null; char c; - StringBuffer n = new StringBuffer (text.length () * 2); + StringBuilder n = new StringBuilder (text.length () * 2); for (int i = 0; i < text.length (); i++) { c = text.charAt (i); diff --git a/org.adempiere.base/src/org/compiere/model/AccessSqlParser.java b/org.adempiere.base/src/org/compiere/model/AccessSqlParser.java index 2ab50054fa..08466815ef 100644 --- a/org.adempiere.base/src/org/compiere/model/AccessSqlParser.java +++ b/org.adempiere.base/src/org/compiere/model/AccessSqlParser.java @@ -290,7 +290,7 @@ public class AccessSqlParser */ public String toString() { - StringBuffer sb = new StringBuffer("AccessSqlParser["); + StringBuilder sb = new StringBuilder("AccessSqlParser["); if (m_tableInfo == null) sb.append(m_sqlOriginal); else @@ -440,7 +440,7 @@ public class AccessSqlParser */ public String toString() { - StringBuffer sb = new StringBuffer(m_tableName); + StringBuilder sb = new StringBuilder(m_tableName); if (getSynonym().length() > 0) sb.append("=").append(m_synonym); return sb.toString(); diff --git a/org.adempiere.base/src/org/compiere/model/DataStatusEvent.java b/org.adempiere.base/src/org/compiere/model/DataStatusEvent.java index 9dcdc9eef7..18251591d4 100644 --- a/org.adempiere.base/src/org/compiere/model/DataStatusEvent.java +++ b/org.adempiere.base/src/org/compiere/model/DataStatusEvent.java @@ -217,7 +217,7 @@ public final class DataStatusEvent extends EventObject implements Serializable */ public String toString() { - StringBuffer sb = new StringBuffer("DataStatusEvent - "); + StringBuilder sb = new StringBuilder("DataStatusEvent - "); if (m_AD_Message != null) sb.append(m_AD_Message); if (m_info != null) @@ -240,7 +240,7 @@ public final class DataStatusEvent extends EventObject implements Serializable */ public String getMessage() { - StringBuffer retValue = new StringBuffer(); + StringBuilder retValue = new StringBuilder(); if (m_inserting) retValue.append("+"); retValue.append(m_changed ? (m_autoSave ? "*" : "?") : " "); diff --git a/org.adempiere.base/src/org/compiere/model/GridField.java b/org.adempiere.base/src/org/compiere/model/GridField.java index f9a2f2ed30..c4f5de772f 100644 --- a/org.adempiere.base/src/org/compiere/model/GridField.java +++ b/org.adempiere.base/src/org/compiere/model/GridField.java @@ -298,7 +298,7 @@ public class GridField // if (list.size() > 0 && CLogMgt.isLevelFiner()) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (int i = 0; i < list.size(); i++) sb.append(list.get(i)).append(" "); log.finer("(" + m_vo.ColumnName + ") " + sb.toString()); @@ -1676,7 +1676,7 @@ public class GridField */ public String toStringX() { - StringBuffer sb = new StringBuffer("MField["); + StringBuilder sb = new StringBuilder("MField["); sb.append(m_vo.ColumnName).append("=").append(m_value) .append(",DisplayType=").append(getDisplayType()) .append("]"); diff --git a/org.adempiere.base/src/org/compiere/model/GridTab.java b/org.adempiere.base/src/org/compiere/model/GridTab.java index 7f3ee10bdc..0d95008455 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTab.java +++ b/org.adempiere.base/src/org/compiere/model/GridTab.java @@ -473,7 +473,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable // if (list.size() > 0 && CLogMgt.isLevelFiner()) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (int i = 0; i < list.size(); i++) sb.append(list.get(i)).append(" "); log.finer("(" + m_vo.Name + ") " + sb.toString()); @@ -2335,7 +2335,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable e.UpdatedBy = (Integer)getValue("UpdatedBy"); e.Record_ID = getValue(m_keyColumnName); // Info - StringBuffer info = new StringBuffer(getTableName()); + StringBuilder info = new StringBuilder(getTableName()); /* get UUID */ if (!e.isInserting() && e.getCurrentRow() >= 0 && e.getCurrentRow() < e.getTotalRows()) diff --git a/org.adempiere.base/src/org/compiere/model/GridTable.java b/org.adempiere.base/src/org/compiere/model/GridTable.java index 95f2a31a37..1c7d7398dc 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTable.java +++ b/org.adempiere.base/src/org/compiere/model/GridTable.java @@ -325,7 +325,7 @@ public class GridTable extends AbstractTableModel return ""; // Create SELECT Part - StringBuffer select = new StringBuffer("SELECT "); + StringBuilder select = new StringBuilder("SELECT "); for (int i = 0; i < m_fields.size(); i++) { if (i > 0) @@ -354,7 +354,7 @@ public class GridTable extends AbstractTableModel } } - StringBuffer where = new StringBuffer(""); + StringBuilder where = new StringBuilder(""); // WHERE if (m_whereClause.length() > 0) { @@ -1093,7 +1093,7 @@ public class GridTable extends AbstractTableModel start = 0; } } - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); sql.append(m_SQL_Select) .append(" WHERE ") .append(getKeyColumnName()) @@ -1509,7 +1509,7 @@ public class GridTable extends AbstractTableModel final String INFO = "Info: "; // Update SQL with specific where clause - StringBuffer select = new StringBuffer("SELECT "); + StringBuilder select = new StringBuilder("SELECT "); for (int i = 0, addedColumns = 0; i < m_fields.size(); i++) { GridField field = (GridField)m_fields.get(i); @@ -1522,8 +1522,8 @@ public class GridTable extends AbstractTableModel } // select.append(" FROM ").append(m_tableName); - StringBuffer singleRowWHERE = new StringBuffer(); - StringBuffer multiRowWHERE = new StringBuffer(); + StringBuilder singleRowWHERE = new StringBuilder(); + StringBuilder multiRowWHERE = new StringBuilder(); // Create SQL & RowID if (m_inserting) select.append(" WHERE 1=2"); @@ -1626,7 +1626,7 @@ public class GridTable extends AbstractTableModel createUpdateSql (columnName, DB.TO_STRING (str)); else rs.updateString (colRs, str); // *** - singleRowWHERE = new StringBuffer(); // overwrite + singleRowWHERE = new StringBuilder(); // overwrite singleRowWHERE.append (columnName).append ("=").append (DB.TO_STRING(str)); // is = INFO + columnName + " -> " + str + " (StringKey)"; @@ -1917,7 +1917,7 @@ public class GridTable extends AbstractTableModel singleRowWHERE.append (columnName).append ("=").append (rowData[col]); else { - singleRowWHERE = new StringBuffer(); // overwrite + singleRowWHERE = new StringBuilder(); // overwrite singleRowWHERE.append (columnName).append ("=").append (DB.TO_STRING(rowData[col].toString())); } } @@ -2316,7 +2316,7 @@ public class GridTable extends AbstractTableModel */ private String createUpdateSql (boolean insert, String whereClause) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); if (insert) { sb.append("INSERT INTO ").append(m_tableName).append(" ("); @@ -2369,7 +2369,7 @@ public class GridTable extends AbstractTableModel private String getMandatory(Object[] rowData) { // see also => ProcessParameter.saveParameter - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); // Check all columns int size = m_fields.size(); @@ -2614,7 +2614,7 @@ public class GridTable extends AbstractTableModel } else // Delete via SQL { - StringBuffer sql = new StringBuffer("DELETE "); + StringBuilder sql = new StringBuilder("DELETE "); sql.append(m_tableName).append(" WHERE ").append(getWhereClause(rowData)); int no = 0; PreparedStatement pstmt = null; @@ -3380,7 +3380,7 @@ public class GridTable extends AbstractTableModel { DB.close(rs, pstmt); } - StringBuffer info = new StringBuffer("Rows="); + StringBuilder info = new StringBuilder("Rows="); info.append(rows); if (rows == 0) info.append(" - ").append(m_SQL_Count); diff --git a/org.adempiere.base/src/org/compiere/model/LookupDisplayColumn.java b/org.adempiere.base/src/org/compiere/model/LookupDisplayColumn.java index e594c669db..1907fff90e 100644 --- a/org.adempiere.base/src/org/compiere/model/LookupDisplayColumn.java +++ b/org.adempiere.base/src/org/compiere/model/LookupDisplayColumn.java @@ -90,7 +90,7 @@ public class LookupDisplayColumn implements Serializable */ public String toString() { - StringBuffer sb = new StringBuffer("LookupDisplayColumn["); + StringBuilder sb = new StringBuilder("LookupDisplayColumn["); sb.append("ColumnName=").append(ColumnName); if (IsVirtual) sb.append(",ColumnSQL=").append(ColumnSQL); diff --git a/org.adempiere.base/src/org/compiere/model/MAssetAcct.java b/org.adempiere.base/src/org/compiere/model/MAssetAcct.java index 0b9b69848d..45f93ea304 100644 --- a/org.adempiere.base/src/org/compiere/model/MAssetAcct.java +++ b/org.adempiere.base/src/org/compiere/model/MAssetAcct.java @@ -93,7 +93,7 @@ public class MAssetAcct extends X_A_Asset_Acct } // ArrayList params = new ArrayList(); - StringBuffer whereClause = new StringBuffer(COLUMNNAME_A_Asset_ID+"=? AND "+COLUMNNAME_PostingType+"=?"); + StringBuilder whereClause = new StringBuilder(COLUMNNAME_A_Asset_ID+"=? AND "+COLUMNNAME_PostingType+"=?"); params.add(A_Asset_ID); params.add(postingType); if (dateAcct != null) diff --git a/org.adempiere.base/src/org/compiere/model/MAssetAddition.java b/org.adempiere.base/src/org/compiere/model/MAssetAddition.java index 92df99c84b..de9f65b4da 100644 --- a/org.adempiere.base/src/org/compiere/model/MAssetAddition.java +++ b/org.adempiere.base/src/org/compiere/model/MAssetAddition.java @@ -579,7 +579,7 @@ public class MAssetAddition extends X_A_Asset_Addition .list(); if (list.size() > 0) { - StringBuffer sb = new StringBuffer("You can not create project for this asset," + StringBuilder sb = new StringBuilder("You can not create project for this asset," +" Project already has assets. View: "); for (MAssetAddition aa : list) { @@ -922,7 +922,7 @@ public class MAssetAddition extends X_A_Asset_Addition public String getSummary() { MAsset asset = getA_Asset(false); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("@DocumentNo@ #").append(getDocumentNo()) .append(": @A_CreateAsset@=@").append(isA_CreateAsset() ? "Y" : "N").append("@") ; @@ -1145,7 +1145,7 @@ public class MAssetAddition extends X_A_Asset_Addition public String toString() { - StringBuffer sb = new StringBuffer("@DocumentNo@: " + getDocumentNo()); + StringBuilder sb = new StringBuilder("@DocumentNo@: " + getDocumentNo()); MAsset asset = getA_Asset(false); if(asset != null && asset.get_ID() > 0) { diff --git a/org.adempiere.base/src/org/compiere/model/MAssetClass.java b/org.adempiere.base/src/org/compiere/model/MAssetClass.java index cf113e0fc9..0e5cb64f14 100644 --- a/org.adempiere.base/src/org/compiere/model/MAssetClass.java +++ b/org.adempiere.base/src/org/compiere/model/MAssetClass.java @@ -77,7 +77,7 @@ public class MAssetClass extends X_A_Asset_Class * */ public void setDescription() { - StringBuffer description = new StringBuffer(); + StringBuilder description = new StringBuilder(); String value = getValue(); if (value != null) { description.append(value).append(" "); diff --git a/org.adempiere.base/src/org/compiere/model/MAssetReval.java b/org.adempiere.base/src/org/compiere/model/MAssetReval.java index 2241df3cf5..910347b021 100644 --- a/org.adempiere.base/src/org/compiere/model/MAssetReval.java +++ b/org.adempiere.base/src/org/compiere/model/MAssetReval.java @@ -195,7 +195,7 @@ implements DocAction public String getSummary() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("@DocumentNo@ #").append(getDocumentNo()); return sb.toString(); } diff --git a/org.adempiere.base/src/org/compiere/model/MAssetTransfer.java b/org.adempiere.base/src/org/compiere/model/MAssetTransfer.java index c85be7ad7d..8075d52a82 100644 --- a/org.adempiere.base/src/org/compiere/model/MAssetTransfer.java +++ b/org.adempiere.base/src/org/compiere/model/MAssetTransfer.java @@ -113,7 +113,7 @@ implements DocAction public String getSummary() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("@DocumentNo@ #").append(getDocumentNo()); return sb.toString(); } diff --git a/org.adempiere.base/src/org/compiere/model/MDepreciationWorkfile.java b/org.adempiere.base/src/org/compiere/model/MDepreciationWorkfile.java index c20ca9d586..9b27c14030 100644 --- a/org.adempiere.base/src/org/compiere/model/MDepreciationWorkfile.java +++ b/org.adempiere.base/src/org/compiere/model/MDepreciationWorkfile.java @@ -600,7 +600,7 @@ public class MDepreciationWorkfile extends X_A_Depreciation_Workfile return; } - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); load(get_TrxName()); // reload workfile MAssetAcct assetacct = getA_AssetAcct(null, get_TrxName()); // TODO: teo_sarca: need to evaluate what happens when we change Depreciation method !!! diff --git a/org.adempiere.base/src/org/compiere/model/MLotCtl.java b/org.adempiere.base/src/org/compiere/model/MLotCtl.java index 6652e2d4b5..3b48638418 100644 --- a/org.adempiere.base/src/org/compiere/model/MLotCtl.java +++ b/org.adempiere.base/src/org/compiere/model/MLotCtl.java @@ -70,7 +70,7 @@ public class MLotCtl extends X_M_LotCtl */ public MLot createLot (int M_Product_ID) { - StringBuffer name = new StringBuffer(); + StringBuilder name = new StringBuilder(); if (getPrefix() != null) name.append(getPrefix()); int no = getCurrentNext(); diff --git a/org.adempiere.base/src/org/compiere/model/MMovement.java b/org.adempiere.base/src/org/compiere/model/MMovement.java index 5af524b9e0..5cd5153675 100644 --- a/org.adempiere.base/src/org/compiere/model/MMovement.java +++ b/org.adempiere.base/src/org/compiere/model/MMovement.java @@ -852,7 +852,7 @@ public class MMovement extends X_M_Movement implements DocAction */ public String getSummary() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(getDocumentNo()); // : Total Lines = 123.00 (#1) sb.append(": ") diff --git a/org.adempiere.base/src/org/compiere/model/MMovementConfirm.java b/org.adempiere.base/src/org/compiere/model/MMovementConfirm.java index f8eb985053..50633e3a54 100644 --- a/org.adempiere.base/src/org/compiere/model/MMovementConfirm.java +++ b/org.adempiere.base/src/org/compiere/model/MMovementConfirm.java @@ -641,7 +641,7 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction */ public String getSummary() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(getDocumentNo()); // : Total Lines = 123.00 (#1) sb.append(": ") diff --git a/org.adempiere.base/src/org/compiere/model/MMovementLineMA.java b/org.adempiere.base/src/org/compiere/model/MMovementLineMA.java index 0dfe038b46..5972f4d489 100644 --- a/org.adempiere.base/src/org/compiere/model/MMovementLineMA.java +++ b/org.adempiere.base/src/org/compiere/model/MMovementLineMA.java @@ -162,7 +162,7 @@ public class MMovementLineMA extends X_M_MovementLineMA */ public String toString () { - StringBuffer sb = new StringBuffer ("MMovementLineMA["); + StringBuilder sb = new StringBuilder ("MMovementLineMA["); sb.append("M_MovementLine_ID=").append(getM_MovementLine_ID()) .append(",M_AttributeSetInstance_ID=").append(getM_AttributeSetInstance_ID()) .append(", Qty=").append(getMovementQty()) diff --git a/org.adempiere.base/src/org/compiere/model/MOrder.java b/org.adempiere.base/src/org/compiere/model/MOrder.java index 8a801b4ed2..62b9feb994 100644 --- a/org.adempiere.base/src/org/compiere/model/MOrder.java +++ b/org.adempiere.base/src/org/compiere/model/MOrder.java @@ -662,7 +662,7 @@ public class MOrder extends X_C_Order implements DocAction public MOrderLine[] getLines (String whereClause, String orderClause) { //red1 - using new Query class from Teo / Victor's MDDOrder.java implementation - StringBuffer whereClauseFinal = new StringBuffer(MOrderLine.COLUMNNAME_C_Order_ID+"=? "); + StringBuilder whereClauseFinal = new StringBuilder(MOrderLine.COLUMNNAME_C_Order_ID+"=? "); if (!Util.isEmpty(whereClause, true)) whereClauseFinal.append(whereClause); if (orderClause.length() == 0) @@ -1780,7 +1780,7 @@ public class MOrder extends X_C_Order implements DocAction approveIt(); getLines(true,null); log.info(toString()); - StringBuffer info = new StringBuffer(); + StringBuilder info = new StringBuilder(); boolean realTimePOS = MSysConfig.getBooleanValue(MSysConfig.REAL_TIME_POS, false , getAD_Client_ID()); @@ -2311,7 +2311,7 @@ public class MOrder extends X_C_Order implements DocAction return true; log.info("createReversals"); - StringBuffer info = new StringBuffer(); + StringBuilder info = new StringBuilder(); // Reverse All *Shipments* info.append("@M_InOut_ID@:"); @@ -2594,7 +2594,7 @@ public class MOrder extends X_C_Order implements DocAction */ public String getSummary() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(getDocumentNo()); // : Grand Total = 123.00 (#1) sb.append(": "). diff --git a/org.adempiere.base/src/org/compiere/model/MOrderPaySchedule.java b/org.adempiere.base/src/org/compiere/model/MOrderPaySchedule.java index 993f869ed9..aee979ef70 100644 --- a/org.adempiere.base/src/org/compiere/model/MOrderPaySchedule.java +++ b/org.adempiere.base/src/org/compiere/model/MOrderPaySchedule.java @@ -205,7 +205,7 @@ public class MOrderPaySchedule extends X_C_OrderPaySchedule */ public String toString() { - StringBuffer sb = new StringBuffer("MOrderPaySchedule["); + StringBuilder sb = new StringBuilder("MOrderPaySchedule["); sb.append(get_ID()).append("-Due=" + getDueDate() + "/" + getDueAmt()) .append(";Discount=").append(getDiscountDate() + "/" + getDiscountAmt()) .append("]"); diff --git a/org.adempiere.base/src/org/compiere/model/MPInstanceLog.java b/org.adempiere.base/src/org/compiere/model/MPInstanceLog.java index 2e532e9aed..672b633dc3 100644 --- a/org.adempiere.base/src/org/compiere/model/MPInstanceLog.java +++ b/org.adempiere.base/src/org/compiere/model/MPInstanceLog.java @@ -82,7 +82,7 @@ public class MPInstanceLog */ public String toString () { - StringBuffer sb = new StringBuffer("PPInstance_Log["); + StringBuilder sb = new StringBuilder("PPInstance_Log["); sb.append(m_Log_ID); if (m_P_Date != null) sb.append(",Date=").append(m_P_Date); @@ -103,7 +103,7 @@ public class MPInstanceLog */ public boolean save () { - StringBuffer sql = new StringBuffer("INSERT INTO AD_PInstance_Log " + StringBuilder sql = new StringBuilder("INSERT INTO AD_PInstance_Log " + "(AD_PInstance_ID, Log_ID, P_Date, P_ID, P_Number, P_Msg)" + " VALUES ("); sql.append(m_AD_PInstance_ID).append(",") diff --git a/org.adempiere.base/src/org/compiere/model/MPaySelection.java b/org.adempiere.base/src/org/compiere/model/MPaySelection.java index 5e5fa68e2f..fdcd931fc4 100644 --- a/org.adempiere.base/src/org/compiere/model/MPaySelection.java +++ b/org.adempiere.base/src/org/compiere/model/MPaySelection.java @@ -119,7 +119,7 @@ public class MPaySelection extends X_C_PaySelection */ public String toString() { - StringBuffer sb = new StringBuffer("MPaySelection["); + StringBuilder sb = new StringBuilder("MPaySelection["); sb.append(get_ID()).append(",").append(getName()) .append("]"); return sb.toString(); diff --git a/org.adempiere.base/src/org/compiere/model/MPaySelectionCheck.java b/org.adempiere.base/src/org/compiere/model/MPaySelectionCheck.java index cd4427dd57..d8c6d07113 100644 --- a/org.adempiere.base/src/org/compiere/model/MPaySelectionCheck.java +++ b/org.adempiere.base/src/org/compiere/model/MPaySelectionCheck.java @@ -520,7 +520,7 @@ public final class MPaySelectionCheck extends X_C_PaySelectionCheck */ public String toString() { - StringBuffer sb = new StringBuffer("MPaymentCheck["); + StringBuilder sb = new StringBuilder("MPaymentCheck["); sb.append(get_ID()).append("-").append(getDocumentNo()) .append("-").append(getPayAmt()) .append(",PaymetRule=").append(getPaymentRule()) diff --git a/org.adempiere.base/src/org/compiere/model/MPaySelectionLine.java b/org.adempiere.base/src/org/compiere/model/MPaySelectionLine.java index b16bf77a8d..c917142cc1 100644 --- a/org.adempiere.base/src/org/compiere/model/MPaySelectionLine.java +++ b/org.adempiere.base/src/org/compiere/model/MPaySelectionLine.java @@ -173,7 +173,7 @@ public class MPaySelectionLine extends X_C_PaySelectionLine */ public String toString() { - StringBuffer sb = new StringBuffer("MPaySelectionLine["); + StringBuilder sb = new StringBuilder("MPaySelectionLine["); sb.append(get_ID()).append(",C_Invoice_ID=").append(getC_Invoice_ID()) .append(",PayAmt=").append(getPayAmt()) .append(",DifferenceAmt=").append(getDifferenceAmt()) diff --git a/org.adempiere.base/src/org/compiere/model/MPayment.java b/org.adempiere.base/src/org/compiere/model/MPayment.java index 5a71c82097..288c3b892f 100644 --- a/org.adempiere.base/src/org/compiere/model/MPayment.java +++ b/org.adempiere.base/src/org/compiere/model/MPayment.java @@ -557,7 +557,7 @@ public final class MPayment extends X_C_Payment history.setIsError(!approved); history.setProcessed(approved); - StringBuffer msg = new StringBuffer(); + StringBuilder msg = new StringBuilder(); if (approved) { if(getTrxType().equals(TRXTYPE_Void) || getTrxType().equals(TRXTYPE_CreditPayment)) @@ -1074,7 +1074,7 @@ public final class MPayment extends X_C_Payment String mm = String.valueOf(getCreditCardExpMM()); String yy = String.valueOf(getCreditCardExpYY()); - StringBuffer retValue = new StringBuffer(); + StringBuilder retValue = new StringBuilder(); if (mm.length() == 1) retValue.append("0"); retValue.append(mm); @@ -1935,7 +1935,7 @@ public final class MPayment extends X_C_Payment cl.setDescription("Generated From Payment #" + getDocumentNo()); cl.setC_Currency_ID( this.getC_Currency_ID() ); cl.setC_Payment_ID( getC_Payment_ID() ); // Set Reference to payment. - StringBuffer info=new StringBuffer(); + StringBuilder info=new StringBuilder(); info.append("Cash journal ( ") .append(cash.getDocumentNo()).append(" )"); m_processMsg = info.toString(); @@ -2665,7 +2665,7 @@ public final class MPayment extends X_C_Payment */ public String toString () { - StringBuffer sb = new StringBuffer ("MPayment["); + StringBuilder sb = new StringBuilder ("MPayment["); sb.append(get_ID()).append("-").append(getDocumentNo()) .append(",Receipt=").append(isReceipt()) .append(",PayAmt=").append(getPayAmt()) @@ -2723,7 +2723,7 @@ public final class MPayment extends X_C_Payment */ public String getSummary() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(getDocumentNo()); // : Total Lines = 123.00 (#1) sb.append(": ") diff --git a/org.adempiere.base/src/org/compiere/model/MPaymentTerm.java b/org.adempiere.base/src/org/compiere/model/MPaymentTerm.java index 9fb4f6902f..c9e54d79c3 100644 --- a/org.adempiere.base/src/org/compiere/model/MPaymentTerm.java +++ b/org.adempiere.base/src/org/compiere/model/MPaymentTerm.java @@ -398,7 +398,7 @@ public class MPaymentTerm extends X_C_PaymentTerm */ public String toString () { - StringBuffer sb = new StringBuffer ("MPaymentTerm["); + StringBuilder sb = new StringBuilder ("MPaymentTerm["); sb.append(get_ID()).append("-").append(getName()) .append(",Valid=").append(isValid()) .append ("]"); diff --git a/org.adempiere.base/src/org/compiere/model/MPaymentTransaction.java b/org.adempiere.base/src/org/compiere/model/MPaymentTransaction.java index 28877897ab..bda8d64762 100644 --- a/org.adempiere.base/src/org/compiere/model/MPaymentTransaction.java +++ b/org.adempiere.base/src/org/compiere/model/MPaymentTransaction.java @@ -284,7 +284,7 @@ public class MPaymentTransaction extends X_C_PaymentTransaction implements Proce history.setIsError(!(approved && processed)); history.setProcessed(approved && processed); - StringBuffer msg = new StringBuffer(); + StringBuilder msg = new StringBuilder(); if (approved) { if(getTrxType().equals(TRXTYPE_Void) || getTrxType().equals(TRXTYPE_CreditPayment)) diff --git a/org.adempiere.base/src/org/compiere/model/MPaymentValidate.java b/org.adempiere.base/src/org/compiere/model/MPaymentValidate.java index 6d0c29bf9d..5e3a6af810 100644 --- a/org.adempiere.base/src/org/compiere/model/MPaymentValidate.java +++ b/org.adempiere.base/src/org/compiere/model/MPaymentValidate.java @@ -165,7 +165,7 @@ public class MPaymentValidate String ccNumber1 = checkNumeric(creditCardNumber); int ccLength = ccNumber1.length(); // Reverse string - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); for (int i = ccLength; i != 0; i--) buf.append(ccNumber1.charAt(i-1)); String ccNumber = buf.toString(); @@ -429,7 +429,7 @@ public class MPaymentValidate if (data == null || data.length() == 0) return ""; // Remove all non Digits - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (int i = 0; i < data.length(); i++) { if (Character.isDigit(data.charAt(i))) diff --git a/org.adempiere.base/src/org/compiere/model/MPeriod.java b/org.adempiere.base/src/org/compiere/model/MPeriod.java index 8ef3d97f72..0fdcf80a44 100644 --- a/org.adempiere.base/src/org/compiere/model/MPeriod.java +++ b/org.adempiere.base/src/org/compiere/model/MPeriod.java @@ -642,7 +642,7 @@ public class MPeriod extends X_C_Period */ public String toString () { - StringBuffer sb = new StringBuffer ("MPeriod["); + StringBuilder sb = new StringBuilder ("MPeriod["); sb.append (get_ID()) .append("-").append (getName()) .append(", ").append(getStartDate()).append("-").append(getEndDate()) diff --git a/org.adempiere.base/src/org/compiere/model/MPeriodControl.java b/org.adempiere.base/src/org/compiere/model/MPeriodControl.java index 2abef64e0a..c24d79a8c7 100644 --- a/org.adempiere.base/src/org/compiere/model/MPeriodControl.java +++ b/org.adempiere.base/src/org/compiere/model/MPeriodControl.java @@ -106,7 +106,7 @@ public class MPeriodControl extends X_C_PeriodControl */ public String toString () { - StringBuffer sb = new StringBuffer ("MPeriodControl["); + StringBuilder sb = new StringBuilder ("MPeriodControl["); sb.append(get_ID()).append(",").append(getDocBaseType()) .append(",Status=").append(getPeriodStatus()) .append ("]"); diff --git a/org.adempiere.base/src/org/compiere/model/MPreference.java b/org.adempiere.base/src/org/compiere/model/MPreference.java index 6bdd04681a..ec55df6d7c 100644 --- a/org.adempiere.base/src/org/compiere/model/MPreference.java +++ b/org.adempiere.base/src/org/compiere/model/MPreference.java @@ -97,7 +97,7 @@ public class MPreference extends X_AD_Preference */ public String toString () { - StringBuffer sb = new StringBuffer ("MPreference["); + StringBuilder sb = new StringBuilder ("MPreference["); sb.append (get_ID()).append("-") .append(getAttribute()).append("-").append(getValue()) .append ("]"); diff --git a/org.adempiere.base/src/org/compiere/model/MProduct.java b/org.adempiere.base/src/org/compiere/model/MProduct.java index c6f3a768a0..c0b092b402 100644 --- a/org.adempiere.base/src/org/compiere/model/MProduct.java +++ b/org.adempiere.base/src/org/compiere/model/MProduct.java @@ -556,7 +556,7 @@ public class MProduct extends X_M_Product @Override public String toString() { - StringBuffer sb = new StringBuffer("MProduct["); + StringBuilder sb = new StringBuilder("MProduct["); sb.append(get_ID()).append("-").append(getValue()) .append("]"); return sb.toString(); diff --git a/org.adempiere.base/src/org/compiere/model/MProductBOM.java b/org.adempiere.base/src/org/compiere/model/MProductBOM.java index e620e306c3..b985c72f6e 100644 --- a/org.adempiere.base/src/org/compiere/model/MProductBOM.java +++ b/org.adempiere.base/src/org/compiere/model/MProductBOM.java @@ -136,7 +136,7 @@ public class MProductBOM extends X_M_Product_BOM */ public String toString() { - StringBuffer sb = new StringBuffer("MProductBOM["); + StringBuilder sb = new StringBuilder("MProductBOM["); sb.append(get_ID()).append(",Line=").append(getLine()) .append(",Type=").append(getBOMType()).append(",Qty=").append(getBOMQty()); if (m_product == null) diff --git a/org.adempiere.base/src/org/compiere/model/MProductCategoryAcct.java b/org.adempiere.base/src/org/compiere/model/MProductCategoryAcct.java index 594b7567aa..638573ac43 100644 --- a/org.adempiere.base/src/org/compiere/model/MProductCategoryAcct.java +++ b/org.adempiere.base/src/org/compiere/model/MProductCategoryAcct.java @@ -115,7 +115,7 @@ public class MProductCategoryAcct extends X_M_Product_Category_Acct */ public String toString() { - StringBuffer sb = new StringBuffer ("MProductCategoryAcct["); + StringBuilder sb = new StringBuilder ("MProductCategoryAcct["); sb.append (get_ID()) .append (",M_Product_Category_ID=").append (getM_Product_Category_ID()) .append (",C_AcctSchema_ID=").append(getC_AcctSchema_ID()) diff --git a/org.adempiere.base/src/org/compiere/model/MProductPrice.java b/org.adempiere.base/src/org/compiere/model/MProductPrice.java index e35bef4eb9..67e6c31b2d 100644 --- a/org.adempiere.base/src/org/compiere/model/MProductPrice.java +++ b/org.adempiere.base/src/org/compiere/model/MProductPrice.java @@ -152,7 +152,7 @@ public class MProductPrice extends X_M_ProductPrice */ public String toString() { - StringBuffer sb = new StringBuffer ("MProductPrice["); + StringBuilder sb = new StringBuilder ("MProductPrice["); sb.append(getM_PriceList_Version_ID()) .append(",M_Product_ID=").append (getM_Product_ID()) .append(",PriceList=").append(getPriceList()) diff --git a/org.adempiere.base/src/org/compiere/model/MProductionLine.java b/org.adempiere.base/src/org/compiere/model/MProductionLine.java index ee0ddebe1e..264eb60d29 100644 --- a/org.adempiere.base/src/org/compiere/model/MProductionLine.java +++ b/org.adempiere.base/src/org/compiere/model/MProductionLine.java @@ -79,7 +79,7 @@ public class MProductionLine extends X_M_ProductionLine { log.log(Level.FINE, "Production Line " + getLine() + " does not require stock movement"); return ""; } - StringBuffer errorString = new StringBuffer(); + StringBuilder errorString = new StringBuilder(); MAttributeSetInstance asi = new MAttributeSetInstance(getCtx(), getM_AttributeSetInstance_ID(), get_TrxName()); String asiString = asi.getDescription(); diff --git a/org.adempiere.base/src/org/compiere/model/MProjectLine.java b/org.adempiere.base/src/org/compiere/model/MProjectLine.java index 59e1592afb..e43a2025bc 100644 --- a/org.adempiere.base/src/org/compiere/model/MProjectLine.java +++ b/org.adempiere.base/src/org/compiere/model/MProjectLine.java @@ -161,7 +161,7 @@ public class MProjectLine extends X_C_ProjectLine */ public String toString () { - StringBuffer sb = new StringBuffer ("MProjectLine["); + StringBuilder sb = new StringBuilder ("MProjectLine["); sb.append (get_ID()).append ("-") .append (getLine()) .append(",C_Project_ID=").append(getC_Project_ID()) diff --git a/org.adempiere.base/src/org/compiere/model/MProjectPhase.java b/org.adempiere.base/src/org/compiere/model/MProjectPhase.java index af02ba0bd4..c4ef54abd3 100644 --- a/org.adempiere.base/src/org/compiere/model/MProjectPhase.java +++ b/org.adempiere.base/src/org/compiere/model/MProjectPhase.java @@ -276,7 +276,7 @@ public class MProjectPhase extends X_C_ProjectPhase */ public String toString () { - StringBuffer sb = new StringBuffer ("MProjectPhase["); + StringBuilder sb = new StringBuilder ("MProjectPhase["); sb.append (get_ID()) .append ("-").append (getSeqNo()) .append ("-").append (getName()) diff --git a/org.adempiere.base/src/org/compiere/model/MProjectTask.java b/org.adempiere.base/src/org/compiere/model/MProjectTask.java index 07463f44e7..172effcca2 100644 --- a/org.adempiere.base/src/org/compiere/model/MProjectTask.java +++ b/org.adempiere.base/src/org/compiere/model/MProjectTask.java @@ -157,7 +157,7 @@ public class MProjectTask extends X_C_ProjectTask */ public String toString () { - StringBuffer sb = new StringBuffer ("MProjectTask["); + StringBuilder sb = new StringBuilder ("MProjectTask["); sb.append (get_ID()) .append ("-").append (getSeqNo()) .append ("-").append (getName()) diff --git a/org.adempiere.base/src/org/compiere/model/MProjectType.java b/org.adempiere.base/src/org/compiere/model/MProjectType.java index 110f0a4b13..f70c97f51e 100644 --- a/org.adempiere.base/src/org/compiere/model/MProjectType.java +++ b/org.adempiere.base/src/org/compiere/model/MProjectType.java @@ -163,7 +163,7 @@ public class MProjectType extends X_C_ProjectType String bpColumn = "C_BPartner_ID"; String pColumn = null; // PlannedAmt -> PlannedQty -> Count - StringBuffer sb = new StringBuffer("SELECT COALESCE(SUM(PlannedAmt),COALESCE(SUM(PlannedQty),COUNT(*))) " + StringBuilder sb = new StringBuilder("SELECT COALESCE(SUM(PlannedAmt),COALESCE(SUM(PlannedQty),COUNT(*))) " + "FROM C_Project WHERE C_ProjectType_ID=" + getC_ProjectType_ID() + " AND Processed<>'Y')"); // Date Restriction @@ -215,7 +215,7 @@ public class MProjectType extends X_C_ProjectType String bpColumn = "C_BPartner_ID"; String pColumn = null; // - StringBuffer sb = new StringBuffer("SELECT COALESCE(SUM(PlannedAmt),COALESCE(SUM(PlannedQty),COUNT(*))), "); + StringBuilder sb = new StringBuilder("SELECT COALESCE(SUM(PlannedAmt),COALESCE(SUM(PlannedQty),COUNT(*))), "); String orderBy = null; String groupBy = null; // diff --git a/org.adempiere.base/src/org/compiere/model/MRMA.java b/org.adempiere.base/src/org/compiere/model/MRMA.java index 448ed3d2ff..926553edf2 100644 --- a/org.adempiere.base/src/org/compiere/model/MRMA.java +++ b/org.adempiere.base/src/org/compiere/model/MRMA.java @@ -806,7 +806,7 @@ public class MRMA extends X_M_RMA implements DocAction */ public String getSummary() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(getDocumentNo()); // : Total Lines = 123.00 (#1) sb.append(": "). @@ -824,7 +824,7 @@ public class MRMA extends X_M_RMA implements DocAction */ public MRMALine[] getChargeLines() { - StringBuffer whereClause = new StringBuffer(); + StringBuilder whereClause = new StringBuilder(); whereClause.append("IsActive='Y' AND M_RMA_ID="); whereClause.append(get_ID()); whereClause.append(" AND C_Charge_ID IS NOT null"); diff --git a/org.adempiere.base/src/org/compiere/model/MRecordAccess.java b/org.adempiere.base/src/org/compiere/model/MRecordAccess.java index 6ee69fad29..7104d96dbd 100644 --- a/org.adempiere.base/src/org/compiere/model/MRecordAccess.java +++ b/org.adempiere.base/src/org/compiere/model/MRecordAccess.java @@ -224,7 +224,7 @@ public class MRecordAccess extends X_AD_Record_Access { String in = Msg.getMsg(ctx, "Include"); String ex = Msg.getMsg(ctx, "Exclude"); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(Msg.translate(ctx, "AD_Table_ID")) .append("=").append(getTableName(ctx)).append(", ") .append(Msg.translate(ctx, "Record_ID")) diff --git a/org.adempiere.base/src/org/compiere/model/MRegistrationValue.java b/org.adempiere.base/src/org/compiere/model/MRegistrationValue.java index ca332e9a13..edd92f67ff 100644 --- a/org.adempiere.base/src/org/compiere/model/MRegistrationValue.java +++ b/org.adempiere.base/src/org/compiere/model/MRegistrationValue.java @@ -139,7 +139,7 @@ public class MRegistrationValue extends X_A_RegistrationValue */ public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(getSeqNo()).append(": ") .append(getRegistrationAttribute()).append("=").append(getName()); return sb.toString(); diff --git a/org.adempiere.base/src/org/compiere/model/MRequest.java b/org.adempiere.base/src/org/compiere/model/MRequest.java index 6040ce32bb..f1cd2ecc60 100644 --- a/org.adempiere.base/src/org/compiere/model/MRequest.java +++ b/org.adempiere.base/src/org/compiere/model/MRequest.java @@ -679,7 +679,7 @@ public class MRequest extends X_R_Request */ public String toString () { - StringBuffer sb = new StringBuffer ("MRequest["); + StringBuilder sb = new StringBuilder ("MRequest["); sb.append (get_ID()).append ("-").append(getDocumentNo()).append ("]"); return sb.toString (); } // toString @@ -1079,7 +1079,7 @@ public class MRequest extends X_R_Request String subject = Msg.translate(getCtx(), "R_Request_ID") + " " + Msg.getMsg(getCtx(), "Updated") + ": " + getDocumentNo(); // Message - StringBuffer message = new StringBuffer(); + StringBuilder message = new StringBuilder(); // UpdatedBy: Joe int UpdatedBy = Env.getAD_User_ID(getCtx()); MUser from = MUser.get(getCtx(), UpdatedBy); diff --git a/org.adempiere.base/src/org/compiere/model/MRequestType.java b/org.adempiere.base/src/org/compiere/model/MRequestType.java index 2b158a14ad..d417d6843b 100644 --- a/org.adempiere.base/src/org/compiere/model/MRequestType.java +++ b/org.adempiere.base/src/org/compiere/model/MRequestType.java @@ -334,7 +334,7 @@ public class MRequestType extends X_R_RequestType */ public String toString () { - StringBuffer sb = new StringBuffer ("MRequestType["); + StringBuilder sb = new StringBuilder ("MRequestType["); sb.append(get_ID()).append("-").append(getName()) .append ("]"); return sb.toString(); @@ -357,7 +357,7 @@ public class MRequestType extends X_R_RequestType String bpColumn = "C_BPartner_ID"; String pColumn = "M_Product_ID"; // PlannedAmt -> PlannedQty -> Count - StringBuffer sb = new StringBuffer("SELECT COUNT(*) " + StringBuilder sb = new StringBuilder("SELECT COUNT(*) " + "FROM R_Request WHERE R_RequestType_ID=" + getR_RequestType_ID() + " AND Processed<>'Y'"); // Date Restriction @@ -409,7 +409,7 @@ public class MRequestType extends X_R_RequestType String bpColumn = "C_BPartner_ID"; String pColumn = "M_Product_ID"; // - StringBuffer sb = new StringBuffer("SELECT COUNT(*), "); + StringBuilder sb = new StringBuilder("SELECT COUNT(*), "); String groupBy = null; String orderBy = null; // diff --git a/org.adempiere.base/src/org/compiere/model/MRequisition.java b/org.adempiere.base/src/org/compiere/model/MRequisition.java index 7a898efe06..ff8f984593 100644 --- a/org.adempiere.base/src/org/compiere/model/MRequisition.java +++ b/org.adempiere.base/src/org/compiere/model/MRequisition.java @@ -120,7 +120,7 @@ public class MRequisition extends X_M_Requisition implements DocAction */ public String toString () { - StringBuffer sb = new StringBuffer ("MRequisition["); + StringBuilder sb = new StringBuilder ("MRequisition["); sb.append(get_ID()).append("-").append(getDocumentNo()) .append(",Status=").append(getDocStatus()).append(",Action=").append(getDocAction()) .append ("]"); @@ -519,7 +519,7 @@ public class MRequisition extends X_M_Requisition implements DocAction */ public String getSummary() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(getDocumentNo()); // - User sb.append(" - ").append(getUserName()); diff --git a/org.adempiere.base/src/org/compiere/model/MResourceAssignment.java b/org.adempiere.base/src/org/compiere/model/MResourceAssignment.java index b68214df6e..799b3d7f9f 100644 --- a/org.adempiere.base/src/org/compiere/model/MResourceAssignment.java +++ b/org.adempiere.base/src/org/compiere/model/MResourceAssignment.java @@ -109,7 +109,7 @@ public class MResourceAssignment extends X_S_ResourceAssignment */ public String toString() { - StringBuffer sb = new StringBuffer ("MResourceAssignment[ID="); + StringBuilder sb = new StringBuilder ("MResourceAssignment[ID="); sb.append(get_ID()) .append(",S_Resource_ID=").append(getS_Resource_ID()) .append(",From=").append(getAssignDateFrom()) diff --git a/org.adempiere.base/src/org/compiere/model/MResourceType.java b/org.adempiere.base/src/org/compiere/model/MResourceType.java index 52cba82597..3a938ca2c3 100644 --- a/org.adempiere.base/src/org/compiere/model/MResourceType.java +++ b/org.adempiere.base/src/org/compiere/model/MResourceType.java @@ -281,7 +281,7 @@ public class MResourceType extends X_S_ResourceType @Override public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("MResourceType[") .append(get_ID()) .append(",Value=").append(getValue()) diff --git a/org.adempiere.base/src/org/compiere/model/MRfQ.java b/org.adempiere.base/src/org/compiere/model/MRfQ.java index b4984322c7..d5a5b5814b 100644 --- a/org.adempiere.base/src/org/compiere/model/MRfQ.java +++ b/org.adempiere.base/src/org/compiere/model/MRfQ.java @@ -183,7 +183,7 @@ public class MRfQ extends X_C_RfQ */ public String toString () { - StringBuffer sb = new StringBuffer ("MRfQ["); + StringBuilder sb = new StringBuilder ("MRfQ["); sb.append(get_ID()).append(",Name=").append(getName()) .append(",QuoteType=").append(getQuoteType()) .append("]"); diff --git a/org.adempiere.base/src/org/compiere/model/MRfQLine.java b/org.adempiere.base/src/org/compiere/model/MRfQLine.java index 63842dbbc8..f031986010 100644 --- a/org.adempiere.base/src/org/compiere/model/MRfQLine.java +++ b/org.adempiere.base/src/org/compiere/model/MRfQLine.java @@ -172,7 +172,7 @@ public class MRfQLine extends X_C_RfQLine { if (getM_Product_ID() == 0) return ""; - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); MProduct product = MProduct.get (getCtx(), getM_Product_ID()); sb.append(product.getName()); if (product.getDescription() != null && product.getDescription().length() > 0) @@ -186,7 +186,7 @@ public class MRfQLine extends X_C_RfQLine */ public String toString () { - StringBuffer sb = new StringBuffer ("MRfQLine["); + StringBuilder sb = new StringBuilder ("MRfQLine["); sb.append(get_ID()).append(",").append(getLine()) .append ("]"); return sb.toString (); diff --git a/org.adempiere.base/src/org/compiere/model/MRfQLineQty.java b/org.adempiere.base/src/org/compiere/model/MRfQLineQty.java index 434b2a6813..6a6a295a11 100644 --- a/org.adempiere.base/src/org/compiere/model/MRfQLineQty.java +++ b/org.adempiere.base/src/org/compiere/model/MRfQLineQty.java @@ -170,7 +170,7 @@ public class MRfQLineQty extends X_C_RfQLineQty */ public String toString () { - StringBuffer sb = new StringBuffer ("MRfQLineQty["); + StringBuilder sb = new StringBuilder ("MRfQLineQty["); sb.append(get_ID()).append(",Qty=").append(getQty()) .append(",Offer=").append(isOfferQty()) .append(",Purchase=").append(isPurchaseQty()) diff --git a/org.adempiere.base/src/org/compiere/model/MRfQResponse.java b/org.adempiere.base/src/org/compiere/model/MRfQResponse.java index 0e3b12964b..3439d2ee8c 100644 --- a/org.adempiere.base/src/org/compiere/model/MRfQResponse.java +++ b/org.adempiere.base/src/org/compiere/model/MRfQResponse.java @@ -228,7 +228,7 @@ public class MRfQResponse extends X_C_RfQResponse */ public String toString () { - StringBuffer sb = new StringBuffer ("MRfQResponse["); + StringBuilder sb = new StringBuilder ("MRfQResponse["); sb.append(get_ID()) .append(",Complete=").append(isComplete()) .append(",Winner=").append(isSelectedWinner()) diff --git a/org.adempiere.base/src/org/compiere/model/MRfQResponseLine.java b/org.adempiere.base/src/org/compiere/model/MRfQResponseLine.java index a7f5a6ecda..10ed82c8a0 100644 --- a/org.adempiere.base/src/org/compiere/model/MRfQResponseLine.java +++ b/org.adempiere.base/src/org/compiere/model/MRfQResponseLine.java @@ -173,7 +173,7 @@ public class MRfQResponseLine extends X_C_RfQResponseLine */ public String toString () { - StringBuffer sb = new StringBuffer ("MRfQResponseLine["); + StringBuilder sb = new StringBuilder ("MRfQResponseLine["); sb.append(get_ID()).append(",Winner=").append(isSelectedWinner()) .append ("]"); return sb.toString (); diff --git a/org.adempiere.base/src/org/compiere/model/MRfQResponseLineQty.java b/org.adempiere.base/src/org/compiere/model/MRfQResponseLineQty.java index 9c356db288..ba200cb4b7 100644 --- a/org.adempiere.base/src/org/compiere/model/MRfQResponseLineQty.java +++ b/org.adempiere.base/src/org/compiere/model/MRfQResponseLineQty.java @@ -160,7 +160,7 @@ public class MRfQResponseLineQty extends X_C_RfQResponseLineQty implements Compa */ public String toString () { - StringBuffer sb = new StringBuffer ("MRfQResponseLineQty["); + StringBuilder sb = new StringBuilder ("MRfQResponseLineQty["); sb.append(get_ID()).append(",Rank=").append(getRanking()) .append(",Price=").append(getPrice()) .append(",Discount=").append(getDiscount()) diff --git a/org.adempiere.base/src/org/compiere/model/MRole.java b/org.adempiere.base/src/org/compiere/model/MRole.java index 2ae5309b62..f177a9ad49 100644 --- a/org.adempiere.base/src/org/compiere/model/MRole.java +++ b/org.adempiere.base/src/org/compiere/model/MRole.java @@ -560,7 +560,7 @@ public final class MRole extends X_AD_Role */ public String toString() { - StringBuffer sb = new StringBuffer("MRole["); + StringBuilder sb = new StringBuilder("MRole["); sb.append(getAD_Role_ID()).append(",").append(getName()) .append(",UserLevel=").append(getUserLevel()) .append(",").append(getClientWhere(false)) @@ -576,7 +576,7 @@ public final class MRole extends X_AD_Role */ public String toStringX (Properties ctx) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(Msg.translate(ctx, "AD_Role_ID")).append("=").append(getName()) .append(" - ").append(Msg.translate(ctx, "IsCanExport")).append("=").append(isCanExport()) .append(" - ").append(Msg.translate(ctx, "IsCanReport")).append("=").append(isCanReport()) @@ -706,7 +706,7 @@ public final class MRole extends X_AD_Role log.fine("#" + m_orgAccess.length + (reload ? " - reload" : "")); if (Ini.isClient()) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (int i = 0; i < m_orgAccess.length; i++) { if (i > 0) @@ -1032,7 +1032,7 @@ public final class MRole extends X_AD_Role for (int i = 0; i < m_orgAccess.length; i++) set.add(String.valueOf(m_orgAccess[i].AD_Client_ID)); // - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); Iterator it = set.iterator(); boolean oneOnly = true; while (it.hasNext()) @@ -1112,7 +1112,7 @@ public final class MRole extends X_AD_Role set.add(String.valueOf(m_orgAccess[i].AD_Org_ID)); } // - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); Iterator it = set.iterator(); boolean oneOnly = true; while (it.hasNext()) @@ -2062,7 +2062,7 @@ public final class MRole extends X_AD_Role if (includes.size() != 0 && excludes.size() != 0) log.warning("Mixing Include and Excluse rules - Will not return values"); - StringBuffer where = new StringBuffer(" AND "); + StringBuilder where = new StringBuilder(" AND "); if (includes.size() == 1) where.append(whereColumnName).append("=").append(includes.get(0)); else if (includes.size() > 1) @@ -2115,7 +2115,7 @@ public final class MRole extends X_AD_Role char c = mainSql.charAt(offset); if (c == '.') { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); while (c != ' ' && c != ',' && c != '(') // delimeter { sb.insert(0, c); @@ -2364,7 +2364,7 @@ public final class MRole extends X_AD_Role } } // for all Table Access - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); if (sbExclude.length() > 0) sb.append(sbExclude).append(")"); if (sbInclude.length() > 0) @@ -2468,7 +2468,7 @@ public final class MRole extends X_AD_Role String orgName = "*"; if (AD_Org_ID != 0) orgName = MOrg.get(getCtx(), AD_Org_ID).getName(); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(Msg.translate(getCtx(), "AD_Client_ID")).append("=") .append(clientName).append(" - ") .append(Msg.translate(getCtx(), "AD_Org_ID")).append("=") @@ -3032,7 +3032,7 @@ public final class MRole extends X_AD_Role */ public String getIncludedRolesWhereClause(String roleColumnSQL, List params) { - StringBuffer whereClause = new StringBuffer(); + StringBuilder whereClause = new StringBuilder(); if (params != null) { whereClause.append("?"); diff --git a/org.adempiere.base/src/org/compiere/model/MRoleOrgAccess.java b/org.adempiere.base/src/org/compiere/model/MRoleOrgAccess.java index dfa223a5cb..21ff7b7889 100644 --- a/org.adempiere.base/src/org/compiere/model/MRoleOrgAccess.java +++ b/org.adempiere.base/src/org/compiere/model/MRoleOrgAccess.java @@ -195,7 +195,7 @@ public class MRoleOrgAccess extends X_AD_Role_OrgAccess */ public String toString() { - StringBuffer sb = new StringBuffer("MRoleOrgAccess["); + StringBuilder sb = new StringBuilder("MRoleOrgAccess["); sb.append("AD_Role_ID=").append(getAD_Role_ID()) .append(",AD_Client_ID=").append(getAD_Client_ID()) .append(",AD_Org_ID=").append(getAD_Org_ID()) @@ -212,7 +212,7 @@ public class MRoleOrgAccess extends X_AD_Role_OrgAccess */ public String toStringX (Properties ctx) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(Msg.translate(ctx, "AD_Client_ID")).append("=").append(getClientName()).append(" - ") .append(Msg.translate(ctx, "AD_Org_ID")).append("=").append(getOrgName()); return sb.toString(); diff --git a/org.adempiere.base/src/org/compiere/model/MRule.java b/org.adempiere.base/src/org/compiere/model/MRule.java index b4689363b0..12a5e7ac54 100644 --- a/org.adempiere.base/src/org/compiere/model/MRule.java +++ b/org.adempiere.base/src/org/compiere/model/MRule.java @@ -184,7 +184,7 @@ public class MRule extends X_AD_Rule */ public String toString() { - StringBuffer sb = new StringBuffer ("MRule["); + StringBuilder sb = new StringBuilder ("MRule["); sb.append (get_ID()).append ("-").append (getValue()).append ("]"); return sb.toString (); } // toString diff --git a/org.adempiere.base/src/org/compiere/model/MSLAMeasure.java b/org.adempiere.base/src/org/compiere/model/MSLAMeasure.java index b51e1d8495..6a3e13eb10 100644 --- a/org.adempiere.base/src/org/compiere/model/MSLAMeasure.java +++ b/org.adempiere.base/src/org/compiere/model/MSLAMeasure.java @@ -108,7 +108,7 @@ public class MSLAMeasure extends X_PA_SLA_Measure */ public String toString () { - StringBuffer sb = new StringBuffer ("MSLAMeasure["); + StringBuilder sb = new StringBuilder ("MSLAMeasure["); sb.append(get_ID()).append("-PA_SLA_Goal_ID=").append(getPA_SLA_Goal_ID()) .append(",").append(getDateTrx()) .append(",Actual=").append(getMeasureActual()) diff --git a/org.adempiere.base/src/org/compiere/model/MScheduler.java b/org.adempiere.base/src/org/compiere/model/MScheduler.java index de8a4bc8cb..dceea1b6d4 100644 --- a/org.adempiere.base/src/org/compiere/model/MScheduler.java +++ b/org.adempiere.base/src/org/compiere/model/MScheduler.java @@ -284,7 +284,7 @@ public class MScheduler extends X_AD_Scheduler */ public String toString () { - StringBuffer sb = new StringBuffer ("MScheduler["); + StringBuilder sb = new StringBuilder ("MScheduler["); sb.append (get_ID ()).append ("-").append (getName()).append ("]"); return sb.toString (); } // toString diff --git a/org.adempiere.base/src/org/compiere/model/MSchedulerPara.java b/org.adempiere.base/src/org/compiere/model/MSchedulerPara.java index 3dd5d67d01..6d969500b0 100644 --- a/org.adempiere.base/src/org/compiere/model/MSchedulerPara.java +++ b/org.adempiere.base/src/org/compiere/model/MSchedulerPara.java @@ -86,7 +86,7 @@ public class MSchedulerPara extends X_AD_Scheduler_Para */ public String toString() { - StringBuffer sb = new StringBuffer("MSchedulerPara["); + StringBuilder sb = new StringBuilder("MSchedulerPara["); sb.append(get_ID()).append("-") .append(getColumnName()).append("=").append(getParameterDefault()) .append("]"); diff --git a/org.adempiere.base/src/org/compiere/model/MSequence.java b/org.adempiere.base/src/org/compiere/model/MSequence.java index 025caf31f8..df0ae453ee 100644 --- a/org.adempiere.base/src/org/compiere/model/MSequence.java +++ b/org.adempiere.base/src/org/compiere/model/MSequence.java @@ -538,7 +538,7 @@ public class MSequence extends X_AD_Sequence return null; // create DocumentNo - StringBuffer doc = new StringBuffer(); + StringBuilder doc = new StringBuilder(); if (prefix != null && prefix.length() > 0) doc.append(Env.parseVariable(prefix, po, trxName, false)); diff --git a/org.adempiere.base/src/org/compiere/model/MSerNoCtl.java b/org.adempiere.base/src/org/compiere/model/MSerNoCtl.java index 5b5770deb6..003f9f2c9d 100644 --- a/org.adempiere.base/src/org/compiere/model/MSerNoCtl.java +++ b/org.adempiere.base/src/org/compiere/model/MSerNoCtl.java @@ -69,7 +69,7 @@ public class MSerNoCtl extends X_M_SerNoCtl */ public String createSerNo () { - StringBuffer name = new StringBuffer(); + StringBuilder name = new StringBuilder(); if (getPrefix() != null) name.append(getPrefix()); int no = getCurrentNext(); diff --git a/org.adempiere.base/src/org/compiere/model/MSetup.java b/org.adempiere.base/src/org/compiere/model/MSetup.java index 64f8f85cf4..ee274e77e7 100644 --- a/org.adempiere.base/src/org/compiere/model/MSetup.java +++ b/org.adempiere.base/src/org/compiere/model/MSetup.java @@ -1313,7 +1313,7 @@ public final class MSetup private void createPreference (String Attribute, String Value, int AD_Window_ID) { int AD_Preference_ID = getNextID(getAD_Client_ID(), "AD_Preference"); - StringBuffer sqlCmd = new StringBuffer ("INSERT INTO AD_Preference "); + StringBuilder sqlCmd = new StringBuilder ("INSERT INTO AD_Preference "); sqlCmd.append("(AD_Preference_ID,").append(m_stdColumns).append(","); sqlCmd.append("Attribute,Value,AD_Window_ID) VALUES ("); sqlCmd.append(AD_Preference_ID).append(",").append(m_stdValues).append(","); diff --git a/org.adempiere.base/src/org/compiere/model/MStatus.java b/org.adempiere.base/src/org/compiere/model/MStatus.java index 4a76795481..23a871dc48 100644 --- a/org.adempiere.base/src/org/compiere/model/MStatus.java +++ b/org.adempiere.base/src/org/compiere/model/MStatus.java @@ -222,7 +222,7 @@ public class MStatus extends X_R_Status */ public String toString () { - StringBuffer sb = new StringBuffer ("MStatus["); + StringBuilder sb = new StringBuilder ("MStatus["); sb.append(get_ID()).append("-").append(getName()) .append ("]"); return sb.toString (); diff --git a/org.adempiere.base/src/org/compiere/model/MStatusCategory.java b/org.adempiere.base/src/org/compiere/model/MStatusCategory.java index 3fe74e4fae..b0fb0e2814 100644 --- a/org.adempiere.base/src/org/compiere/model/MStatusCategory.java +++ b/org.adempiere.base/src/org/compiere/model/MStatusCategory.java @@ -229,7 +229,7 @@ public class MStatusCategory extends X_R_StatusCategory */ public String toString () { - StringBuffer sb = new StringBuffer ("RStatusCategory["); + StringBuilder sb = new StringBuilder ("RStatusCategory["); sb.append (get_ID()).append ("-").append(getName()).append ("]"); return sb.toString (); } // toString diff --git a/org.adempiere.base/src/org/compiere/model/MStore.java b/org.adempiere.base/src/org/compiere/model/MStore.java index 6d26b697e9..64f03a6aad 100644 --- a/org.adempiere.base/src/org/compiere/model/MStore.java +++ b/org.adempiere.base/src/org/compiere/model/MStore.java @@ -294,7 +294,7 @@ public class MStore extends X_W_Store */ public String toString () { - StringBuffer sb = new StringBuffer ("WStore["); + StringBuilder sb = new StringBuilder ("WStore["); sb.append(getWebContext(true)) .append ("]"); return sb.toString (); @@ -386,7 +386,7 @@ public class MStore extends X_W_Store log.warning("No Message"); return false; } - StringBuffer msgText = new StringBuffer(); + StringBuilder msgText = new StringBuilder(); if (getEMailHeader() != null) msgText.append(getEMailHeader()); msgText.append(message); diff --git a/org.adempiere.base/src/org/compiere/model/MSystem.java b/org.adempiere.base/src/org/compiere/model/MSystem.java index 8fadd018b1..31c29ecba4 100644 --- a/org.adempiere.base/src/org/compiere/model/MSystem.java +++ b/org.adempiere.base/src/org/compiere/model/MSystem.java @@ -193,7 +193,7 @@ public class MSystem extends X_AD_System + " WHERE IsActive='Y' ORDER BY AD_Client_ID DESC"; PreparedStatement pstmt = null; ResultSet rs = null; - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); try { pstmt = DB.prepareStatement (sql, null); diff --git a/org.adempiere.base/src/org/compiere/model/MTable.java b/org.adempiere.base/src/org/compiere/model/MTable.java index fa44e3ae64..390ece0e89 100644 --- a/org.adempiere.base/src/org/compiere/model/MTable.java +++ b/org.adempiere.base/src/org/compiere/model/MTable.java @@ -572,7 +572,7 @@ public class MTable extends X_AD_Table */ public String toString() { - StringBuffer sb = new StringBuffer ("MTable["); + StringBuilder sb = new StringBuilder ("MTable["); sb.append (get_ID()).append ("-").append (getTableName()).append ("]"); return sb.toString (); } // toString diff --git a/org.adempiere.base/src/org/compiere/model/MTableAccess.java b/org.adempiere.base/src/org/compiere/model/MTableAccess.java index dd62c816f3..ffa708dd84 100644 --- a/org.adempiere.base/src/org/compiere/model/MTableAccess.java +++ b/org.adempiere.base/src/org/compiere/model/MTableAccess.java @@ -67,7 +67,7 @@ public class MTableAccess extends X_AD_Table_Access */ public String toString() { - StringBuffer sb = new StringBuffer("MTableAccess["); + StringBuilder sb = new StringBuilder("MTableAccess["); sb.append("AD_Role_ID=").append(getAD_Role_ID()) .append(",AD_Table_ID=").append(getAD_Table_ID()) .append(",Exclude=").append(isExclude()) @@ -91,7 +91,7 @@ public class MTableAccess extends X_AD_Table_Access { String in = Msg.getMsg(ctx, "Include"); String ex = Msg.getMsg(ctx, "Exclude"); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(Msg.translate(ctx, "AD_Table_ID")) .append("=").append(getTableName(ctx)); if (ACCESSTYPERULE_Accessing.equals(getAccessTypeRule())) diff --git a/org.adempiere.base/src/org/compiere/model/MTableScriptValidator.java b/org.adempiere.base/src/org/compiere/model/MTableScriptValidator.java index 4f5796707d..4d91c0fd51 100644 --- a/org.adempiere.base/src/org/compiere/model/MTableScriptValidator.java +++ b/org.adempiere.base/src/org/compiere/model/MTableScriptValidator.java @@ -149,7 +149,7 @@ public class MTableScriptValidator extends X_AD_Table_ScriptValidator @Override public String toString() { - StringBuffer sb = new StringBuffer ("MTableScriptValidator["); + StringBuilder sb = new StringBuilder ("MTableScriptValidator["); sb.append(get_ID()).append("-").append(getAD_Table_ID()).append("-") .append(getEventModelValidator()).append("]"); return sb.toString (); diff --git a/org.adempiere.base/src/org/compiere/model/MTask.java b/org.adempiere.base/src/org/compiere/model/MTask.java index 3db7449768..81c42f4697 100644 --- a/org.adempiere.base/src/org/compiere/model/MTask.java +++ b/org.adempiere.base/src/org/compiere/model/MTask.java @@ -91,7 +91,7 @@ public class MTask extends X_AD_Task m_task = new Task(cmd); m_task.start(); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); while (true) { // Give it a bit of time @@ -135,7 +135,7 @@ public class MTask extends X_AD_Task */ public String toString () { - StringBuffer sb = new StringBuffer ("MTask["); + StringBuilder sb = new StringBuilder ("MTask["); sb.append(get_ID()) .append("-").append(getName()) .append(";Server=").append(isServerProcess()) diff --git a/org.adempiere.base/src/org/compiere/model/MTimeExpense.java b/org.adempiere.base/src/org/compiere/model/MTimeExpense.java index 6ee3a60212..4a09ee3701 100644 --- a/org.adempiere.base/src/org/compiere/model/MTimeExpense.java +++ b/org.adempiere.base/src/org/compiere/model/MTimeExpense.java @@ -529,7 +529,7 @@ public class MTimeExpense extends X_S_TimeExpense implements DocAction */ public String getSummary() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(getDocumentNo()); // : Total Lines = 123.00 (#1) sb.append(": ") diff --git a/org.adempiere.base/src/org/compiere/model/MTransaction.java b/org.adempiere.base/src/org/compiere/model/MTransaction.java index 777943ab0a..f5044dfb73 100644 --- a/org.adempiere.base/src/org/compiere/model/MTransaction.java +++ b/org.adempiere.base/src/org/compiere/model/MTransaction.java @@ -111,7 +111,7 @@ public class MTransaction extends X_M_Transaction */ public String toString () { - StringBuffer sb = new StringBuffer ("MTransaction["); + StringBuilder sb = new StringBuilder ("MTransaction["); sb.append(get_ID()).append(",").append(getMovementType()) .append(",Qty=").append(getMovementQty()) .append(",M_Product_ID=").append(getM_Product_ID()) diff --git a/org.adempiere.base/src/org/compiere/model/MTree.java b/org.adempiere.base/src/org/compiere/model/MTree.java index 0374afb4a6..059f60c09e 100644 --- a/org.adempiere.base/src/org/compiere/model/MTree.java +++ b/org.adempiere.base/src/org/compiere/model/MTree.java @@ -391,7 +391,7 @@ public class MTree extends MTree_Base private void getNodeDetails () { // SQL for Node Info - StringBuffer sqlNode = new StringBuffer(); + StringBuilder sqlNode = new StringBuilder(); String sourceTable = "t"; String fromClause = getSourceTableName(false); // fully qualified String columnNameX = getSourceTableName(true); @@ -615,7 +615,7 @@ public class MTree extends MTree_Base int count = 0; while (en.hasMoreElements()) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); MTreeNode nd = (MTreeNode)en.nextElement(); for (int i = 0; i < nd.getLevel(); i++) sb.append(" "); @@ -670,7 +670,7 @@ public class MTree extends MTree_Base */ public String toString() { - StringBuffer sb = new StringBuffer("MTree["); + StringBuilder sb = new StringBuilder("MTree["); sb.append("AD_Tree_ID=").append(getAD_Tree_ID()) .append(", Name=").append(getName()); sb.append("]"); diff --git a/org.adempiere.base/src/org/compiere/model/MUOM.java b/org.adempiere.base/src/org/compiere/model/MUOM.java index 4fd833f5cc..83bb1d2c0d 100644 --- a/org.adempiere.base/src/org/compiere/model/MUOM.java +++ b/org.adempiere.base/src/org/compiere/model/MUOM.java @@ -198,7 +198,7 @@ public class MUOM extends X_C_UOM */ public String toString() { - StringBuffer sb = new StringBuffer("UOM["); + StringBuilder sb = new StringBuilder("UOM["); sb.append("ID=").append(get_ID()) .append(", Name=").append(getName()); return sb.toString(); diff --git a/org.adempiere.base/src/org/compiere/model/MUOMConversion.java b/org.adempiere.base/src/org/compiere/model/MUOMConversion.java index c7ab824a77..58ad43206e 100644 --- a/org.adempiere.base/src/org/compiere/model/MUOMConversion.java +++ b/org.adempiere.base/src/org/compiere/model/MUOMConversion.java @@ -736,7 +736,7 @@ public class MUOMConversion extends X_C_UOM_Conversion */ public String toString () { - StringBuffer sb = new StringBuffer ("MUOMConversion["); + StringBuilder sb = new StringBuilder ("MUOMConversion["); sb.append(get_ID()).append("-C_UOM_ID=").append(getC_UOM_ID()) .append(",C_UOM_To_ID=").append(getC_UOM_To_ID()) .append(",M_Product_ID=").append(getM_Product_ID()) diff --git a/org.adempiere.base/src/org/compiere/model/MUser.java b/org.adempiere.base/src/org/compiere/model/MUser.java index 77db246ccf..ff5f85d53e 100644 --- a/org.adempiere.base/src/org/compiere/model/MUser.java +++ b/org.adempiere.base/src/org/compiere/model/MUser.java @@ -179,7 +179,7 @@ public class MUser extends X_AD_User ArrayList clientsValidated = new ArrayList(); MUser retValue = null; - StringBuffer where = new StringBuffer("Password IS NOT NULL AND "); + StringBuilder where = new StringBuilder("Password IS NOT NULL AND "); if (email_login) where.append("EMail=?"); else @@ -385,7 +385,7 @@ public class MUser extends X_AD_User private String cleanValue (String value) { char[] chars = value.toCharArray(); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (int i = 0; i < chars.length; i++) { char ch = chars[i]; diff --git a/org.adempiere.base/src/org/compiere/model/MUserDefField.java b/org.adempiere.base/src/org/compiere/model/MUserDefField.java index 2a97dcb745..6b30e29138 100644 --- a/org.adempiere.base/src/org/compiere/model/MUserDefField.java +++ b/org.adempiere.base/src/org/compiere/model/MUserDefField.java @@ -82,7 +82,7 @@ public class MUserDefField extends X_AD_UserDef_Field MUserDefField retValue = null; - StringBuffer sql = new StringBuffer("SELECT * " + StringBuilder sql = new StringBuilder("SELECT * " + " FROM AD_UserDef_Field f " + " WHERE f.AD_Field_ID=? AND f.IsActive='Y' " + " AND f.AD_UserDef_Tab_ID=? "); diff --git a/org.adempiere.base/src/org/compiere/model/MUserDefTab.java b/org.adempiere.base/src/org/compiere/model/MUserDefTab.java index 2aa893877e..b31af703d5 100644 --- a/org.adempiere.base/src/org/compiere/model/MUserDefTab.java +++ b/org.adempiere.base/src/org/compiere/model/MUserDefTab.java @@ -74,7 +74,7 @@ public class MUserDefTab extends X_AD_UserDef_Tab MUserDefTab retValue = null; - StringBuffer sql = new StringBuffer("SELECT * " + StringBuilder sql = new StringBuilder("SELECT * " + " FROM AD_UserDef_Tab " + " WHERE AD_UserDef_Win_ID=? AND IsActive='Y' " + " AND AD_Tab_ID=? "); diff --git a/org.adempiere.base/src/org/compiere/model/MUserOrgAccess.java b/org.adempiere.base/src/org/compiere/model/MUserOrgAccess.java index f2f0f0b3c1..0fc58d85c9 100644 --- a/org.adempiere.base/src/org/compiere/model/MUserOrgAccess.java +++ b/org.adempiere.base/src/org/compiere/model/MUserOrgAccess.java @@ -152,7 +152,7 @@ public class MUserOrgAccess extends X_AD_User_OrgAccess */ public String toString() { - StringBuffer sb = new StringBuffer("MUserOrgAccess["); + StringBuilder sb = new StringBuilder("MUserOrgAccess["); sb.append("AD_User_ID=").append(getAD_User_ID()) .append(",AD_Client_ID=").append(getAD_Client_ID()) .append(",AD_Org_ID=").append(getAD_Org_ID()) @@ -169,7 +169,7 @@ public class MUserOrgAccess extends X_AD_User_OrgAccess */ public String toStringX (Properties ctx) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(Msg.translate(ctx, "AD_Client_ID")).append("=").append(getClientName()).append(" - ") .append(Msg.translate(ctx, "AD_Org_ID")).append("=").append(getOrgName()); return sb.toString(); diff --git a/org.adempiere.base/src/org/compiere/model/MWarehousePrice.java b/org.adempiere.base/src/org/compiere/model/MWarehousePrice.java index 0befb550e8..17dbe5cab3 100644 --- a/org.adempiere.base/src/org/compiere/model/MWarehousePrice.java +++ b/org.adempiere.base/src/org/compiere/model/MWarehousePrice.java @@ -59,9 +59,9 @@ public class MWarehousePrice extends X_RV_WarehousePrice int M_PriceList_Version_ID, int M_Warehouse_ID, String Value, String Name, String UPC, String SKU, String trxName) { - StringBuffer sql = new StringBuffer ("SELECT * FROM RV_WarehousePrice " + StringBuilder sql = new StringBuilder ("SELECT * FROM RV_WarehousePrice " + "WHERE M_PriceList_Version_ID=? AND M_Warehouse_ID=?"); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); Value = getFindParameter (Value); if (Value != null) sb.append("UPPER(Value) LIKE ?"); diff --git a/org.adempiere.base/src/org/compiere/model/MYear.java b/org.adempiere.base/src/org/compiere/model/MYear.java index 7511a2208f..2e9cbbf2cc 100644 --- a/org.adempiere.base/src/org/compiere/model/MYear.java +++ b/org.adempiere.base/src/org/compiere/model/MYear.java @@ -152,7 +152,7 @@ public class MYear extends X_C_Year */ public String toString () { - StringBuffer sb = new StringBuffer ("MYear["); + StringBuilder sb = new StringBuilder ("MYear["); sb.append(get_ID()).append("-") .append(getFiscalYear()) .append ("]"); diff --git a/org.adempiere.base/src/org/compiere/model/ModelValidationEngine.java b/org.adempiere.base/src/org/compiere/model/ModelValidationEngine.java index 414417d8f2..02a2c0721a 100644 --- a/org.adempiere.base/src/org/compiere/model/ModelValidationEngine.java +++ b/org.adempiere.base/src/org/compiere/model/ModelValidationEngine.java @@ -800,7 +800,7 @@ public class ModelValidationEngine */ public String toString() { - StringBuffer sb = new StringBuffer("ModelValidationEngine["); + StringBuilder sb = new StringBuilder("ModelValidationEngine["); sb.append("Validators=#").append(m_validators.size()) .append(", ModelChange=#").append(m_modelChangeListeners.size()) .append(", DocValidate=#").append(m_docValidateListeners.size()) diff --git a/org.adempiere.base/src/org/compiere/model/NaturalAccountMap.java b/org.adempiere.base/src/org/compiere/model/NaturalAccountMap.java index dca40f84d7..96dc438e7f 100644 --- a/org.adempiere.base/src/org/compiere/model/NaturalAccountMap.java +++ b/org.adempiere.base/src/org/compiere/model/NaturalAccountMap.java @@ -150,7 +150,7 @@ public final class NaturalAccountMap extends CCache } // Fields with ',' are enclosed in " - StringBuffer newLine = new StringBuffer(); + StringBuilder newLine = new StringBuilder(); StringTokenizer st = new StringTokenizer(line, "\"", false); if ((st==null )||(st.countTokens()==0)) { log.log(Level.SEVERE, "Parse error: No \\\" found in line: "+lineNo); diff --git a/org.adempiere.base/src/org/compiere/model/Obscure.java b/org.adempiere.base/src/org/compiere/model/Obscure.java index b5407bd6da..6c7e2a21a5 100644 --- a/org.adempiere.base/src/org/compiere/model/Obscure.java +++ b/org.adempiere.base/src/org/compiere/model/Obscure.java @@ -168,7 +168,7 @@ public class Obscure extends Object // char[] chars = m_clearValue.toCharArray(); int length = chars.length; - StringBuffer sb = new StringBuffer(length); + StringBuilder sb = new StringBuilder(length); for (int i = 0; i < length; i++) { char c = chars[i]; diff --git a/org.adempiere.base/src/org/compiere/model/POInfo.java b/org.adempiere.base/src/org/compiere/model/POInfo.java index 9277ad0031..b644e3463f 100644 --- a/org.adempiere.base/src/org/compiere/model/POInfo.java +++ b/org.adempiere.base/src/org/compiere/model/POInfo.java @@ -143,7 +143,7 @@ public class POInfo implements Serializable m_columnNameMap = new HashMap(); m_columnIdMap = new HashMap(); ArrayList list = new ArrayList(15); - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); sql.append("SELECT t.TableName, c.ColumnName,c.AD_Reference_ID," // 1..3 + "c.IsMandatory,c.IsUpdateable,c.DefaultValue," // 4..6 + "e.Name,e.Description, c.AD_Column_ID, " // 7..9 diff --git a/org.adempiere.base/src/org/compiere/model/POInfoColumn.java b/org.adempiere.base/src/org/compiere/model/POInfoColumn.java index 921f8adcd4..7b111ebce7 100644 --- a/org.adempiere.base/src/org/compiere/model/POInfoColumn.java +++ b/org.adempiere.base/src/org/compiere/model/POInfoColumn.java @@ -182,7 +182,7 @@ public class POInfoColumn implements Serializable */ public String toString() { - StringBuffer sb = new StringBuffer("POInfo.Column["); + StringBuilder sb = new StringBuilder("POInfo.Column["); sb.append(ColumnName).append(",ID=").append(AD_Column_ID) .append(",DisplayType=").append(DisplayType) .append(",ColumnClass=").append(ColumnClass); diff --git a/org.adempiere.base/src/org/compiere/model/POIterator.java b/org.adempiere.base/src/org/compiere/model/POIterator.java index d8266f2487..eeb6798022 100644 --- a/org.adempiere.base/src/org/compiere/model/POIterator.java +++ b/org.adempiere.base/src/org/compiere/model/POIterator.java @@ -94,7 +94,7 @@ public class POIterator implements Iterator { } else { if (keyWhereClause == null) { String[] keys = table.getKeyColumns(); - StringBuffer sqlBuffer = new StringBuffer(); + StringBuilder sqlBuffer = new StringBuilder(); for (int i = 0; i < keys.length; i++) { if (i > 0) sqlBuffer.append(" AND "); diff --git a/org.adempiere.base/src/org/compiere/model/PO_LOB.java b/org.adempiere.base/src/org/compiere/model/PO_LOB.java index ef41ed05bb..ca7bfccabb 100644 --- a/org.adempiere.base/src/org/compiere/model/PO_LOB.java +++ b/org.adempiere.base/src/org/compiere/model/PO_LOB.java @@ -231,7 +231,7 @@ public class PO_LOB implements Serializable */ public String toString() { - StringBuffer sb = new StringBuffer("PO_LOB["); + StringBuilder sb = new StringBuilder("PO_LOB["); sb.append(m_tableName).append(".").append(m_columnName) .append(",DisplayType=").append(m_displayType) .append("]"); diff --git a/org.adempiere.base/src/org/compiere/model/PaymentProcessor.java b/org.adempiere.base/src/org/compiere/model/PaymentProcessor.java index 3c67af3278..d051758afc 100644 --- a/org.adempiere.base/src/org/compiere/model/PaymentProcessor.java +++ b/org.adempiere.base/src/org/compiere/model/PaymentProcessor.java @@ -226,7 +226,7 @@ public abstract class PaymentProcessor if (value.length() > maxLength) value = value.substring(0, maxLength); - StringBuffer retValue = new StringBuffer(name); + StringBuilder retValue = new StringBuilder(name); if (m_encoded) try { diff --git a/org.adempiere.base/src/org/compiere/model/PrintInfo.java b/org.adempiere.base/src/org/compiere/model/PrintInfo.java index bb3bd63ec8..0f7241e5b7 100644 --- a/org.adempiere.base/src/org/compiere/model/PrintInfo.java +++ b/org.adempiere.base/src/org/compiere/model/PrintInfo.java @@ -266,7 +266,7 @@ public class PrintInfo */ public String toString() { - StringBuffer sb = new StringBuffer("PrintInfo["); + StringBuilder sb = new StringBuilder("PrintInfo["); sb.append(getName()); if (getAD_Process_ID() != 0) sb.append(",AD_Process_ID=").append(getAD_Process_ID()); diff --git a/org.adempiere.base/src/org/compiere/model/ProductCost.java b/org.adempiere.base/src/org/compiere/model/ProductCost.java index 1c6d6aaa30..991e20cdf8 100644 --- a/org.adempiere.base/src/org/compiere/model/ProductCost.java +++ b/org.adempiere.base/src/org/compiere/model/ProductCost.java @@ -309,7 +309,7 @@ public class ProductCost */ private BigDecimal getPriceList (MAcctSchema as, boolean onlyPOPriceList) { - StringBuffer sql = new StringBuffer ( + StringBuilder sql = new StringBuilder ( "SELECT pl.C_Currency_ID, pp.PriceList, pp.PriceStd, pp.PriceLimit " + "FROM M_PriceList pl, M_PriceList_Version plv, M_ProductPrice pp " + "WHERE pl.M_PriceList_ID = plv.M_PriceList_ID" @@ -422,7 +422,7 @@ public class ProductCost */ public String toString() { - StringBuffer sb = new StringBuffer ("ProductCost["); + StringBuilder sb = new StringBuilder ("ProductCost["); sb.append ("M_Product_ID=").append(m_M_Product_ID) .append(",M_AttributeSetInstance_ID").append(m_M_AttributeSetInstance_ID) .append (",Qty=").append(m_qty) diff --git a/org.adempiere.base/src/org/compiere/model/Scriptlet.java b/org.adempiere.base/src/org/compiere/model/Scriptlet.java index 2135cdace4..fe8c192161 100644 --- a/org.adempiere.base/src/org/compiere/model/Scriptlet.java +++ b/org.adempiere.base/src/org/compiere/model/Scriptlet.java @@ -434,7 +434,7 @@ public class Scriptlet */ public String toString() { - StringBuffer sb = new StringBuffer(m_variable); + StringBuilder sb = new StringBuilder(m_variable); sb.append(" { ").append(m_script).append(" } = ").append(getResult(true)); return sb.toString(); } // toString diff --git a/org.adempiere.base/src/org/compiere/model/SetGetUtil.java b/org.adempiere.base/src/org/compiere/model/SetGetUtil.java index f79584f6cd..c40e8bc6db 100644 --- a/org.adempiere.base/src/org/compiere/model/SetGetUtil.java +++ b/org.adempiere.base/src/org/compiere/model/SetGetUtil.java @@ -355,7 +355,7 @@ public class SetGetUtil return false; } - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); for (String f : includeFields) { if (sql.length() > 0) @@ -547,7 +547,7 @@ public class SetGetUtil String idColumnName = tableName+"_ID"; // Collection params = new ArrayList(); - StringBuffer sql = new StringBuffer("SELECT COALESCE(MAX("+lineColumnName+"),0)+10"); + StringBuilder sql = new StringBuilder("SELECT COALESCE(MAX("+lineColumnName+"),0)+10"); sql.append(" FROM ").append(tableName); // Only active records sql.append(" WHERE IsActive=?"); diff --git a/org.adempiere.base/src/org/compiere/model/TranslationTable.java b/org.adempiere.base/src/org/compiere/model/TranslationTable.java index 912b7accda..f6528a3feb 100644 --- a/org.adempiere.base/src/org/compiere/model/TranslationTable.java +++ b/org.adempiere.base/src/org/compiere/model/TranslationTable.java @@ -194,7 +194,7 @@ public class TranslationTable sql2.append(",b.").append(columnName); } // - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); sql.append(sql1).append(sql2) .append(" FROM AD_Language l, " + m_baseTableName + " b WHERE l.IsActive = 'Y' AND l.IsSystemLanguage = 'Y' AND b." @@ -216,7 +216,7 @@ public class TranslationTable if (po.get_ID() == 0) throw new IllegalArgumentException("PO ID is 0"); // - StringBuffer sb = new StringBuffer("UPDATE "); + StringBuilder sb = new StringBuilder("UPDATE "); sb.append(m_trlTableName) .append(" SET IsTranslated='N',Updated=SysDate WHERE ") .append(m_baseTableName).append("_ID=").append(po.get_ID()); @@ -237,7 +237,7 @@ public class TranslationTable if (po.get_IDOld() == 0) throw new IllegalArgumentException("PO Old ID is 0"); // - StringBuffer sb = new StringBuffer("DELETE FROM "); + StringBuilder sb = new StringBuilder("DELETE FROM "); sb.append(m_trlTableName) .append(" WHERE ") .append(m_baseTableName).append("_ID=").append(po.get_IDOld()); @@ -252,7 +252,7 @@ public class TranslationTable */ public String toString () { - StringBuffer sb = new StringBuffer ("TranslationTable["); + StringBuilder sb = new StringBuilder ("TranslationTable["); sb.append(m_trlTableName) .append("(").append(m_baseTableName).append(")"); for (int i = 0; i < m_columns.size(); i++) diff --git a/org.adempiere.base/src/org/compiere/print/CPaper.java b/org.adempiere.base/src/org/compiere/print/CPaper.java index e6ec31d904..2a5c3504cc 100644 --- a/org.adempiere.base/src/org/compiere/print/CPaper.java +++ b/org.adempiere.base/src/org/compiere/print/CPaper.java @@ -344,7 +344,7 @@ public class CPaper extends Paper */ public String toString() { - StringBuffer sb = new StringBuffer("CPaper["); + StringBuilder sb = new StringBuilder("CPaper["); sb.append(getWidth()/72).append("x").append(getHeight()/72).append('"') .append(m_landscape ? " Landscape " : " Portrait ") .append("x=").append(getImageableX()) @@ -362,7 +362,7 @@ public class CPaper extends Paper */ public String toString (Properties ctx) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); // Print Media size //AA Goodwill : Custom Paper Support if (m_mediaSize != null && m_mediaSize.getMediaSizeName() != null) diff --git a/org.adempiere.base/src/org/compiere/print/MPrintColor.java b/org.adempiere.base/src/org/compiere/print/MPrintColor.java index 07b55ce9fc..e9b8df0e59 100644 --- a/org.adempiere.base/src/org/compiere/print/MPrintColor.java +++ b/org.adempiere.base/src/org/compiere/print/MPrintColor.java @@ -188,7 +188,7 @@ public class MPrintColor extends X_AD_PrintColor public String getRRGGBB() { Color color = getColor(); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(Util.toHex((byte)color.getRed())) .append(Util.toHex((byte)color.getGreen())) .append(Util.toHex((byte)color.getBlue())); @@ -201,7 +201,7 @@ public class MPrintColor extends X_AD_PrintColor */ public String toString() { - StringBuffer sb = new StringBuffer("MPrintColor["); + StringBuilder sb = new StringBuilder("MPrintColor["); sb.append("ID=").append(get_ID()) .append(",Name=").append(getName()) .append(",RGB=").append(getCode()) diff --git a/org.adempiere.base/src/org/compiere/print/MPrintFont.java b/org.adempiere.base/src/org/compiere/print/MPrintFont.java index 8377bea818..775b4f1daf 100644 --- a/org.adempiere.base/src/org/compiere/print/MPrintFont.java +++ b/org.adempiere.base/src/org/compiere/print/MPrintFont.java @@ -93,7 +93,7 @@ public class MPrintFont extends X_AD_PrintFont public void setFont (Font font) { // fontfamilyname-style-pointsize - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(font.getFamily()).append("-"); int style = font.getStyle(); if (style == Font.PLAIN) @@ -118,7 +118,7 @@ public class MPrintFont extends X_AD_PrintFont static MPrintFont create (Font font) { MPrintFont pf = new MPrintFont(Env.getCtx(), 0, null); - StringBuffer name = new StringBuffer (font.getName()); + StringBuilder name = new StringBuilder (font.getName()); if (font.isBold()) name.append(" bold"); if (font.isItalic()) @@ -136,7 +136,7 @@ public class MPrintFont extends X_AD_PrintFont */ public String toString() { - StringBuffer sb = new StringBuffer("MPrintFont["); + StringBuilder sb = new StringBuilder("MPrintFont["); sb.append("ID=").append(get_ID()) .append(",Name=").append(getName()) .append("PSName=").append(getFont().getPSName()) @@ -152,7 +152,7 @@ public class MPrintFont extends X_AD_PrintFont */ public String toPS() { - StringBuffer sb = new StringBuffer("/"); + StringBuilder sb = new StringBuilder("/"); sb.append(getFont().getPSName()); if (getFont().isBold()) sb.append(" Bold"); diff --git a/org.adempiere.base/src/org/compiere/print/MPrintFormatItem.java b/org.adempiere.base/src/org/compiere/print/MPrintFormatItem.java index 7c71e683bf..9e92a8a873 100644 --- a/org.adempiere.base/src/org/compiere/print/MPrintFormatItem.java +++ b/org.adempiere.base/src/org/compiere/print/MPrintFormatItem.java @@ -338,7 +338,7 @@ public class MPrintFormatItem extends X_AD_PrintFormatItem */ public String toString() { - StringBuffer sb = new StringBuffer("MPrintFormatItem["); + StringBuilder sb = new StringBuilder("MPrintFormatItem["); sb.append("ID=").append(get_ID()) .append(",Name=").append(getName()) .append(",Print=").append(getPrintName()) diff --git a/org.adempiere.base/src/org/compiere/print/PrintData.java b/org.adempiere.base/src/org/compiere/print/PrintData.java index 936b186ae1..937880f3da 100644 --- a/org.adempiere.base/src/org/compiere/print/PrintData.java +++ b/org.adempiere.base/src/org/compiere/print/PrintData.java @@ -207,7 +207,7 @@ public class PrintData implements Serializable */ public String toString() { - StringBuffer sb = new StringBuffer("PrintData["); + StringBuilder sb = new StringBuilder("PrintData["); sb.append(m_name).append(",Rows=").append(m_matrix.getRowCount()); if (m_TableName != null) sb.append(",TableName=").append(m_TableName); diff --git a/org.adempiere.base/src/org/compiere/print/PrintDataColumn.java b/org.adempiere.base/src/org/compiere/print/PrintDataColumn.java index f10d2ff260..c3eff06f9a 100644 --- a/org.adempiere.base/src/org/compiere/print/PrintDataColumn.java +++ b/org.adempiere.base/src/org/compiere/print/PrintDataColumn.java @@ -124,7 +124,7 @@ public class PrintDataColumn */ public String toString() { - StringBuffer sb = new StringBuffer("PrintDataColumn["); + StringBuilder sb = new StringBuilder("PrintDataColumn["); sb.append("ID=").append(m_AD_Column_ID) .append("-").append(m_columnName); if (hasAlias()) diff --git a/org.adempiere.base/src/org/compiere/print/PrintDataElement.java b/org.adempiere.base/src/org/compiere/print/PrintDataElement.java index 8b641c0e16..3b2d4a202e 100644 --- a/org.adempiere.base/src/org/compiere/print/PrintDataElement.java +++ b/org.adempiere.base/src/org/compiere/print/PrintDataElement.java @@ -393,7 +393,7 @@ public class PrintDataElement implements Serializable if (m_value instanceof NamePair) { NamePair pp = (NamePair)m_value; - StringBuffer sb = new StringBuffer(m_columnName); + StringBuilder sb = new StringBuilder(m_columnName); sb.append("(").append(pp.getID()).append(")") .append("=").append(pp.getName()); if (m_isPKey) diff --git a/org.adempiere.base/src/org/compiere/print/PrintDataGroup.java b/org.adempiere.base/src/org/compiere/print/PrintDataGroup.java index 758e8a9317..a9941e40ac 100644 --- a/org.adempiere.base/src/org/compiere/print/PrintDataGroup.java +++ b/org.adempiere.base/src/org/compiere/print/PrintDataGroup.java @@ -270,7 +270,7 @@ public class PrintDataGroup */ public String toString (boolean withData) { - StringBuffer sb = new StringBuffer("PrintDataGroup["); + StringBuilder sb = new StringBuilder("PrintDataGroup["); sb.append("Groups="); for (int i = 0; i < m_groups.size(); i++) { diff --git a/org.adempiere.base/src/org/compiere/print/PrintUtil.java b/org.adempiere.base/src/org/compiere/print/PrintUtil.java index c4b883bff7..ab82caf990 100644 --- a/org.adempiere.base/src/org/compiere/print/PrintUtil.java +++ b/org.adempiere.base/src/org/compiere/print/PrintUtil.java @@ -315,7 +315,7 @@ public class PrintUtil */ public static void dump (PrinterJob job) { - StringBuffer sb = new StringBuffer(job.getJobName()); + StringBuilder sb = new StringBuilder(job.getJobName()); sb.append("/").append(job.getUserName()) .append(" Service=").append(job.getPrintService().getName()) .append(" Copies=").append(job.getCopies()); @@ -588,7 +588,7 @@ public class PrintUtil */ static private void updatePrintFormatHeader (int Header_ID, int Line_ID) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("UPDATE AD_PrintFormatItem SET AD_PrintFormatChild_ID=") .append(Line_ID) .append(" WHERE AD_PrintFormatChild_ID IS NOT NULL AND AD_PrintFormat_ID=") diff --git a/org.adempiere.base/src/org/compiere/print/ReportEngine.java b/org.adempiere.base/src/org/compiere/print/ReportEngine.java index c2bfac86c5..2c518c97f6 100644 --- a/org.adempiere.base/src/org/compiere/print/ReportEngine.java +++ b/org.adempiere.base/src/org/compiere/print/ReportEngine.java @@ -1626,7 +1626,7 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount) */ public static void printConfirm (int type, int Record_ID) { - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); if (type == ORDER || type == SHIPMENT || type == INVOICE) sql.append("UPDATE ").append(DOC_BASETABLES[type]) .append(" SET DatePrinted=SysDate, IsPrinted='Y' WHERE ") diff --git a/org.adempiere.base/src/org/compiere/print/layout/Dimension2DImpl.java b/org.adempiere.base/src/org/compiere/print/layout/Dimension2DImpl.java index 2743557724..d53c8a5945 100644 --- a/org.adempiere.base/src/org/compiere/print/layout/Dimension2DImpl.java +++ b/org.adempiere.base/src/org/compiere/print/layout/Dimension2DImpl.java @@ -169,7 +169,7 @@ public class Dimension2DImpl extends Dimension2D implements Serializable */ public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("Dimension2D[w=").append(width).append(",h=").append(height).append("]"); return sb.toString(); } // toString diff --git a/org.adempiere.base/src/org/compiere/print/layout/HTMLElement.java b/org.adempiere.base/src/org/compiere/print/layout/HTMLElement.java index ea1f5f83fc..85bf53a942 100644 --- a/org.adempiere.base/src/org/compiere/print/layout/HTMLElement.java +++ b/org.adempiere.base/src/org/compiere/print/layout/HTMLElement.java @@ -115,7 +115,7 @@ public class HTMLElement extends PrintElement */ public String toString() { - StringBuffer sb = new StringBuffer("HTMLElement["); + StringBuilder sb = new StringBuilder("HTMLElement["); sb.append("Bounds=").append(getBounds()) .append(",Height=").append(p_height).append("(").append(p_maxHeight) .append("),Width=").append(p_width).append("(").append(p_maxHeight) 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 8465a7ff84..d64c25e10b 100644 --- a/org.adempiere.base/src/org/compiere/print/layout/LayoutEngine.java +++ b/org.adempiere.base/src/org/compiere/print/layout/LayoutEngine.java @@ -717,7 +717,7 @@ public class LayoutEngine implements Pageable, Printable, Doc if (m_tableElement == null || m_tableElement.getPageXCount() == 1) return ""; int pi = m_tableElement.getPageIndex(pageNo); - StringBuffer sb = new StringBuffer("("); + StringBuilder sb = new StringBuilder("("); sb.append(m_tableElement.getPageYIndex(pi)+1).append(",") .append(m_tableElement.getPageXIndex(pi)+1).append(")"); return sb.toString(); @@ -731,7 +731,7 @@ public class LayoutEngine implements Pageable, Printable, Doc { if (m_tableElement == null || m_tableElement.getPageXCount() == 1) return ""; - StringBuffer sb = new StringBuffer("("); + StringBuilder sb = new StringBuilder("("); sb.append(m_tableElement.getPageYCount()).append(",") .append(m_tableElement.getPageXCount()).append(")"); return sb.toString(); diff --git a/org.adempiere.base/src/org/compiere/print/layout/Page.java b/org.adempiere.base/src/org/compiere/print/layout/Page.java index 05d3882afe..e829f10cb9 100644 --- a/org.adempiere.base/src/org/compiere/print/layout/Page.java +++ b/org.adempiere.base/src/org/compiere/print/layout/Page.java @@ -143,7 +143,7 @@ public class Page m_ctx.put (CONTEXT_PAGE, m_pageInfo); // log.finest( "PrintContext", CONTEXT_PAGE + "=" + m_pageInfo); // - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); if (m_pageCount != 1) // set to "Page 1 of 2" sb.append(Msg.getMsg(m_ctx, "Page")).append(" ") .append(m_pageNo) @@ -154,7 +154,7 @@ public class Page m_ctx.put(CONTEXT_MULTIPAGE, sb.toString()); // log.finest( "PrintContext", CONTEXT_MULTIPAGE + "=" + sb.toString()); // - sb = new StringBuffer(); + sb = new StringBuilder(); if (isCopy) // set to "(Copy)" sb.append("(") .append(Msg.getMsg(m_ctx, "DocumentCopy")) @@ -242,7 +242,7 @@ public class Page */ public String toString() { - StringBuffer sb = new StringBuffer("Page["); + StringBuilder sb = new StringBuilder("Page["); sb.append(m_pageNo).append(",Elements=").append(m_elements.size()); sb.append("]"); return sb.toString(); diff --git a/org.adempiere.base/src/org/compiere/print/layout/PrintElement.java b/org.adempiere.base/src/org/compiere/print/layout/PrintElement.java index a36575b17e..dcf68c5a4a 100644 --- a/org.adempiere.base/src/org/compiere/print/layout/PrintElement.java +++ b/org.adempiere.base/src/org/compiere/print/layout/PrintElement.java @@ -349,7 +349,7 @@ public abstract class PrintElement implements ImageObserver, Serializable public String toString() { String cn = getClass().getName(); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(cn.substring(cn.lastIndexOf('.')+1)).append("["); sb.append("Bounds=").append(getBounds()) .append(",Height=").append(p_height).append("(").append(p_maxHeight) 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 3a5b258d45..463a4c14c4 100644 --- a/org.adempiere.base/src/org/compiere/print/layout/StringElement.java +++ b/org.adempiere.base/src/org/compiere/print/layout/StringElement.java @@ -608,7 +608,7 @@ public class StringElement extends PrintElement */ public String toString() { - StringBuffer sb = new StringBuffer("StringElement["); + StringBuilder sb = new StringBuilder("StringElement["); sb.append("Bounds=").append(getBounds()) .append(",Height=").append(p_height).append("(").append(p_maxHeight) .append("),Width=").append(p_width).append("(").append(p_maxHeight) diff --git a/org.adempiere.base/src/org/compiere/print/util/SerializableMatrixImpl.java b/org.adempiere.base/src/org/compiere/print/util/SerializableMatrixImpl.java index f0f5e7b2e2..0b94bd8c07 100644 --- a/org.adempiere.base/src/org/compiere/print/util/SerializableMatrixImpl.java +++ b/org.adempiere.base/src/org/compiere/print/util/SerializableMatrixImpl.java @@ -226,7 +226,7 @@ public class SerializableMatrixImpl implements Serializa } private String makePrefix(String name) { - StringBuffer prefix = new StringBuffer(); + StringBuilder prefix = new StringBuilder(); char[] nameArray = name.toCharArray(); for (char ch : nameArray) { if (Character.isLetterOrDigit(ch)) { diff --git a/org.adempiere.base/src/org/compiere/process/AdempiereServer.java b/org.adempiere.base/src/org/compiere/process/AdempiereServer.java index a11956a44a..9cec70011b 100644 --- a/org.adempiere.base/src/org/compiere/process/AdempiereServer.java +++ b/org.adempiere.base/src/org/compiere/process/AdempiereServer.java @@ -159,7 +159,7 @@ public abstract class AdempiereServer extends Thread */ public String getStatistics () { - StringBuffer sb = new StringBuffer (); + StringBuilder sb = new StringBuilder (); sb.append("Alive=").append(isAlive()) .append(", Start=").append(getStart()) .append(", WorkCount=").append(getWorkCount()) @@ -178,7 +178,7 @@ public abstract class AdempiereServer extends Thread */ public String toString () { - StringBuffer sb = new StringBuffer ("AdempiereServer["); + StringBuilder sb = new StringBuilder ("AdempiereServer["); sb.append(getStatistics()).append ("]"); return sb.toString (); } // toString diff --git a/org.adempiere.base/src/org/compiere/process/AdempiereService.java b/org.adempiere.base/src/org/compiere/process/AdempiereService.java index 22db3a9ba3..16717e6a38 100644 --- a/org.adempiere.base/src/org/compiere/process/AdempiereService.java +++ b/org.adempiere.base/src/org/compiere/process/AdempiereService.java @@ -242,7 +242,7 @@ public class AdempiereService extends StateEngine */ public String toString () { - StringBuffer sb = new StringBuffer ("AdempiereService["); + StringBuilder sb = new StringBuilder ("AdempiereService["); sb.append(getStateInfo()) .append(" - ").append(m_server); sb.append ("]"); diff --git a/org.adempiere.base/src/org/compiere/process/DocActionTemplate.java b/org.adempiere.base/src/org/compiere/process/DocActionTemplate.java index 54b3439a93..14bd225819 100644 --- a/org.adempiere.base/src/org/compiere/process/DocActionTemplate.java +++ b/org.adempiere.base/src/org/compiere/process/DocActionTemplate.java @@ -326,7 +326,7 @@ public class DocActionTemplate extends PO implements DocAction */ public String getSummary() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); // sb.append(getDocumentNo()); // : Total Lines = 123.00 (#1) // sb.append(": ") diff --git a/org.adempiere.base/src/org/compiere/process/ProcessInfo.java b/org.adempiere.base/src/org/compiere/process/ProcessInfo.java index 0e058a2633..56c2e52d03 100644 --- a/org.adempiere.base/src/org/compiere/process/ProcessInfo.java +++ b/org.adempiere.base/src/org/compiere/process/ProcessInfo.java @@ -143,7 +143,7 @@ public class ProcessInfo implements Serializable */ public String toString() { - StringBuffer sb = new StringBuffer("ProcessInfo["); + StringBuilder sb = new StringBuilder("ProcessInfo["); sb.append(m_Title) .append(",Process_ID=").append(m_AD_Process_ID); if (m_AD_PInstance_ID != 0) @@ -269,7 +269,7 @@ public class ProcessInfo implements Serializable if (m_logs == null) return ""; // - StringBuffer sb = new StringBuffer (); + StringBuilder sb = new StringBuilder (); SimpleDateFormat dateFormat = DisplayType.getDateFormat(DisplayType.Date); if (html) sb.append(""); diff --git a/org.adempiere.base/src/org/compiere/process/ProcessInfoUtil.java b/org.adempiere.base/src/org/compiere/process/ProcessInfoUtil.java index 0162b095d3..6b871803bf 100644 --- a/org.adempiere.base/src/org/compiere/process/ProcessInfoUtil.java +++ b/org.adempiere.base/src/org/compiere/process/ProcessInfoUtil.java @@ -157,7 +157,7 @@ public class ProcessInfoUtil } for (int i = 0; i < logs.length; i++) { - StringBuffer sql = new StringBuffer ("INSERT INTO AD_PInstance_Log " + StringBuilder sql = new StringBuilder ("INSERT INTO AD_PInstance_Log " + "(AD_PInstance_ID, Log_ID, P_Date, P_ID, P_Number, P_Msg, AD_Table_ID,Record_ID)" + " VALUES ("); sql.append(pi.getAD_PInstance_ID()).append(",") diff --git a/org.adempiere.base/src/org/compiere/report/FinReport.java b/org.adempiere.base/src/org/compiere/report/FinReport.java index 46886a790c..92553320ec 100644 --- a/org.adempiere.base/src/org/compiere/report/FinReport.java +++ b/org.adempiere.base/src/org/compiere/report/FinReport.java @@ -344,7 +344,7 @@ public class FinReport extends SvrProcess // Ignore calculation columns if (m_columns[col].isColumnTypeCalculation()) continue; - StringBuffer info = new StringBuffer(); + StringBuilder info = new StringBuilder(); info.append("Line=").append(line).append(",Col=").append(col); // SELECT SUM() @@ -523,7 +523,7 @@ public class FinReport extends SvrProcess oper_1 = oper_2; oper_2 = temp; } - StringBuffer sb = new StringBuffer ("UPDATE T_Report SET ("); + StringBuilder sb = new StringBuilder ("UPDATE T_Report SET ("); for (int col = 0; col < m_columns.length; col++) { if (col > 0) @@ -559,7 +559,7 @@ public class FinReport extends SvrProcess else // No Add (subtract, percent) { // Step 1 - get First Value or 0 in there - StringBuffer sb = new StringBuffer ("UPDATE T_Report SET ("); + StringBuilder sb = new StringBuilder ("UPDATE T_Report SET ("); for (int col = 0; col < m_columns.length; col++) { if (col > 0) @@ -588,7 +588,7 @@ public class FinReport extends SvrProcess } // Step 2 - do Calculation with Second Value - sb = new StringBuffer ("UPDATE T_Report r1 SET ("); + sb = new StringBuilder ("UPDATE T_Report r1 SET ("); for (int col = 0; col < m_columns.length; col++) { if (col > 0) @@ -642,7 +642,7 @@ public class FinReport extends SvrProcess if (!m_columns[col].isColumnTypeCalculation ()) continue; - StringBuffer sb = new StringBuffer ("UPDATE T_Report SET "); + StringBuilder sb = new StringBuilder ("UPDATE T_Report SET "); // Column to set sb.append ("Col_").append (col).append("="); // First Operand @@ -739,7 +739,7 @@ public class FinReport extends SvrProcess } // add to the list - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(firstPA_ReportLine_ID); boolean addToList = false; for (int line = 0; line < m_lines.length; line++) diff --git a/org.adempiere.base/src/org/compiere/report/FinReportPeriod.java b/org.adempiere.base/src/org/compiere/report/FinReportPeriod.java index d778dabd28..7bb47c344e 100644 --- a/org.adempiere.base/src/org/compiere/report/FinReportPeriod.java +++ b/org.adempiere.base/src/org/compiere/report/FinReportPeriod.java @@ -59,7 +59,7 @@ public class FinReportPeriod */ public String getPeriodWhere () { - StringBuffer sql = new StringBuffer ("BETWEEN "); + StringBuilder sql = new StringBuilder ("BETWEEN "); sql.append(DB.TO_DATE(m_StartDate)) .append(" AND ") .append(DB.TO_DATE(m_EndDate)); @@ -72,7 +72,7 @@ public class FinReportPeriod */ public String getYearWhere () { - StringBuffer sql = new StringBuffer ("BETWEEN "); + StringBuilder sql = new StringBuilder ("BETWEEN "); sql.append(DB.TO_DATE(m_YearStartDate)) .append(" AND ") .append(DB.TO_DATE(m_EndDate)); @@ -85,7 +85,7 @@ public class FinReportPeriod */ public String getTotalWhere () { - StringBuffer sql = new StringBuffer ("<= "); + StringBuilder sql = new StringBuilder ("<= "); sql.append(DB.TO_DATE(m_EndDate)); return sql.toString(); } // getPeriodWhere diff --git a/org.adempiere.base/src/org/compiere/report/FinStatement.java b/org.adempiere.base/src/org/compiere/report/FinStatement.java index 5868f765f7..db858fc676 100644 --- a/org.adempiere.base/src/org/compiere/report/FinStatement.java +++ b/org.adempiere.base/src/org/compiere/report/FinStatement.java @@ -289,7 +289,7 @@ public class FinStatement extends SvrProcess */ private void createBalanceLine() { - StringBuffer sb = new StringBuffer ("INSERT INTO T_ReportStatement " + StringBuilder sb = new StringBuilder ("INSERT INTO T_ReportStatement " + "(AD_PInstance_ID, Fact_Acct_ID, LevelNo," + "DateAcct, Name, Description," + "AmtAcctDr, AmtAcctCr, Balance, Qty) "); diff --git a/org.adempiere.base/src/org/compiere/report/MReport.java b/org.adempiere.base/src/org/compiere/report/MReport.java index f9f1441826..bf3fcc9db1 100644 --- a/org.adempiere.base/src/org/compiere/report/MReport.java +++ b/org.adempiere.base/src/org/compiere/report/MReport.java @@ -95,7 +95,7 @@ public class MReport extends X_PA_Report public String getWhereClause() { // AD_Client indirectly via AcctSchema - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); // Mandatory AcctSchema sb.append("C_AcctSchema_ID=").append(getC_AcctSchema_ID()); // diff --git a/org.adempiere.base/src/org/compiere/report/MReportColumn.java b/org.adempiere.base/src/org/compiere/report/MReportColumn.java index ff3af1e7b7..ed144a1b4e 100644 --- a/org.adempiere.base/src/org/compiere/report/MReportColumn.java +++ b/org.adempiere.base/src/org/compiere/report/MReportColumn.java @@ -71,7 +71,7 @@ public class MReportColumn extends X_PA_ReportColumn public String getSelectClause (boolean withSum) { String amountType = getPAAmountType(); // first character - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); if (withSum) sb.append("SUM("); if (PAAMOUNTTYPE_BalanceExpectedSign.equals(amountType)) @@ -211,7 +211,7 @@ public class MReportColumn extends X_PA_ReportColumn * @return */ private String getWhereCombination(int PA_Hierarchy_ID) { - StringBuffer whcomb = new StringBuffer(); + StringBuilder whcomb = new StringBuilder(); if (getC_ElementValue_ID() > 0) { String whtree = MReportTree.getWhereClause (getCtx(), PA_Hierarchy_ID, MReportColumn.ELEMENTTYPE_Account, getC_ElementValue_ID()); if (isIncludeNullsElementValue()) diff --git a/org.adempiere.base/src/org/compiere/report/MReportLine.java b/org.adempiere.base/src/org/compiere/report/MReportLine.java index a20f68174c..3a10426e87 100644 --- a/org.adempiere.base/src/org/compiere/report/MReportLine.java +++ b/org.adempiere.base/src/org/compiere/report/MReportLine.java @@ -180,7 +180,7 @@ public class MReportLine extends X_PA_ReportLine public String getSelectClause (boolean withSum) { String at = getPAAmountType().substring(0,1); // first letter - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); if (withSum) sb.append("SUM("); if (PAAMOUNTTYPE_BalanceExpectedSign.equals(at)) @@ -275,7 +275,7 @@ public class MReportLine extends X_PA_ReportLine else { // Multiple - StringBuffer sb = new StringBuffer ("("); + StringBuilder sb = new StringBuilder ("("); for (int i = 0; i < m_sources.length; i++) { if (i > 0) diff --git a/org.adempiere.base/src/org/compiere/report/MReportSource.java b/org.adempiere.base/src/org/compiere/report/MReportSource.java index 916969036a..4660623621 100644 --- a/org.adempiere.base/src/org/compiere/report/MReportSource.java +++ b/org.adempiere.base/src/org/compiere/report/MReportSource.java @@ -117,7 +117,7 @@ public class MReportSource extends X_PA_ReportSource * @return */ private String getWhereCombination(int PA_Hierarchy_ID) { - StringBuffer whcomb = new StringBuffer(); + StringBuilder whcomb = new StringBuilder(); if (getC_ElementValue_ID() > 0) { String whtree = MReportTree.getWhereClause (getCtx(), PA_Hierarchy_ID, MReportSource.ELEMENTTYPE_Account, getC_ElementValue_ID()); if (isIncludeNullsElementValue()) diff --git a/org.adempiere.base/src/org/compiere/report/MReportTree.java b/org.adempiere.base/src/org/compiere/report/MReportTree.java index 13a535e049..f0eaa185cf 100644 --- a/org.adempiere.base/src/org/compiere/report/MReportTree.java +++ b/org.adempiere.base/src/org/compiere/report/MReportTree.java @@ -306,7 +306,7 @@ public class MReportTree */ public String toString() { - StringBuffer sb = new StringBuffer("MReportTree[ElementType="); + StringBuilder sb = new StringBuilder("MReportTree[ElementType="); sb.append(m_ElementType).append(",TreeType=").append(m_TreeType) .append(",").append(m_tree) .append("]"); diff --git a/org.adempiere.base/src/org/compiere/report/TrialBalance.java b/org.adempiere.base/src/org/compiere/report/TrialBalance.java index 1a3a22d167..348b315826 100644 --- a/org.adempiere.base/src/org/compiere/report/TrialBalance.java +++ b/org.adempiere.base/src/org/compiere/report/TrialBalance.java @@ -298,7 +298,7 @@ public class TrialBalance extends SvrProcess */ private void createBalanceLine() { - StringBuffer sql = new StringBuffer (s_insert); + StringBuilder sql = new StringBuilder (s_insert); // (AD_PInstance_ID, Fact_Acct_ID, sql.append("SELECT ").append(getAD_PInstance_ID()).append(",0,"); // AD_Client_ID, AD_Org_ID, Created,CreatedBy, Updated,UpdatedBy, @@ -425,7 +425,7 @@ public class TrialBalance extends SvrProcess */ private void createDetailLines() { - StringBuffer sql = new StringBuffer (s_insert); + StringBuilder sql = new StringBuilder (s_insert); // (AD_PInstance_ID, Fact_Acct_ID, sql.append("SELECT ").append(getAD_PInstance_ID()).append(",Fact_Acct_ID,"); // AD_Client_ID, AD_Org_ID, Created,CreatedBy, Updated,UpdatedBy, diff --git a/org.adempiere.base/src/org/compiere/report/core/RColumn.java b/org.adempiere.base/src/org/compiere/report/core/RColumn.java index 4642585273..bf989c31ff 100644 --- a/org.adempiere.base/src/org/compiere/report/core/RColumn.java +++ b/org.adempiere.base/src/org/compiere/report/core/RColumn.java @@ -334,7 +334,7 @@ public class RColumn */ public String toString() { - StringBuffer sb = new StringBuffer("RColumn["); + StringBuilder sb = new StringBuilder("RColumn["); sb.append(m_colSQL).append("=").append(m_colHeader) .append("]"); return sb.toString(); 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 dbf2e14181..77e48ec9f5 100644 --- a/org.adempiere.base/src/org/compiere/report/core/RModelData.java +++ b/org.adempiere.base/src/org/compiere/report/core/RModelData.java @@ -102,7 +102,7 @@ public class RModelData { RColumn rc = null; // Create SQL - StringBuffer sql = new StringBuffer ("SELECT "); + StringBuilder sql = new StringBuilder ("SELECT "); int size = cols.size(); for (int i = 0; i < size; i++) { diff --git a/org.adempiere.base/src/org/compiere/tools/FileUtil.java b/org.adempiere.base/src/org/compiere/tools/FileUtil.java index 20f49d3ee3..04cef763fb 100644 --- a/org.adempiere.base/src/org/compiere/tools/FileUtil.java +++ b/org.adempiere.base/src/org/compiere/tools/FileUtil.java @@ -261,7 +261,7 @@ public class FileUtil boolean ignore = false; // char[] inLine = line.toCharArray(); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (int i = 0; i < inLine.length; i++) { char c = inLine[i]; diff --git a/org.adempiere.base/src/org/compiere/util/AdempiereSystemError.java b/org.adempiere.base/src/org/compiere/util/AdempiereSystemError.java index 4f75532fcd..73de9e9d1d 100644 --- a/org.adempiere.base/src/org/compiere/util/AdempiereSystemError.java +++ b/org.adempiere.base/src/org/compiere/util/AdempiereSystemError.java @@ -88,7 +88,7 @@ public class AdempiereSystemError extends Exception public String toString () { super.toString(); - StringBuffer sb = new StringBuffer ("SystemError: "); + StringBuilder sb = new StringBuilder ("SystemError: "); sb.append(getLocalizedMessage()); if (m_detail != null) sb.append(" (").append(m_detail).append (")"); diff --git a/org.adempiere.base/src/org/compiere/util/AdempiereUserError.java b/org.adempiere.base/src/org/compiere/util/AdempiereUserError.java index 45798c28b7..744b95559d 100644 --- a/org.adempiere.base/src/org/compiere/util/AdempiereUserError.java +++ b/org.adempiere.base/src/org/compiere/util/AdempiereUserError.java @@ -90,7 +90,7 @@ public class AdempiereUserError extends RuntimeException public String toString () { super.toString(); - StringBuffer sb = new StringBuffer ("UserError: "); + StringBuilder sb = new StringBuilder ("UserError: "); sb.append(getLocalizedMessage()); if (m_fixHint != null && m_fixHint.length() > 0) sb.append(" (").append(m_fixHint).append (")"); diff --git a/org.adempiere.base/src/org/compiere/util/AmtInWords_BG.java b/org.adempiere.base/src/org/compiere/util/AmtInWords_BG.java index 61a34e966f..dc17b06217 100644 --- a/org.adempiere.base/src/org/compiere/util/AmtInWords_BG.java +++ b/org.adempiere.base/src/org/compiere/util/AmtInWords_BG.java @@ -179,7 +179,7 @@ public class AmtInWords_BG implements AmtInWords if (amount == null) return amount; - StringBuffer sb = new StringBuffer (); + StringBuilder sb = new StringBuilder (); amount = amount.replaceAll (" ", "").replaceAll("\u00A0", ""); char sep = amount.contains(",")?',':'.'; //Try to determine the separator either comma or a full stop int pos = amount.lastIndexOf (sep); diff --git a/org.adempiere.base/src/org/compiere/util/AmtInWords_CA.java b/org.adempiere.base/src/org/compiere/util/AmtInWords_CA.java index c90c7fced2..98c6ad8b06 100644 --- a/org.adempiere.base/src/org/compiere/util/AmtInWords_CA.java +++ b/org.adempiere.base/src/org/compiere/util/AmtInWords_CA.java @@ -199,7 +199,7 @@ public class AmtInWords_CA implements AmtInWords if (amount == null) return amount; // - StringBuffer sb = new StringBuffer (); + StringBuilder sb = new StringBuilder (); // int pos = amount.lastIndexOf ('.'); // Old int pos = amount.lastIndexOf (','); // int pos2 = amount.lastIndexOf (','); // Old diff --git a/org.adempiere.base/src/org/compiere/util/AmtInWords_EN.java b/org.adempiere.base/src/org/compiere/util/AmtInWords_EN.java index b9eccd456e..a6eaccdfac 100644 --- a/org.adempiere.base/src/org/compiere/util/AmtInWords_EN.java +++ b/org.adempiere.base/src/org/compiere/util/AmtInWords_EN.java @@ -155,7 +155,7 @@ public class AmtInWords_EN implements AmtInWords if (amount == null) return amount; // - StringBuffer sb = new StringBuffer (); + StringBuilder sb = new StringBuilder (); int pos = amount.lastIndexOf ('.'); int pos2 = amount.lastIndexOf (','); if (pos2 > pos) diff --git a/org.adempiere.base/src/org/compiere/util/AmtInWords_ES.java b/org.adempiere.base/src/org/compiere/util/AmtInWords_ES.java index 86b36171c0..e1544a50ef 100644 --- a/org.adempiere.base/src/org/compiere/util/AmtInWords_ES.java +++ b/org.adempiere.base/src/org/compiere/util/AmtInWords_ES.java @@ -221,7 +221,7 @@ public class AmtInWords_ES implements AmtInWords Language lang = Env.getLanguage(Env.getCtx()); // - StringBuffer sb = new StringBuffer (); + StringBuilder sb = new StringBuilder (); int pos = 0; if(lang.isDecimalPoint()) diff --git a/org.adempiere.base/src/org/compiere/util/AmtInWords_FA.java b/org.adempiere.base/src/org/compiere/util/AmtInWords_FA.java index 51079ce6c6..2042cd8534 100644 --- a/org.adempiere.base/src/org/compiere/util/AmtInWords_FA.java +++ b/org.adempiere.base/src/org/compiere/util/AmtInWords_FA.java @@ -160,7 +160,7 @@ public class AmtInWords_FA implements AmtInWords { if (amount == null) return amount; // - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); int pos = amount.lastIndexOf('.'); int pos2 = amount.lastIndexOf(','); if (pos2 > pos) diff --git a/org.adempiere.base/src/org/compiere/util/AmtInWords_FR.java b/org.adempiere.base/src/org/compiere/util/AmtInWords_FR.java index db7e035f27..a0eb817a30 100644 --- a/org.adempiere.base/src/org/compiere/util/AmtInWords_FR.java +++ b/org.adempiere.base/src/org/compiere/util/AmtInWords_FR.java @@ -213,7 +213,7 @@ public class AmtInWords_FR implements AmtInWords if (amount == null) return amount; // - StringBuffer sb = new StringBuffer (); + StringBuilder sb = new StringBuilder (); int pos = amount.lastIndexOf ('.'); int pos2 = amount.lastIndexOf (','); if (pos2 > pos) diff --git a/org.adempiere.base/src/org/compiere/util/AmtInWords_HR.java b/org.adempiere.base/src/org/compiere/util/AmtInWords_HR.java index 61baaac725..7e464f45a1 100644 --- a/org.adempiere.base/src/org/compiere/util/AmtInWords_HR.java +++ b/org.adempiere.base/src/org/compiere/util/AmtInWords_HR.java @@ -470,7 +470,7 @@ boolean jedinceBezBroja) { if (amount == null) return amount; // - StringBuffer sb = new StringBuffer (); + StringBuilder sb = new StringBuilder (); amount = amount.replaceAll (",", ""); diff --git a/org.adempiere.base/src/org/compiere/util/AmtInWords_IT.java b/org.adempiere.base/src/org/compiere/util/AmtInWords_IT.java index 7f85ee774c..b9306a392c 100644 --- a/org.adempiere.base/src/org/compiere/util/AmtInWords_IT.java +++ b/org.adempiere.base/src/org/compiere/util/AmtInWords_IT.java @@ -179,7 +179,7 @@ public class AmtInWords_IT implements AmtInWords return amount; // assume rightmost point or comma as decimal separator - StringBuffer sb = new StringBuffer (); + StringBuilder sb = new StringBuilder (); int pos = amount.lastIndexOf (','); int pos2 = amount.lastIndexOf ('.'); if (pos2 > pos) diff --git a/org.adempiere.base/src/org/compiere/util/AmtInWords_MS.java b/org.adempiere.base/src/org/compiere/util/AmtInWords_MS.java index 73d0f36fd3..5dfc835a13 100644 --- a/org.adempiere.base/src/org/compiere/util/AmtInWords_MS.java +++ b/org.adempiere.base/src/org/compiere/util/AmtInWords_MS.java @@ -171,7 +171,7 @@ public class AmtInWords_MS implements AmtInWords if (amount == null) return amount; // - StringBuffer sb = new StringBuffer (); + StringBuilder sb = new StringBuilder (); sb.append("RINGGIT "); int pos = amount.lastIndexOf ('.'); int pos2 = amount.lastIndexOf (','); diff --git a/org.adempiere.base/src/org/compiere/util/AmtInWords_PL.java b/org.adempiere.base/src/org/compiere/util/AmtInWords_PL.java index e5e2a8dd2c..5556fc0f7d 100644 --- a/org.adempiere.base/src/org/compiere/util/AmtInWords_PL.java +++ b/org.adempiere.base/src/org/compiere/util/AmtInWords_PL.java @@ -138,7 +138,7 @@ public class AmtInWords_PL implements AmtInWords { if (amount == null) return amount; // - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); int pos = amount.lastIndexOf('.'); int pos2 = amount.lastIndexOf(','); if (pos2 > pos) diff --git a/org.adempiere.base/src/org/compiere/util/AmtInWords_PT.java b/org.adempiere.base/src/org/compiere/util/AmtInWords_PT.java index 7d12673c2b..836d186236 100644 --- a/org.adempiere.base/src/org/compiere/util/AmtInWords_PT.java +++ b/org.adempiere.base/src/org/compiere/util/AmtInWords_PT.java @@ -227,7 +227,7 @@ public class AmtInWords_PT implements AmtInWords if (amount == null) return amount; // - StringBuffer sb = new StringBuffer (); + StringBuilder sb = new StringBuilder (); // int pos = amount.lastIndexOf ('.'); // Old int pos = amount.lastIndexOf (','); // int pos2 = amount.lastIndexOf (','); // Old diff --git a/org.adempiere.base/src/org/compiere/util/AmtInWords_SR.java b/org.adempiere.base/src/org/compiere/util/AmtInWords_SR.java index c37e7d2276..95d8ec4895 100644 --- a/org.adempiere.base/src/org/compiere/util/AmtInWords_SR.java +++ b/org.adempiere.base/src/org/compiere/util/AmtInWords_SR.java @@ -190,7 +190,7 @@ public class AmtInWords_SR { if (amount == null) return amount; - StringBuffer sb = new StringBuffer (); + StringBuilder sb = new StringBuilder (); amount = amount.replaceAll (" ", "").replaceAll ("\u00A0", ""); char sep = amount.contains (",") ? ',' : '.'; // Try to determine the // separator either diff --git a/org.adempiere.base/src/org/compiere/util/AmtInWords_TH.java b/org.adempiere.base/src/org/compiere/util/AmtInWords_TH.java index 425ce073d0..19b94f1580 100644 --- a/org.adempiere.base/src/org/compiere/util/AmtInWords_TH.java +++ b/org.adempiere.base/src/org/compiere/util/AmtInWords_TH.java @@ -237,7 +237,7 @@ public class AmtInWords_TH implements AmtInWords if (amount == null) return amount; // - StringBuffer sb = new StringBuffer (); + StringBuilder sb = new StringBuilder (); int pos = amount.lastIndexOf ('.'); int pos2 = amount.lastIndexOf (','); if (pos2 > pos) @@ -280,7 +280,7 @@ public class AmtInWords_TH implements AmtInWords if (amount == null) return amount; // - StringBuffer sb = new StringBuffer (); + StringBuilder sb = new StringBuilder (); int pos = amount.lastIndexOf ('.'); int pos2 = amount.lastIndexOf (','); if (pos2 > pos) diff --git a/org.adempiere.base/src/org/compiere/util/AmtInWords_VI.java b/org.adempiere.base/src/org/compiere/util/AmtInWords_VI.java index 66499f3e21..4295fe2321 100644 --- a/org.adempiere.base/src/org/compiere/util/AmtInWords_VI.java +++ b/org.adempiere.base/src/org/compiere/util/AmtInWords_VI.java @@ -269,7 +269,7 @@ public class AmtInWords_VI implements AmtInWords // int numberOfCommas = 0; int numberOfPeriods = 0; - StringBuffer sb = new StringBuffer (); + StringBuilder sb = new StringBuilder (); int period = amount.lastIndexOf ('.'); numberOfPeriods = amount.replaceAll("[^\\.]","").length(); int comma = amount.lastIndexOf (','); diff --git a/org.adempiere.base/src/org/compiere/util/ArhRuntimeException.java b/org.adempiere.base/src/org/compiere/util/ArhRuntimeException.java index a1dc5c4978..4a6387910b 100644 --- a/org.adempiere.base/src/org/compiere/util/ArhRuntimeException.java +++ b/org.adempiere.base/src/org/compiere/util/ArhRuntimeException.java @@ -70,7 +70,7 @@ public class ArhRuntimeException */ public String getLocalizedMessage() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); Properties ctx = Env.getCtx(); // Message String msg = getMessage(); diff --git a/org.adempiere.base/src/org/compiere/util/CLogConsole.java b/org.adempiere.base/src/org/compiere/util/CLogConsole.java index a8cfb93ce1..d39b968afd 100644 --- a/org.adempiere.base/src/org/compiere/util/CLogConsole.java +++ b/org.adempiere.base/src/org/compiere/util/CLogConsole.java @@ -242,7 +242,7 @@ public class CLogConsole extends Handler */ public String toString () { - StringBuffer sb = new StringBuffer ("CLogConsole["); + StringBuilder sb = new StringBuilder ("CLogConsole["); sb.append("Level=").append(getLevel()) .append ("]"); return sb.toString (); diff --git a/org.adempiere.base/src/org/compiere/util/CLogErrorBuffer.java b/org.adempiere.base/src/org/compiere/util/CLogErrorBuffer.java index e3864866d1..0b00e06393 100644 --- a/org.adempiere.base/src/org/compiere/util/CLogErrorBuffer.java +++ b/org.adempiere.base/src/org/compiere/util/CLogErrorBuffer.java @@ -422,7 +422,7 @@ public class CLogErrorBuffer extends Handler LinkedList m_logs = (LinkedList) Env.getCtx().get(LOGS_KEY); LinkedList m_errors = (LinkedList) Env.getCtx().get(ERRORS_KEY); LinkedList m_history = (LinkedList) Env.getCtx().get(HISTORY_KEY); - StringBuffer sb = new StringBuffer ("CLogErrorBuffer["); + StringBuilder sb = new StringBuilder ("CLogErrorBuffer["); sb.append("Errors=").append(m_errors.size()) .append(",History=").append(m_history.size()) .append(",Logs=").append(m_logs.size()) diff --git a/org.adempiere.base/src/org/compiere/util/CLogFile.java b/org.adempiere.base/src/org/compiere/util/CLogFile.java index 8bb1651fff..eac1c8ec99 100644 --- a/org.adempiere.base/src/org/compiere/util/CLogFile.java +++ b/org.adempiere.base/src/org/compiere/util/CLogFile.java @@ -346,7 +346,7 @@ public class CLogFile extends Handler */ public String toString () { - StringBuffer sb = new StringBuffer ("CLogFile["); + StringBuilder sb = new StringBuilder ("CLogFile["); sb.append(getFileName()).append(",Level=").append(getLevel()) .append ("]"); return sb.toString (); diff --git a/org.adempiere.base/src/org/compiere/util/CLogFormatter.java b/org.adempiere.base/src/org/compiere/util/CLogFormatter.java index 77050a069a..47de57ad14 100644 --- a/org.adempiere.base/src/org/compiere/util/CLogFormatter.java +++ b/org.adempiere.base/src/org/compiere/util/CLogFormatter.java @@ -68,7 +68,7 @@ public class CLogFormatter extends Formatter */ public String format (LogRecord record) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); long ms = record.getMillis(); Timestamp ts = null; @@ -201,7 +201,7 @@ public class CLogFormatter extends Formatter */ public static String getClassMethod (LogRecord record) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); String className = record.getLoggerName(); if (className == null || className.indexOf("default") != -1 // anonymous logger @@ -232,7 +232,7 @@ public class CLogFormatter extends Formatter */ public static String getParameters (LogRecord record) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); Object[] parameters = record.getParameters(); if (parameters != null && parameters.length > 0) { diff --git a/org.adempiere.base/src/org/compiere/util/CLogMgt.java b/org.adempiere.base/src/org/compiere/util/CLogMgt.java index e928f28a4e..49b3fb372d 100644 --- a/org.adempiere.base/src/org/compiere/util/CLogMgt.java +++ b/org.adempiere.base/src/org/compiere/util/CLogMgt.java @@ -623,7 +623,7 @@ public class CLogMgt */ private static String getServerInfo() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); CConnection cc = CConnection.get(); // Host sb.append(cc.getAppsHost()).append(" ("); @@ -645,7 +645,7 @@ public class CLogMgt */ private static String getDatabaseInfo() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(CConnection.get().getDbHost()).append(" : ") .append(CConnection.get().getDbPort()).append(" / ") .append(CConnection.get().getDbName()); diff --git a/org.adempiere.base/src/org/compiere/util/CLogger.java b/org.adempiere.base/src/org/compiere/util/CLogger.java index b03b918fb8..072a064293 100644 --- a/org.adempiere.base/src/org/compiere/util/CLogger.java +++ b/org.adempiere.base/src/org/compiere/util/CLogger.java @@ -302,7 +302,7 @@ public class CLogger extends Logger implements Serializable */ public String toString () { - StringBuffer sb = new StringBuffer ("CLogger["); + StringBuilder sb = new StringBuilder ("CLogger["); sb.append (getName()) .append (",Level=").append (getLevel()).append ("]"); return sb.toString (); diff --git a/org.adempiere.base/src/org/compiere/util/CMemoryUsage.java b/org.adempiere.base/src/org/compiere/util/CMemoryUsage.java index 352b6f55ff..482fcee5bb 100644 --- a/org.adempiere.base/src/org/compiere/util/CMemoryUsage.java +++ b/org.adempiere.base/src/org/compiere/util/CMemoryUsage.java @@ -111,7 +111,7 @@ public class CMemoryUsage extends MemoryUsage */ public String toString () { - StringBuffer sb = new StringBuffer (); + StringBuilder sb = new StringBuilder (); sb.append ("Init=").append(format(getInit())) .append (", Used=").append(format(getUsed())) .append (", Free=").append(format(getFree())) diff --git a/org.adempiere.base/src/org/compiere/util/CStatementVO.java b/org.adempiere.base/src/org/compiere/util/CStatementVO.java index 7b364f9702..73886b913e 100644 --- a/org.adempiere.base/src/org/compiere/util/CStatementVO.java +++ b/org.adempiere.base/src/org/compiere/util/CStatementVO.java @@ -66,7 +66,7 @@ public class CStatementVO implements Serializable */ public String toString() { - StringBuffer sb = new StringBuffer("CStatementVO["); + StringBuilder sb = new StringBuilder("CStatementVO["); sb.append("SQL="+getSql()); if (m_trxName != null) sb.append(" TrxName=" + m_trxName); diff --git a/org.adempiere.base/src/org/compiere/util/CacheMgt.java b/org.adempiere.base/src/org/compiere/util/CacheMgt.java index 6068a5d409..8d112c54bb 100644 --- a/org.adempiere.base/src/org/compiere/util/CacheMgt.java +++ b/org.adempiere.base/src/org/compiere/util/CacheMgt.java @@ -281,7 +281,7 @@ public class CacheMgt */ public String toString () { - StringBuffer sb = new StringBuffer ("CacheMgt["); + StringBuilder sb = new StringBuilder ("CacheMgt["); sb.append("Instances=") .append(m_instances.size()) .append("]"); @@ -294,7 +294,7 @@ public class CacheMgt */ public String toStringX () { - StringBuffer sb = new StringBuffer ("CacheMgt["); + StringBuilder sb = new StringBuilder ("CacheMgt["); sb.append("Instances=") .append(m_instances.size()) .append(", Elements=") diff --git a/org.adempiere.base/src/org/compiere/util/DB.java b/org.adempiere.base/src/org/compiere/util/DB.java index c802d3d25d..cde5a93922 100644 --- a/org.adempiere.base/src/org/compiere/util/DB.java +++ b/org.adempiere.base/src/org/compiere/util/DB.java @@ -2040,7 +2040,7 @@ public final class DB SQLWarning warn = warning; while (warn != null) { - StringBuffer buffer = new StringBuffer(); + StringBuilder buffer = new StringBuilder(); buffer.append(warn.getMessage()) .append("; State=").append(warn.getSQLState()) .append("; ErrorCode=").append(warn.getErrorCode()); @@ -2135,7 +2135,7 @@ public final class DB text = txt.substring(0, maxLength); // copy characters (we need to look through anyway) - StringBuffer out = new StringBuffer(); + StringBuilder out = new StringBuilder(); out.append(QUOTE); // ' for (int i = 0; i < text.length(); i++) { @@ -2355,7 +2355,7 @@ public final class DB */ public static void createT_Selection(int AD_PInstance_ID, Collection selection, String trxName) { - StringBuffer insert = new StringBuffer(); + StringBuilder insert = new StringBuilder(); insert.append("INSERT INTO T_SELECTION(AD_PINSTANCE_ID, T_SELECTION_ID) "); int counter = 0; for(Integer selectedId : selection) @@ -2372,7 +2372,7 @@ public final class DB if (counter >= 1000) { DB.executeUpdateEx(insert.toString(), trxName); - insert = new StringBuffer(); + insert = new StringBuilder(); insert.append("INSERT INTO T_SELECTION(AD_PINSTANCE_ID, T_SELECTION_ID) "); counter = 0; } diff --git a/org.adempiere.base/src/org/compiere/util/EMail.java b/org.adempiere.base/src/org/compiere/util/EMail.java index dd91d35857..2fee23e3f6 100644 --- a/org.adempiere.base/src/org/compiere/util/EMail.java +++ b/org.adempiere.base/src/org/compiere/util/EMail.java @@ -330,7 +330,7 @@ public final class EMail implements Serializable catch (MessagingException me) { Exception ex = me; - StringBuffer sb = new StringBuffer("(ME)"); + StringBuilder sb = new StringBuilder("(ME)"); boolean printed = false; do { @@ -763,7 +763,7 @@ public final class EMail implements Serializable if (m_messageText == null) return ""; char[] chars = m_messageText.toCharArray(); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (int i = 0; i < chars.length; i++) { char c = chars[i]; @@ -1082,7 +1082,7 @@ public final class EMail implements Serializable */ public String toString () { - StringBuffer sb = new StringBuffer ("EMail["); + StringBuilder sb = new StringBuilder ("EMail["); sb.append("From:").append(m_from) .append(",To:").append(getTo()) .append(",Subject=").append(getSubject()) diff --git a/org.adempiere.base/src/org/compiere/util/Env.java b/org.adempiere.base/src/org/compiere/util/Env.java index 33f175d035..f3f75276d8 100644 --- a/org.adempiere.base/src/org/compiere/util/Env.java +++ b/org.adempiere.base/src/org/compiere/util/Env.java @@ -1240,7 +1240,7 @@ public final class Env */ public static String getHeader(Properties ctx, int WindowNo) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); if (WindowNo > 0){ sb.append(getContext(ctx, WindowNo, "WindowName", false)).append(" "); final String documentNo = getContext(ctx, WindowNo, "DocumentNo", false); @@ -1346,7 +1346,7 @@ public final class Env String token; String inStr = new String(value); - StringBuffer outStr = new StringBuffer(); + StringBuilder outStr = new StringBuilder(); int i = inStr.indexOf('@'); while (i != -1) @@ -1424,7 +1424,7 @@ public final class Env String token; String inStr = new String(expression); - StringBuffer outStr = new StringBuffer(); + StringBuilder outStr = new StringBuilder(); int i = inStr.indexOf('@'); while (i != -1) diff --git a/org.adempiere.base/src/org/compiere/util/EnvLoader.java b/org.adempiere.base/src/org/compiere/util/EnvLoader.java index c86de93c74..1a9cbd3046 100644 --- a/org.adempiere.base/src/org/compiere/util/EnvLoader.java +++ b/org.adempiere.base/src/org/compiere/util/EnvLoader.java @@ -93,8 +93,8 @@ public class EnvLoader if (DEBUG) System.out.println("** Command executed: " + command); - StringBuffer bufOut = new StringBuffer(); - StringBuffer bufErr = new StringBuffer(); + StringBuilder bufOut = new StringBuilder(); + StringBuilder bufErr = new StringBuilder(); try { InputStream in = cmd.getInputStream(); diff --git a/org.adempiere.base/src/org/compiere/util/FileUpload.java b/org.adempiere.base/src/org/compiere/util/FileUpload.java index 2188ce2f5c..c666223f24 100644 --- a/org.adempiere.base/src/org/compiere/util/FileUpload.java +++ b/org.adempiere.base/src/org/compiere/util/FileUpload.java @@ -280,7 +280,7 @@ public class FileUpload */ public String toString () { - StringBuffer sb = new StringBuffer ("FileUpload["); + StringBuilder sb = new StringBuilder ("FileUpload["); if (m_fileName != null) sb.append(m_fileName); if (m_error != null) diff --git a/org.adempiere.base/src/org/compiere/util/GenericPaymentExport.java b/org.adempiere.base/src/org/compiere/util/GenericPaymentExport.java index 372ee93d1c..ccfc608413 100644 --- a/org.adempiere.base/src/org/compiere/util/GenericPaymentExport.java +++ b/org.adempiere.base/src/org/compiere/util/GenericPaymentExport.java @@ -130,7 +130,7 @@ public class GenericPaymentExport implements PaymentExport String bp[] = getBPartnerInfo(mpp.getC_BPartner_ID()); // Comment - list of invoice document no - StringBuffer comment = new StringBuffer(); + StringBuilder comment = new StringBuilder(); MPaySelectionLine[] psls = mpp.getPaySelectionLines(false); for (int l = 0; l < psls.length; l++) { diff --git a/org.adempiere.base/src/org/compiere/util/Ini.java b/org.adempiere.base/src/org/compiere/util/Ini.java index 7e9ae05d39..4b1facb955 100644 --- a/org.adempiere.base/src/org/compiere/util/Ini.java +++ b/org.adempiere.base/src/org/compiere/util/Ini.java @@ -659,7 +659,7 @@ public final class Ini implements Serializable */ public static String getAsString() { - StringBuffer buf = new StringBuffer ("Ini["); + StringBuilder buf = new StringBuilder ("Ini["); Enumeration e = s_prop.keys(); while (e.hasMoreElements()) { diff --git a/org.adempiere.base/src/org/compiere/util/Login.java b/org.adempiere.base/src/org/compiere/util/Login.java index 8f6d76db09..53407ee63e 100644 --- a/org.adempiere.base/src/org/compiere/util/Login.java +++ b/org.adempiere.base/src/org/compiere/util/Login.java @@ -127,7 +127,7 @@ public class Login return true; // Error Message - StringBuffer msg = new StringBuffer(); + StringBuilder msg = new StringBuilder(); msg.append(System.getProperty("java.vm.name")).append(" - ").append(jVersion); msg.append(" <> 1.6.0 | 1.7.0"); // @@ -1306,7 +1306,7 @@ public class Login ArrayList clientList = new ArrayList(); ArrayList clientsValidated = new ArrayList(); - StringBuffer where = new StringBuffer("Password IS NOT NULL AND "); + StringBuilder where = new StringBuilder("Password IS NOT NULL AND "); if (email_login) where.append("EMail=?"); else @@ -1408,7 +1408,7 @@ public class Login } } - StringBuffer sql= new StringBuffer("SELECT DISTINCT cli.AD_Client_ID, cli.Name, u.AD_User_ID, u.Name"); + StringBuilder sql= new StringBuilder("SELECT DISTINCT cli.AD_Client_ID, cli.Name, u.AD_User_ID, u.Name"); sql.append(" FROM AD_User_Roles ur") .append(" INNER JOIN AD_User u on (ur.AD_User_ID=u.AD_User_ID)") .append(" INNER JOIN AD_Client cli on (ur.AD_Client_ID=cli.AD_Client_ID)") @@ -1606,7 +1606,7 @@ public class Login int AD_User_ID = Env.getContextAsInt(m_ctx, "#AD_User_ID"); KeyNamePair[] retValue = null; ArrayList clientList = new ArrayList(); - StringBuffer sql= new StringBuffer("SELECT DISTINCT cli.AD_Client_ID, cli.Name, u.AD_User_ID, u.Name"); + StringBuilder sql= new StringBuilder("SELECT DISTINCT cli.AD_Client_ID, cli.Name, u.AD_User_ID, u.Name"); sql.append(" FROM AD_User_Roles ur") .append(" INNER JOIN AD_User u on (ur.AD_User_ID=u.AD_User_ID)") .append(" INNER JOIN AD_Client cli on (ur.AD_Client_ID=cli.AD_Client_ID)") diff --git a/org.adempiere.base/src/org/compiere/util/MSort.java b/org.adempiere.base/src/org/compiere/util/MSort.java index 86d98e54d5..37e50e067e 100644 --- a/org.adempiere.base/src/org/compiere/util/MSort.java +++ b/org.adempiere.base/src/org/compiere/util/MSort.java @@ -171,7 +171,7 @@ public final class MSort implements Comparator, Serializable */ public String toString() { - StringBuffer sb = new StringBuffer("MSort["); + StringBuilder sb = new StringBuilder("MSort["); sb.append("Index=").append(index).append(",Data=").append(data); sb.append("]"); return sb.toString(); diff --git a/org.adempiere.base/src/org/compiere/util/Msg.java b/org.adempiere.base/src/org/compiere/util/Msg.java index 07bac85192..8a1e29605d 100644 --- a/org.adempiere.base/src/org/compiere/util/Msg.java +++ b/org.adempiere.base/src/org/compiere/util/Msg.java @@ -133,7 +133,7 @@ public final class Msg while (rs.next()) { String AD_Message = rs.getString(1); - StringBuffer MsgText = new StringBuffer(); + StringBuilder MsgText = new StringBuilder(); MsgText.append(rs.getString(2)); String MsgTip = rs.getString(3); // @@ -425,7 +425,7 @@ public final class Msg } // Fallback - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); int pos = amount.lastIndexOf('.'); int pos2 = amount.lastIndexOf(','); if (pos2 > pos) @@ -645,7 +645,7 @@ public final class Msg String inStr = text; String token; - StringBuffer outStr = new StringBuffer(); + StringBuilder outStr = new StringBuilder(); int i = inStr.indexOf('@'); while (i != -1) diff --git a/org.adempiere.base/src/org/compiere/util/NamePair.java b/org.adempiere.base/src/org/compiere/util/NamePair.java index d444973a52..2e8aa1be86 100644 --- a/org.adempiere.base/src/org/compiere/util/NamePair.java +++ b/org.adempiere.base/src/org/compiere/util/NamePair.java @@ -124,7 +124,7 @@ public abstract class NamePair implements Comparator, Serializable, Comp */ public String toStringX() { - StringBuffer sb = new StringBuffer (getID()); + StringBuilder sb = new StringBuilder (getID()); sb.append("=").append(m_name); return sb.toString(); } // toStringX diff --git a/org.adempiere.base/src/org/compiere/util/Secure.java b/org.adempiere.base/src/org/compiere/util/Secure.java index 5956c26e1c..3b79e27273 100644 --- a/org.adempiere.base/src/org/compiere/util/Secure.java +++ b/org.adempiere.base/src/org/compiere/util/Secure.java @@ -73,7 +73,7 @@ public class Secure implements SecureInterface { // see also Util.toHex int size = bytes.length; - StringBuffer buffer = new StringBuffer(size*2); + StringBuilder buffer = new StringBuilder(size*2); for(int i=0; i 0 && parameter[0] != null) subject.append(parameter[0]); // - StringBuffer message = new StringBuffer(); + StringBuilder message = new StringBuilder(); String hdr = wStore.getEMailFooter(); if (hdr != null && hdr.length() > 0) message.append(hdr).append("\n"); @@ -1191,7 +1191,7 @@ public final class WebUtil wu.setEmail (s.trim()); } // - StringBuffer mandatory = new StringBuffer(); + StringBuilder mandatory = new StringBuilder(); String s = WebUtil.getParameter (request, "Name"); if (s != null && s.length() != 0) wu.setName(s.trim()); diff --git a/org.adempiere.base/src/org/compiere/util/ZipUtil.java b/org.adempiere.base/src/org/compiere/util/ZipUtil.java index da687cef45..418246c9ee 100644 --- a/org.adempiere.base/src/org/compiere/util/ZipUtil.java +++ b/org.adempiere.base/src/org/compiere/util/ZipUtil.java @@ -219,7 +219,7 @@ public class ZipUtil */ public String getEntryInfo (String name) { - StringBuffer sb = new StringBuffer(name); + StringBuilder sb = new StringBuilder(name); ZipEntry e = getEntry(name); if (e == null) sb.append(": -"); diff --git a/org.adempiere.base/src/org/compiere/wf/DocWorkflowManager.java b/org.adempiere.base/src/org/compiere/wf/DocWorkflowManager.java index 5e66d7e36b..5c4772a472 100644 --- a/org.adempiere.base/src/org/compiere/wf/DocWorkflowManager.java +++ b/org.adempiere.base/src/org/compiere/wf/DocWorkflowManager.java @@ -203,7 +203,7 @@ public class DocWorkflowManager implements DocWorkflowMgr */ public String toString() { - StringBuffer sb = new StringBuffer("DocWorkflowManager["); + StringBuilder sb = new StringBuilder("DocWorkflowManager["); sb.append("Called=").append(m_noCalled) .append(",Stated=").append(m_noStarted) .append("]"); diff --git a/org.adempiere.base/src/org/compiere/wf/MWFActivity.java b/org.adempiere.base/src/org/compiere/wf/MWFActivity.java index 69daaa7fc4..61280eb085 100644 --- a/org.adempiere.base/src/org/compiere/wf/MWFActivity.java +++ b/org.adempiere.base/src/org/compiere/wf/MWFActivity.java @@ -91,7 +91,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable public static MWFActivity[] get (Properties ctx, int AD_Table_ID, int Record_ID, boolean activeOnly) { ArrayList params = new ArrayList(); - StringBuffer whereClause = new StringBuffer("AD_Table_ID=? AND Record_ID=?"); + StringBuilder whereClause = new StringBuilder("AD_Table_ID=? AND Record_ID=?"); params.add(AD_Table_ID); params.add(Record_ID); if (activeOnly) @@ -122,7 +122,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable if (acts == null || acts.length == 0) return null; // - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (int i = 0; i < acts.length; i++) { if (i > 0) @@ -541,7 +541,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable if (obj == null) return; // - StringBuffer TextMsg = new StringBuffer (); + StringBuilder TextMsg = new StringBuilder (); if (obj instanceof Exception) { Exception ex = (Exception)obj; @@ -1740,7 +1740,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable public String getHistoryHTML() { SimpleDateFormat format = DisplayType.getDateFormat(DisplayType.DateTime); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); MWFEventAudit[] events = MWFEventAudit.get(getCtx(), getAD_WF_Process_ID(), get_TrxName()); for (int i = 0; i < events.length; i++) { @@ -1807,7 +1807,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable */ public String toString () { - StringBuffer sb = new StringBuffer ("MWFActivity["); + StringBuilder sb = new StringBuilder ("MWFActivity["); sb.append(get_ID()).append(",Node="); if (m_node == null) sb.append(getAD_WF_Node_ID()); @@ -1827,7 +1827,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable */ public String toStringX () { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(getWFStateText()) .append(": ").append(getNode().getName()); if (getAD_User_ID() > 0) @@ -1847,7 +1847,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable PO po = getPO(); if (po == null) return null; - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); String[] keyColumns = po.get_KeyColumns(); if ((keyColumns != null) && (keyColumns.length > 0)) sb.append(Msg.getElement(getCtx(), keyColumns[0])).append(" "); diff --git a/org.adempiere.base/src/org/compiere/wf/MWFEventAudit.java b/org.adempiere.base/src/org/compiere/wf/MWFEventAudit.java index 0d81b52b01..0c8c287b76 100644 --- a/org.adempiere.base/src/org/compiere/wf/MWFEventAudit.java +++ b/org.adempiere.base/src/org/compiere/wf/MWFEventAudit.java @@ -67,7 +67,7 @@ public class MWFEventAudit extends X_AD_WF_EventAudit public static MWFEventAudit[] get (Properties ctx, int AD_WF_Process_ID, int AD_WF_Node_ID, String trxName) { ArrayList params = new ArrayList(); - StringBuffer whereClause = new StringBuffer("AD_WF_Process_ID=?"); + StringBuilder whereClause = new StringBuilder("AD_WF_Process_ID=?"); params.add(AD_WF_Process_ID); if (AD_WF_Node_ID > 0) { diff --git a/org.adempiere.base/src/org/compiere/wf/MWFNextCondition.java b/org.adempiere.base/src/org/compiere/wf/MWFNextCondition.java index a1db6e1a7c..77b9e6ef1a 100644 --- a/org.adempiere.base/src/org/compiere/wf/MWFNextCondition.java +++ b/org.adempiere.base/src/org/compiere/wf/MWFNextCondition.java @@ -288,7 +288,7 @@ public class MWFNextCondition extends X_AD_WF_NextCondition */ public String toString () { - StringBuffer sb = new StringBuffer ("MWFNextCondition["); + StringBuilder sb = new StringBuilder ("MWFNextCondition["); sb.append(get_ID()).append(",SeqNo=").append(getSeqNo()) .append ("]"); return sb.toString (); diff --git a/org.adempiere.base/src/org/compiere/wf/MWFNode.java b/org.adempiere.base/src/org/compiere/wf/MWFNode.java index 76cfad344b..fac1a00a93 100644 --- a/org.adempiere.base/src/org/compiere/wf/MWFNode.java +++ b/org.adempiere.base/src/org/compiere/wf/MWFNode.java @@ -519,7 +519,7 @@ public class MWFNode extends X_AD_WF_Node */ public String toString () { - StringBuffer sb = new StringBuffer ("MWFNode["); + StringBuilder sb = new StringBuilder ("MWFNode["); sb.append(get_ID()) .append("-").append(getName()) .append(",Action=").append(getActionInfo()) @@ -533,7 +533,7 @@ public class MWFNode extends X_AD_WF_Node */ public String toStringX () { - StringBuffer sb = new StringBuffer ("MWFNode["); + StringBuilder sb = new StringBuilder ("MWFNode["); sb.append(getName()) .append("-").append(getActionInfo()) .append("]"); diff --git a/org.adempiere.base/src/org/compiere/wf/MWFNodeNext.java b/org.adempiere.base/src/org/compiere/wf/MWFNodeNext.java index 47f85c5ddc..dc66cacaf9 100644 --- a/org.adempiere.base/src/org/compiere/wf/MWFNodeNext.java +++ b/org.adempiere.base/src/org/compiere/wf/MWFNodeNext.java @@ -105,7 +105,7 @@ public class MWFNodeNext extends X_AD_WF_NodeNext */ public String toString () { - StringBuffer sb = new StringBuffer ("MWFNodeNext["); + StringBuilder sb = new StringBuilder ("MWFNodeNext["); sb.append(getSeqNo()) .append(":Node=").append(getAD_WF_Node_ID()).append("->Next=").append(getAD_WF_Next_ID()); if (m_conditions != null) diff --git a/org.adempiere.base/src/org/compiere/wf/MWFProcess.java b/org.adempiere.base/src/org/compiere/wf/MWFProcess.java index ced3fb7862..27036a8e51 100644 --- a/org.adempiere.base/src/org/compiere/wf/MWFProcess.java +++ b/org.adempiere.base/src/org/compiere/wf/MWFProcess.java @@ -171,7 +171,7 @@ public class MWFProcess extends X_AD_WF_Process return m_activities; // ArrayList params = new ArrayList(); - StringBuffer whereClause = new StringBuffer("AD_WF_Process_ID=?"); + StringBuilder whereClause = new StringBuilder("AD_WF_Process_ID=?"); params.add(getAD_WF_Process_ID()); if (onlyActive) { @@ -563,7 +563,7 @@ public class MWFProcess extends X_AD_WF_Process if (obj == null) return; // - StringBuffer TextMsg = new StringBuffer (); + StringBuilder TextMsg = new StringBuilder (); if (obj instanceof Exception) { Exception ex = (Exception)obj; diff --git a/org.adempiere.base/src/org/compiere/wf/MWFResponsible.java b/org.adempiere.base/src/org/compiere/wf/MWFResponsible.java index 8e99803d4a..ae042c6099 100644 --- a/org.adempiere.base/src/org/compiere/wf/MWFResponsible.java +++ b/org.adempiere.base/src/org/compiere/wf/MWFResponsible.java @@ -166,7 +166,7 @@ public class MWFResponsible extends X_AD_WF_Responsible */ public String toString () { - StringBuffer sb = new StringBuffer("MWFResponsible["); + StringBuilder sb = new StringBuilder("MWFResponsible["); sb.append (get_ID()) .append("-").append(getName()) .append(",Type=").append(getResponsibleType()); diff --git a/org.adempiere.base/src/org/compiere/wf/MWorkflow.java b/org.adempiere.base/src/org/compiere/wf/MWorkflow.java index 305fb057ce..1afd575325 100644 --- a/org.adempiere.base/src/org/compiere/wf/MWorkflow.java +++ b/org.adempiere.base/src/org/compiere/wf/MWorkflow.java @@ -589,7 +589,7 @@ public class MWorkflow extends X_AD_Workflow */ public String toString () { - StringBuffer sb = new StringBuffer ("MWorkflow["); + StringBuilder sb = new StringBuilder ("MWorkflow["); sb.append(get_ID()).append("-").append(getName()) .append ("]"); return sb.toString (); diff --git a/org.adempiere.base/src/org/eevolution/model/MDDOrder.java b/org.adempiere.base/src/org/eevolution/model/MDDOrder.java index 95ee6982ba..8f1d508765 100644 --- a/org.adempiere.base/src/org/eevolution/model/MDDOrder.java +++ b/org.adempiere.base/src/org/eevolution/model/MDDOrder.java @@ -969,7 +969,7 @@ public class MDDOrder extends X_DD_Order implements DocAction approveIt(); getLines(true,null); log.info(toString()); - StringBuffer info = new StringBuffer(); + StringBuilder info = new StringBuilder(); String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE); if (valid != null) { @@ -1216,7 +1216,7 @@ public class MDDOrder extends X_DD_Order implements DocAction */ public String getSummary() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(getDocumentNo()); if (m_lines != null) diff --git a/org.adempiere.base/src/org/eevolution/process/ImportInventoryMove.java b/org.adempiere.base/src/org/eevolution/process/ImportInventoryMove.java index 686ac00f61..351eb37b46 100644 --- a/org.adempiere.base/src/org/eevolution/process/ImportInventoryMove.java +++ b/org.adempiere.base/src/org/eevolution/process/ImportInventoryMove.java @@ -239,7 +239,7 @@ public class ImportInventoryMove extends SvrProcess private MMovementLine getMInventoryMoveLine(MMovement move, X_I_Movement imove) { - final StringBuffer whereClause = new StringBuffer(); + final StringBuilder whereClause = new StringBuilder(); ArrayList parameters = new ArrayList(); MColumn[] cols = getMInventoryMoveColumns(); @@ -360,7 +360,7 @@ public class ImportInventoryMove extends SvrProcess imove.saveEx(); - StringBuffer err = new StringBuffer(""); + StringBuilder err = new StringBuilder(""); if(imove.getAD_Org_ID() <=0) err.append(" @AD_Org_ID@ @NotFound@,"); diff --git a/org.adempiere.base/src/org/globalqss/process/CashFlow.java b/org.adempiere.base/src/org/globalqss/process/CashFlow.java index 98a763ffb4..c9b9e257fb 100644 --- a/org.adempiere.base/src/org/globalqss/process/CashFlow.java +++ b/org.adempiere.base/src/org/globalqss/process/CashFlow.java @@ -87,7 +87,7 @@ public class CashFlow extends SvrProcess { log.info("Calculating initial balance"); /* initial balance */ - StringBuffer sqlIni = new StringBuffer ("SELECT SUM(acctBalance(Account_ID,AmtAcctDr,AmtAcctCr)) FROM Fact_Acct WHERE DateAcct<="); + StringBuilder sqlIni = new StringBuilder ("SELECT SUM(acctBalance(Account_ID,AmtAcctDr,AmtAcctCr)) FROM Fact_Acct WHERE DateAcct<="); sqlIni.append(DB.TO_DATE(p_dateFrom)).append(" AND PostingType='").append(MFactAcct.POSTINGTYPE_Actual).append("' AND "); // initial balance - the balance of selected account on selected schema on default hierarchy String whereClause = MReportTree.getWhereClause(getCtx(), 0, MAcctSchemaElement.ELEMENTTYPE_Account, p_C_ElementValue_ID); diff --git a/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetArrayException.java b/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetArrayException.java index aa21a23a08..056987833a 100644 --- a/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetArrayException.java +++ b/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetArrayException.java @@ -23,7 +23,7 @@ public class AssetArrayException extends AssetException private static String buildMessage(List errors) { - StringBuffer sb = new StringBuffer("The following errors were encountered: "); // TODO: translate + StringBuilder sb = new StringBuilder("The following errors were encountered: "); // TODO: translate for (Exception e : errors) { sb.append("\n"+e.getLocalizedMessage()); diff --git a/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetStatusChangedException.java b/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetStatusChangedException.java index a0580ba89c..7657349d90 100644 --- a/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetStatusChangedException.java +++ b/org.adempiere.base/src/org/idempiere/fa/exceptions/AssetStatusChangedException.java @@ -25,7 +25,7 @@ public class AssetStatusChangedException extends AssetException private static String buildMsg(String msg) { - StringBuffer sb = new StringBuffer("@AssetStatusChanged@"); + StringBuilder sb = new StringBuilder("@AssetStatusChanged@"); if (!Util.isEmpty(msg)) sb.append(" ").append(msg); return sb.toString(); diff --git a/org.adempiere.extend/src/compiere/model/MyValidator.java b/org.adempiere.extend/src/compiere/model/MyValidator.java index cb50223f09..5fb87b1b2e 100644 --- a/org.adempiere.extend/src/compiere/model/MyValidator.java +++ b/org.adempiere.extend/src/compiere/model/MyValidator.java @@ -212,7 +212,7 @@ public class MyValidator implements ModelValidator */ public String toString () { - StringBuffer sb = new StringBuffer ("MyValidator[Order@Gardenworld"); + StringBuilder sb = new StringBuilder ("MyValidator[Order@Gardenworld"); sb.append ("]"); return sb.toString (); } // toString diff --git a/org.adempiere.extend/src/test/functional/POTest.java b/org.adempiere.extend/src/test/functional/POTest.java index d25f6252e6..47c99fa56c 100644 --- a/org.adempiere.extend/src/test/functional/POTest.java +++ b/org.adempiere.extend/src/test/functional/POTest.java @@ -129,7 +129,7 @@ public class POTest extends AdempiereTestCase public void testTruncatedStrings() { // // Creating a huge string for testing: - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (int i = 1; i <= 1000; i++) { sb.append("0123456789"); } diff --git a/org.adempiere.extend/src/test/functional/inventory/MMScenario.java b/org.adempiere.extend/src/test/functional/inventory/MMScenario.java index 43807c17ca..3ce9bdd673 100644 --- a/org.adempiere.extend/src/test/functional/inventory/MMScenario.java +++ b/org.adempiere.extend/src/test/functional/inventory/MMScenario.java @@ -79,7 +79,7 @@ public class MMScenario @Override public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("__SCENARIO________________________________________________\n"); sb.append(" Name : "+this.name).append("\n"); sb.append(" Key : "+this.key).append("\n"); diff --git a/org.adempiere.install/src/org/compiere/install/ConfigurationData.java b/org.adempiere.install/src/org/compiere/install/ConfigurationData.java index 170fef350e..749c1bbdf5 100644 --- a/org.adempiere.install/src/org/compiere/install/ConfigurationData.java +++ b/org.adempiere.install/src/org/compiere/install/ConfigurationData.java @@ -1533,7 +1533,7 @@ public class ConfigurationData String sql = "SELECT WebContext FROM W_Store WHERE IsActive='Y'"; Statement stmt = null; ResultSet rs = null; - StringBuffer result = new StringBuffer(); + StringBuilder result = new StringBuilder(); try { stmt = con.createStatement(); diff --git a/org.adempiere.install/src/org/compiere/install/KeyStoreMgt.java b/org.adempiere.install/src/org/compiere/install/KeyStoreMgt.java index 2a75676dc6..d7de111bd0 100644 --- a/org.adempiere.install/src/org/compiere/install/KeyStoreMgt.java +++ b/org.adempiere.install/src/org/compiere/install/KeyStoreMgt.java @@ -343,7 +343,7 @@ public class KeyStoreMgt } // Escape commas - StringBuffer dname = new StringBuffer(); + StringBuilder dname = new StringBuilder(); dname.append("CN=").append(escapeCommas(cn)); // common name dname.append(", OU=").append(escapeCommas(ou)); // org unit dname.append(", O=").append(escapeCommas(o)); // org @@ -364,7 +364,7 @@ public class KeyStoreMgt { if (in == null || in.indexOf(',') == -1) return in; - StringBuffer out = new StringBuffer(); + StringBuilder out = new StringBuilder(); char[] chars = in.toCharArray(); for (int i = 0; i < chars.length; i++) { @@ -385,7 +385,7 @@ public class KeyStoreMgt */ public static void genkey (String alias, char[] password, String fileName, String dname) { - StringBuffer cmd = new StringBuffer ("-genkey -keyalg rsa"); + StringBuilder cmd = new StringBuilder ("-genkey -keyalg rsa"); cmd.append(" -alias ").append(alias); cmd.append(" -dname \"").append(dname).append("\""); cmd.append(" -keypass ").append(password).append(" -validity 999"); @@ -405,7 +405,7 @@ public class KeyStoreMgt */ public static void selfcert (String alias, char[] password, String fileName, String dname) { - StringBuffer cmd = new StringBuffer ("-selfcert"); + StringBuilder cmd = new StringBuilder ("-selfcert"); cmd.append(" -alias ").append(alias); cmd.append(" -dname \"").append(dname).append("\""); cmd.append(" -keypass ").append(password).append(" -validity 999"); 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 1649a34412..c74d8d6870 100644 --- a/org.adempiere.install/src/org/compiere/install/util/AppsAction.java +++ b/org.adempiere.install/src/org/compiere/install/util/AppsAction.java @@ -300,7 +300,7 @@ public final class AppsAction extends AbstractAction */ public String toString() { - StringBuffer sb = new StringBuffer("AppsAction["); + StringBuilder sb = new StringBuilder("AppsAction["); sb.append(m_action); Object oo = getValue(Action.ACCELERATOR_KEY); if (oo != null) diff --git a/org.adempiere.install/src/org/compiere/install/util/OnlineHelp.java b/org.adempiere.install/src/org/compiere/install/util/OnlineHelp.java index da4c9b2339..a31db24494 100644 --- a/org.adempiere.install/src/org/compiere/install/util/OnlineHelp.java +++ b/org.adempiere.install/src/org/compiere/install/util/OnlineHelp.java @@ -188,7 +188,7 @@ public class OnlineHelp extends JEditorPane implements HyperlinkListener */ protected void displayError (String header, Object url, Object exception) { - StringBuffer msg = new StringBuffer (""); + StringBuilder msg = new StringBuilder (""); msg.append("

").append(header).append("

") .append("

URL=").append(url).append("

") .append("

Error=").append(exception).append("

") diff --git a/org.adempiere.payment.processor/src/org/compiere/model/PP_Optimal.java b/org.adempiere.payment.processor/src/org/compiere/model/PP_Optimal.java index 54f086284a..beaf5c3531 100644 --- a/org.adempiere.payment.processor/src/org/compiere/model/PP_Optimal.java +++ b/org.adempiere.payment.processor/src/org/compiere/model/PP_Optimal.java @@ -202,7 +202,7 @@ public class PP_Optimal extends PaymentProcessor urlString += ":" + p_mbap.getHostPort(); /** General Parameters */ - StringBuffer param = new StringBuffer(200); + StringBuilder param = new StringBuilder(200); // Merchant username and password. param.append(createPair(MERCHANT_ID, p_mbap.getUserID(), 80)) .append(AMP).append(createPair(MERCHANT_PWD, p_mbap.getPassword(), 20)) diff --git a/org.adempiere.payment.processor/src/org/compiere/model/PP_PayFlowPro.java b/org.adempiere.payment.processor/src/org/compiere/model/PP_PayFlowPro.java index 71ada6f0de..3c69ddb70e 100644 --- a/org.adempiere.payment.processor/src/org/compiere/model/PP_PayFlowPro.java +++ b/org.adempiere.payment.processor/src/org/compiere/model/PP_PayFlowPro.java @@ -86,7 +86,7 @@ public final class PP_PayFlowPro extends PaymentProcessor log.fine(p_mbap.getHostAddress() + " " + p_mbap.getHostPort() + ", Timeout=" + getTimeout() + "; Proxy=" + p_mbap.getProxyAddress() + " " + p_mbap.getProxyPort() + " " + p_mbap.getProxyLogon() + " " + p_mbap.getProxyPassword()); // - StringBuffer param = new StringBuffer(); + StringBuilder param = new StringBuilder(); // Transaction Type if (p_mp.getTrxType().equals(MPayment.TRXTYPE_Sales)) param.append("TRXTYPE=").append(p_mp.getTrxType()); @@ -148,7 +148,7 @@ public final class PP_PayFlowPro extends PaymentProcessor public boolean process (String parameter) { long start = System.currentTimeMillis(); - StringBuffer param = new StringBuffer(parameter); + StringBuilder param = new StringBuilder(parameter); // Usr/Pwd param .append("&PARTNER=").append(p_mbap.getPartnerID()) diff --git a/org.adempiere.payment.processor/src/org/compiere/model/PP_PayFlowPro4.java b/org.adempiere.payment.processor/src/org/compiere/model/PP_PayFlowPro4.java index 89c70a8633..30b4c38729 100644 --- a/org.adempiere.payment.processor/src/org/compiere/model/PP_PayFlowPro4.java +++ b/org.adempiere.payment.processor/src/org/compiere/model/PP_PayFlowPro4.java @@ -91,7 +91,7 @@ public final class PP_PayFlowPro4 extends PaymentProcessor // - StringBuffer param = new StringBuffer(); + StringBuilder param = new StringBuilder(); // Transaction Type if (p_mp.getTrxType().equals(MPayment.TRXTYPE_Sales)) param.append("TRXTYPE=").append(p_mp.getTrxType()); @@ -166,7 +166,7 @@ public final class PP_PayFlowPro4 extends PaymentProcessor public boolean process (String parameter) { long start = System.currentTimeMillis(); - StringBuffer param = new StringBuffer(parameter); + StringBuilder param = new StringBuilder(parameter); // Usr/Pwd param .append("&PARTNER=").append(p_mbap.getPartnerID()) diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/CodeSnippetElementHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/CodeSnippetElementHandler.java index dd6cbc1697..8baddc4e64 100644 --- a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/CodeSnippetElementHandler.java +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/CodeSnippetElementHandler.java @@ -165,7 +165,7 @@ public class CodeSnippetElementHandler extends AbstractElementHandler { */ public static int readReplace(String fname, String oldPattern, String replPattern){ String line; - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); try { diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/CommonTranslationHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/CommonTranslationHandler.java index f7517799f2..04e2318558 100644 --- a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/CommonTranslationHandler.java +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/CommonTranslationHandler.java @@ -83,7 +83,7 @@ public class CommonTranslationHandler extends AbstractElementHandler implements String parentTable = tableName.substring(0, tableName.length()-4); ArrayList columns = getTranslatedColumns(parentTable); - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); sql.append("INSERT INTO ") .append(tableName) .append(" (") @@ -136,7 +136,7 @@ public class CommonTranslationHandler extends AbstractElementHandler implements PIPOContext ctx, Element element) throws SAXException{ String parentTable = tableName.substring(0, tableName.length()-4); ArrayList columns = getTranslatedColumns(parentTable); - StringBuffer buffer = new StringBuffer("UPDATE "+tableName+" SET "); + StringBuilder buffer = new StringBuilder("UPDATE "+tableName+" SET "); for (String columnName : columns) { buffer.append(columnName).append("=?,"); } diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/GenericPOElementHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/GenericPOElementHandler.java index 0c330f1032..161183c1a6 100644 --- a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/GenericPOElementHandler.java +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/GenericPOElementHandler.java @@ -77,7 +77,7 @@ public class GenericPOElementHandler extends AbstractElementHandler { && (!element.properties.containsKey(idColumn) || element.properties.get(idColumn).contents == null || element.properties.get(idColumn).contents.toString().trim().length() > 0)) { POInfo info = POInfo.getPOInfo(ctx.ctx, table.getAD_Table_ID()); MColumn columns[] = table.getColumns(false); - StringBuffer whereClause = new StringBuffer(); + StringBuilder whereClause = new StringBuilder(); List parameters = new ArrayList(); boolean search = true; for(int i = 0; i < columns.length; i++) { diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/ImpFormatRowElementHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/ImpFormatRowElementHandler.java index 7f57b62980..af9b51b9d3 100644 --- a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/ImpFormatRowElementHandler.java +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/ImpFormatRowElementHandler.java @@ -102,7 +102,7 @@ public class ImpFormatRowElementHandler extends AbstractElementHandler { } } - StringBuffer sqlB = new StringBuffer ("SELECT AD_ImpFormat_Row_ID FROM AD_ImpFormat_Row WHERE AD_Column_ID=? AND AD_ImpFormat_ID=?"); + StringBuilder sqlB = new StringBuilder ("SELECT AD_ImpFormat_Row_ID FROM AD_ImpFormat_Row WHERE AD_Column_ID=? AND AD_ImpFormat_ID=?"); int id = DB.getSQLValue(getTrxName(ctx),sqlB.toString(),columnId,impFormatId); mImpFormatRow = new X_AD_ImpFormat_Row(ctx.ctx, id > 0 ? id : 0, getTrxName(ctx)); diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/WorkflowNodeElementHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/WorkflowNodeElementHandler.java index b641aa561f..6a409717e7 100644 --- a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/WorkflowNodeElementHandler.java +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/WorkflowNodeElementHandler.java @@ -74,7 +74,7 @@ public class WorkflowNodeElementHandler extends AbstractElementHandler { } String workflowNodeValue = getStringValue(element, "Value", excludes); - StringBuffer sqlB = new StringBuffer( + StringBuilder sqlB = new StringBuilder( "SELECT AD_WF_Node_ID FROM AD_WF_Node WHERE AD_Workflow_ID=? and Value =?"); int id = DB.getSQLValue(getTrxName(ctx), sqlB.toString(), workflowId, workflowNodeValue); diff --git a/org.adempiere.pipo/src/org/adempiere/pipo2/IDFinder.java b/org.adempiere.pipo/src/org/adempiere/pipo2/IDFinder.java index e65dfa11bf..9cdfc4b7ea 100644 --- a/org.adempiere.pipo/src/org/adempiere/pipo2/IDFinder.java +++ b/org.adempiere.pipo/src/org/adempiere/pipo2/IDFinder.java @@ -63,7 +63,7 @@ public class IDFinder { return id; //construct cache key - StringBuffer key = new StringBuffer(); + StringBuilder key = new StringBuilder(); key.append(tableName) .append(".") .append(columnName) @@ -189,7 +189,7 @@ public class IDFinder { public static int findIdByNameAndParentName (String tableName, String name, String tableNameMaster, String nameMaster, int AD_Client_ID, String trxName) { int id = 0; //construct cache key - StringBuffer key = new StringBuffer(); + StringBuilder key = new StringBuilder(); key.append(tableName) .append(".Name=") .append(name) @@ -338,7 +338,7 @@ public class IDFinder { int id = 0; //construct cache key - StringBuffer key = new StringBuffer(); + StringBuilder key = new StringBuilder(); key.append(tableName) .append(".Name=") .append(name) @@ -398,7 +398,7 @@ public class IDFinder { int id = 0; //construct cache key - StringBuffer key = new StringBuffer(); + StringBuilder key = new StringBuilder(); key.append(tableName) .append(".Name=") .append(name); diff --git a/org.adempiere.pipo/src/org/adempiere/pipo2/PackInHandler.java b/org.adempiere.pipo/src/org/adempiere/pipo2/PackInHandler.java index 660bbdde66..64c4877dc4 100644 --- a/org.adempiere.pipo/src/org/adempiere/pipo2/PackInHandler.java +++ b/org.adempiere.pipo/src/org/adempiere/pipo2/PackInHandler.java @@ -401,7 +401,7 @@ public class PackInHandler extends DefaultHandler { if (!entry.startElement) { Element e = entry.element; - StringBuffer s = new StringBuffer(e.qName); + StringBuilder s = new StringBuilder(e.qName); s.append(" ["); Set keys = e.properties.keySet(); int i = 0; diff --git a/org.adempiere.pipo/src/org/adempiere/pipo2/ReferenceUtils.java b/org.adempiere.pipo/src/org/adempiere/pipo2/ReferenceUtils.java index 5740c51411..47d8633bc4 100644 --- a/org.adempiere.pipo/src/org/adempiere/pipo2/ReferenceUtils.java +++ b/org.adempiere.pipo/src/org/adempiere/pipo2/ReferenceUtils.java @@ -150,7 +150,7 @@ public class ReferenceUtils { } finally { DB.close(rs, stmt); } - StringBuffer buffer = new StringBuffer(); + StringBuilder buffer = new StringBuilder(); buffer.append(tableName).append(".").append(searchColumn); atts.addAttribute("", "", "reference", "CDATA", "table"); atts.addAttribute("", "", "reference-key", "CDATA", buffer.toString()); @@ -159,7 +159,7 @@ public class ReferenceUtils { String sql = "SELECT " + searchColumn + " FROM " + tableName + " WHERE " + keyColumn + " = ?"; String value = DB.getSQLValueString(null, sql, id); - StringBuffer buffer = new StringBuffer(); + StringBuilder buffer = new StringBuilder(); buffer.append(tableName).append(".").append(searchColumn); atts.addAttribute("", "", "reference", "CDATA", "table"); atts.addAttribute("", "", "reference-key", "CDATA", buffer.toString()); diff --git a/org.adempiere.replication/src/org/adempiere/model/ExportModelValidator.java b/org.adempiere.replication/src/org/adempiere/model/ExportModelValidator.java index abaa3100d2..868e1bc241 100644 --- a/org.adempiere.replication/src/org/adempiere/model/ExportModelValidator.java +++ b/org.adempiere.replication/src/org/adempiere/model/ExportModelValidator.java @@ -294,7 +294,7 @@ public class ExportModelValidator implements ModelValidator */ public String toString () { - StringBuffer sb = new StringBuffer (ExportModelValidator.class.getName()); + StringBuilder sb = new StringBuilder (ExportModelValidator.class.getName()); return sb.toString(); } 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 fea35f112b..a878a024a3 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 @@ -378,7 +378,7 @@ public class ExportHelper { MTable tableEmbedded = MTable.get(masterPO.getCtx(), embeddedFormat.getAD_Table_ID()); log.info("Table Embedded = " + tableEmbedded); - final StringBuffer whereClause = new StringBuffer(masterPO.get_KeyColumns()[0] +"=?"); + final StringBuilder whereClause = new StringBuilder(masterPO.get_KeyColumns()[0] +"=?"); if (embeddedFormat.getWhereClause() != null & !"".equals(embeddedFormat.getWhereClause())) { @@ -414,7 +414,7 @@ public class ExportHelper { MTable tableEmbedded = MTable.get(masterPO.getCtx(), embeddedFormat.getAD_Table_ID()); log.info("Table Embedded = " + tableEmbedded); - final StringBuffer whereClause = new StringBuffer(tableEmbedded.getTableName() + "_ID =?"); + final StringBuilder whereClause = new StringBuilder(tableEmbedded.getTableName() + "_ID =?"); if (embeddedFormat.getWhereClause() != null & !"".equals(embeddedFormat.getWhereClause())) { whereClause.append(" AND ").append(embeddedFormat.getWhereClause()); 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 a57ef0c4b7..5694546fcd 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 @@ -611,7 +611,7 @@ public class ImportHelper { int replication_id = 0; Object[] cols = new Object[uniqueFormatLines.size()]; Object[] params = new Object[uniqueFormatLines.size()]; - StringBuffer whereClause= new StringBuffer(""); + StringBuilder whereClause= new StringBuilder(""); int col = 0; String formatLines = ""; for (MEXPFormatLine uniqueFormatLine : uniqueFormatLines) diff --git a/org.adempiere.report.jasper/src/org/compiere/report/ReportStarter.java b/org.adempiere.report.jasper/src/org/compiere/report/ReportStarter.java index bfb4b613a7..979158cc4f 100644 --- a/org.adempiere.report.jasper/src/org/compiere/report/ReportStarter.java +++ b/org.adempiere.report.jasper/src/org/compiere/report/ReportStarter.java @@ -744,7 +744,7 @@ public class ReportStarter implements ProcessCall, ClientProcess } private String makePrefix(String name) { - StringBuffer prefix = new StringBuffer(); + StringBuilder prefix = new StringBuilder(); char[] nameArray = name.toCharArray(); for (char ch : nameArray) { if (Character.isLetterOrDigit(ch)) { diff --git a/org.adempiere.server/src/main/server/org/compiere/ldap/LdapConnectionHandler.java b/org.adempiere.server/src/main/server/org/compiere/ldap/LdapConnectionHandler.java index cef11cef3a..a5c6dbc940 100644 --- a/org.adempiere.server/src/main/server/org/compiere/ldap/LdapConnectionHandler.java +++ b/org.adempiere.server/src/main/server/org/compiere/ldap/LdapConnectionHandler.java @@ -159,7 +159,7 @@ public class LdapConnectionHandler extends Thread */ public String toString() { - StringBuffer sb = new StringBuffer ("LdapConnectionHandler["); + StringBuilder sb = new StringBuilder ("LdapConnectionHandler["); sb.append (hashCode()).append ("]"); return sb.toString (); } // toString diff --git a/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServerMgr.java b/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServerMgr.java index 5c332b498f..e33088701d 100644 --- a/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServerMgr.java +++ b/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServerMgr.java @@ -484,7 +484,7 @@ public class AdempiereServerMgr */ public String toString () { - StringBuffer sb = new StringBuffer ("AdempiereServerMgr["); + StringBuilder sb = new StringBuilder ("AdempiereServerMgr["); sb.append("Servers=").append(m_servers.size()) .append(",ContextSize=").append(m_ctx.size()) .append(",Started=").append(m_start) diff --git a/org.adempiere.server/src/main/server/org/compiere/server/AlertProcessor.java b/org.adempiere.server/src/main/server/org/compiere/server/AlertProcessor.java index 2a3375af9c..f647def48f 100644 --- a/org.adempiere.server/src/main/server/org/compiere/server/AlertProcessor.java +++ b/org.adempiere.server/src/main/server/org/compiere/server/AlertProcessor.java @@ -366,7 +366,7 @@ public class AlertProcessor extends AdempiereServer private String getPlainTextReport(MAlertRule rule, String sql, String trxName, Collection attachments) throws Exception { - StringBuffer result = new StringBuffer(); + StringBuilder result = new StringBuilder(); PreparedStatement pstmt = null; ResultSet rs = null; Exception error = null; diff --git a/org.adempiere.server/src/main/server/org/compiere/server/EMailProcessor.java b/org.adempiere.server/src/main/server/org/compiere/server/EMailProcessor.java index ed7e2b3985..ea70e7e0e8 100644 --- a/org.adempiere.server/src/main/server/org/compiere/server/EMailProcessor.java +++ b/org.adempiere.server/src/main/server/org/compiere/server/EMailProcessor.java @@ -323,7 +323,7 @@ public class EMailProcessor */ private String getMessage (Part msg) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); try { // Text @@ -460,7 +460,7 @@ public class EMailProcessor String deliveryMessage = null; if (content instanceof InputStream) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); InputStream is = (InputStream)content; int c; while ((c = is.read()) != -1) @@ -531,7 +531,7 @@ public class EMailProcessor // FLAGS Flags flags = m.getFlags(); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); Flags.Flag[] sf = flags.getSystemFlags(); // get the system flags boolean first = true; @@ -575,7 +575,7 @@ public class EMailProcessor String[] hdrs = m.getHeader("X-Mailer"); if (hdrs != null) { - StringBuffer sb1 = new StringBuffer("X-Mailer: "); + StringBuilder sb1 = new StringBuilder("X-Mailer: "); for (int i = 0; i < hdrs.length; i++) sb1.append(hdrs[i]).append(" "); printOut(sb1.toString()); @@ -587,7 +587,7 @@ public class EMailProcessor hdrs = m.getHeader("Message-ID"); if (hdrs != null) { - StringBuffer sb1 = new StringBuffer("Message-ID: "); + StringBuilder sb1 = new StringBuilder("Message-ID: "); for (int i = 0; i < hdrs.length; i++) sb1.append(hdrs[i]).append(" "); printOut(sb1.toString()); diff --git a/org.adempiere.ui.swing/src/org/adempiere/apps/graph/PerformanceIndicator.java b/org.adempiere.ui.swing/src/org/adempiere/apps/graph/PerformanceIndicator.java index 6a13375f0c..0f94b501a7 100644 --- a/org.adempiere.ui.swing/src/org/adempiere/apps/graph/PerformanceIndicator.java +++ b/org.adempiere.ui.swing/src/org/adempiere/apps/graph/PerformanceIndicator.java @@ -129,7 +129,7 @@ public class PerformanceIndicator extends JPanel JFreeChart chart = null; // Set Text - StringBuffer text = new StringBuffer(m_goal.getName()); + StringBuilder text = new StringBuilder(m_goal.getName()); if (m_goal.isTarget()) text.append(": ").append(m_goal.getPercent()).append("%"); else @@ -138,7 +138,7 @@ public class PerformanceIndicator extends JPanel m_text = text.toString(); // ToolTip - text = new StringBuffer(); + text = new StringBuilder(); if (m_goal.getDescription() != null) text.append(m_goal.getDescription()).append(": "); text.append(s_format.format(m_goal.getMeasureActual())); diff --git a/org.adempiere.ui.swing/src/org/compiere/acct/AcctViewer.java b/org.adempiere.ui.swing/src/org/compiere/acct/AcctViewer.java index 36808e5261..58c9d9d863 100644 --- a/org.adempiere.ui.swing/src/org/compiere/acct/AcctViewer.java +++ b/org.adempiere.ui.swing/src/org/compiere/acct/AcctViewer.java @@ -566,7 +566,7 @@ public class AcctViewer extends CFrame private void actionQuery() { // Parameter Info - StringBuffer para = new StringBuffer(); + StringBuilder para = new StringBuilder(); // Reset Selection Data m_data.C_AcctSchema_ID = 0; m_data.AD_Org_ID = 0; 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 88044fa0c1..8733f16ca4 100644 --- a/org.adempiere.ui.swing/src/org/compiere/acct/AcctViewerData.java +++ b/org.adempiere.ui.swing/src/org/compiere/acct/AcctViewerData.java @@ -259,7 +259,7 @@ class AcctViewerData protected String getButtonText (String tableName, String columnName, String selectSQL) { // SELECT () FROM tableName avd WHERE avd. - StringBuffer sql = new StringBuffer ("SELECT ("); + StringBuilder sql = new StringBuilder ("SELECT ("); Language language = Env.getLanguage(Env.getCtx()); sql.append(MLookupFactory.getLookup_TableDirEmbed(language, columnName, "avd")) .append(") FROM ").append(tableName).append(" avd WHERE avd.").append(selectSQL); @@ -289,7 +289,7 @@ class AcctViewerData protected RModel query() { // Set Where Clause - StringBuffer whereClause = new StringBuffer(); + StringBuilder whereClause = new StringBuilder(); // Add Organization if (C_AcctSchema_ID != 0) whereClause.append(RModel.TABLE_ALIAS) @@ -352,7 +352,7 @@ class AcctViewerData RModel rm = getRModel(); // Set Order By Clause - StringBuffer orderClause = new StringBuffer(); + StringBuilder orderClause = new StringBuilder(); if (sortBy1.length() > 0) { RColumn col = rm.getRColumn(sortBy1); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/ADialog.java b/org.adempiere.ui.swing/src/org/compiere/apps/ADialog.java index f948926084..d1effbe047 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/ADialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/ADialog.java @@ -103,7 +103,7 @@ public final class ADialog { log.info(AD_Message + " - " + msg); Properties ctx = Env.getCtx(); - StringBuffer out = new StringBuffer(); + StringBuilder out = new StringBuilder(); if (AD_Message != null && !AD_Message.equals("")) out.append(Msg.getMsg(ctx, AD_Message)); if (msg != null && msg.length() > 0) @@ -156,7 +156,7 @@ public final class ADialog { log.info(AD_Message + " - " + msg); Properties ctx = Env.getCtx(); - StringBuffer out = new StringBuffer(); + StringBuilder out = new StringBuilder(); if (AD_Message != null && !AD_Message.equals("")) out.append(Msg.getMsg(ctx, AD_Message)); if (msg != null && msg.length() > 0) @@ -211,7 +211,7 @@ public final class ADialog if (CLogMgt.isLevelFinest()) Trace.printStack(); Properties ctx = Env.getCtx(); - StringBuffer out = new StringBuffer(); + StringBuilder out = new StringBuilder(); if (AD_Message != null && !AD_Message.equals("")) out.append(Msg.getMsg(ctx, AD_Message)); if (msg != null && msg.length() > 0) @@ -265,7 +265,7 @@ public final class ADialog { log.info(AD_Message + " - " + msg); Properties ctx = Env.getCtx(); - StringBuffer out = new StringBuffer(); + StringBuilder out = new StringBuilder(); if (AD_Message != null && !AD_Message.equals("")) out.append(Msg.getMsg(ctx, AD_Message)); if (msg != null && msg.length() > 0) diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/ADialogDialog.java b/org.adempiere.ui.swing/src/org/compiere/apps/ADialogDialog.java index 854809875f..270d91a575 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/ADialogDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/ADialogDialog.java @@ -214,7 +214,7 @@ public final class ADialogDialog extends CDialog implements ActionListener */ private void setInfoMessage(String message) { - StringBuffer sb = new StringBuffer (message.length()+20); + StringBuilder sb = new StringBuilder (message.length()+20); sb.append(""); String html = Util.maskHTML(message); char[] chars = html.toCharArray(); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/ALogin.java b/org.adempiere.ui.swing/src/org/compiere/apps/ALogin.java index 2d29e534b5..f25e531c9e 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/ALogin.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/ALogin.java @@ -1130,7 +1130,7 @@ public final class ALogin extends CDialog } else if (version != null) { - StringBuffer msg = new StringBuffer (">>\n"); + StringBuilder msg = new StringBuilder (">>\n"); msg.append(res.getString("VersionConflict")).append("\n") .append(res.getString("VersionInfo")).append("\n"); msg.append(version == null ? "null" : version).append(" <> ") 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 2fc8c06479..c0ba72a268 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java @@ -587,7 +587,7 @@ public final class APanel extends CPanel { if (m_mWorkbench != null && m_mWorkbench.getWindowCount() > 1) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(m_mWorkbench.getName()).append(" ") .append(Env.getContext(m_ctx, "#AD_User_Name")).append("@") .append(Env.getContext(m_ctx, "#AD_Client_Name")).append(".") @@ -848,7 +848,7 @@ public final class APanel extends CPanel if (!included) // Add to TabbedPane { - StringBuffer tabName = new StringBuffer (); + StringBuilder tabName = new StringBuilder (); tabName.append (""); if (gTab.isReadOnly()) tabName.append(""); @@ -1158,7 +1158,7 @@ public final class APanel extends CPanel // Set Message / Info if (e.getAD_Message() != null || e.getInfo() != null) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); String msg = e.getMessage(); if (msg != null && msg.length() > 0) sb.append(Msg.getMsg(m_ctx, e.getAD_Message())); 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 07808c827d..3cb2fb48d8 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/AppsAction.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/AppsAction.java @@ -301,7 +301,7 @@ public final class AppsAction extends AbstractAction */ public String toString() { - StringBuffer sb = new StringBuffer("AppsAction["); + StringBuilder sb = new StringBuilder("AppsAction["); sb.append(m_action); Object oo = getValue(Action.ACCELERATOR_KEY); if (oo != null) diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/BeanShellEditor.java b/org.adempiere.ui.swing/src/org/compiere/apps/BeanShellEditor.java index 58c799736c..3f5cff80ef 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/BeanShellEditor.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/BeanShellEditor.java @@ -250,7 +250,7 @@ public class BeanShellEditor extends CDialog implements ActionListener m_origScript = m_script.getScript(); editor.setText(m_script.getScript()); // - StringBuffer sb = new StringBuffer(""); + StringBuilder sb = new StringBuilder(""); HashMap ctx = m_script.getEnvironment(); String[] pp = new String[ctx.size()]; ctx.keySet().toArray(pp); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/OnlineHelp.java b/org.adempiere.ui.swing/src/org/compiere/apps/OnlineHelp.java index 83955f1dc7..31528c3228 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/OnlineHelp.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/OnlineHelp.java @@ -190,7 +190,7 @@ public class OnlineHelp extends JEditorPane implements HyperlinkListener */ protected void displayError (String header, Object url, Object exception) { - StringBuffer msg = new StringBuffer (""); + StringBuilder msg = new StringBuilder (""); msg.append("

").append(header).append("

") .append("

URL=").append(url).append("

") .append("

Error=").append(exception).append("

") diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/Preference.java b/org.adempiere.ui.swing/src/org/compiere/apps/Preference.java index 54a7d70568..90851c482e 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/Preference.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/Preference.java @@ -114,7 +114,7 @@ public final class Preference extends CDialog } load(); // - StringBuffer sta = new StringBuffer("#"); + StringBuilder sta = new StringBuilder("#"); sta.append(Env.getCtx().size()).append(" - ") .append(Msg.translate(Env.getCtx(), "AD_Window_ID")) .append("=").append(WindowNo); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/ProcessParameter.java b/org.adempiere.ui.swing/src/org/compiere/apps/ProcessParameter.java index 236291681a..b8bf553f2d 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/ProcessParameter.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/ProcessParameter.java @@ -407,7 +407,7 @@ public class ProcessParameter extends CDialog * Mandatory fields * see - MTable.getMandatory */ - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); int size = m_mFields.size(); for (int i = 0; i < size; i++) { diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/ProcessParameterPanel.java b/org.adempiere.ui.swing/src/org/compiere/apps/ProcessParameterPanel.java index cb36accfec..07819d855a 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/ProcessParameterPanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/ProcessParameterPanel.java @@ -514,7 +514,7 @@ public class ProcessParameterPanel extends CPanel implements VetoableChangeListe * Mandatory fields * see - MTable.getMandatory */ - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); int size = m_mFields.size(); for (int i = 0; i < size; i++) { diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/StatusBar.java b/org.adempiere.ui.swing/src/org/compiere/apps/StatusBar.java index ffd41e1128..7c591949a5 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/StatusBar.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/StatusBar.java @@ -200,7 +200,7 @@ public class StatusBar extends CPanel implements IStatusBar } else { - StringBuffer sb = new StringBuffer (" "); + StringBuilder sb = new StringBuilder (" "); sb.append(text).append(" "); statusDB.setText(sb.toString()); if (!statusDB.isVisible()) diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/FormFrame.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/FormFrame.java index 48dd5fb435..477a391026 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/FormFrame.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/FormFrame.java @@ -361,7 +361,7 @@ public class FormFrame extends CFrame */ private void actionHelp() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); if (m_Description != null && m_Description.length() > 0) sb.append("

").append(m_Description).append("

"); if (m_Help != null && m_Help.length() > 0) diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VFactReconcile.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VFactReconcile.java index f5567eb855..84f230a3b9 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VFactReconcile.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VFactReconcile.java @@ -336,7 +336,7 @@ implements FormPanel, ActionListener, TableModelListener, VetoableChangeListener } // Information - StringBuffer info = new StringBuffer(); + StringBuilder info = new StringBuilder(); info.append(m_noSelected).append(" ").append(Msg.getMsg(Env.getCtx(), "Selected")).append(" / ").append(miniTable.getRowCount()); differenceField.setText(m_format.format(selectedAmt)); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VGenPanel.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VGenPanel.java index da349831b5..5ccd53341a 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VGenPanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VGenPanel.java @@ -262,7 +262,7 @@ public class VGenPanel extends CPanel implements ActionListener, ChangeListener, tabbedPane.setSelectedIndex(1); // ProcessInfoUtil.setLogFromDB(pi); - StringBuffer iText = new StringBuffer(); + StringBuilder iText = new StringBuilder(); iText.append("").append(pi.getSummary()) .append("
(") .append(Msg.getMsg(Env.getCtx(), genForm.getTitle())) 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 a164a29a9c..612620b696 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 @@ -434,7 +434,7 @@ public class VPayPrint extends PayPrint implements FormPanel, ActionListener, Ve int lastDocumentNo = MPaySelectionCheck.confirmPrint (m_checks, m_batch); if (lastDocumentNo != 0) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("UPDATE C_BankAccountDoc SET CurrentNext=").append(++lastDocumentNo) .append(" WHERE C_BankAccount_ID=").append(m_C_BankAccount_ID) .append(" AND PaymentRule='").append(PaymentRule).append("'"); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VSQLProcess.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VSQLProcess.java index 78f102e4bc..dfb076bceb 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VSQLProcess.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VSQLProcess.java @@ -151,7 +151,7 @@ public class VSQLProcess extends CPanel { if (sqlStatements == null || sqlStatements.length() == 0) return ""; - StringBuffer result = new StringBuffer(); + StringBuilder result = new StringBuilder(); // StringTokenizer st = new StringTokenizer(sqlStatements, ";", false); while (st.hasMoreTokens()) @@ -173,7 +173,7 @@ public class VSQLProcess extends CPanel { if (sqlStatement == null) return ""; - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); char[] chars = sqlStatement.toCharArray(); for (int i = 0; i < chars.length; i++) { 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 8d524eb81c..e53fd586ec 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 @@ -645,7 +645,7 @@ public class VTreeBOM extends CPanel implements FormPanel, ActionListener, TreeS String value = product.getValue(); String name = product.get_Translation(MProduct.COLUMNNAME_Name); // - StringBuffer sb = new StringBuffer(value); + StringBuilder sb = new StringBuilder(value); if (name != null && !value.equals(name)) sb.append("_").append(product.getName()); sb.append(" [").append(uom.get_Translation(MUOM.COLUMNNAME_UOMSymbol)).append("]"); @@ -708,7 +708,7 @@ class myJTree extends JTree Vector userObject = (Vector )nd.getUserObject(); //Product - StringBuffer sb = new StringBuffer(((KeyNamePair)userObject.elementAt(2)).getName()); + StringBuilder sb = new StringBuilder(((KeyNamePair)userObject.elementAt(2)).getName()); //UOM sb.append(" ["+((KeyNamePair) userObject.elementAt(3)).getName().trim()+"]"); //BOMQty 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 263eedaac8..55a7392678 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 @@ -534,7 +534,7 @@ public abstract class Info extends CDialog { long start = System.currentTimeMillis(); String dynWhere = getSQLWhere(); - StringBuffer sql = new StringBuffer (m_sqlCount); + StringBuilder sql = new StringBuilder (m_sqlCount); if (dynWhere.length() > 0) sql.append(dynWhere); // includes first AND String countSql = Msg.parseTranslation(Env.getCtx(), sql.toString()); // Variables @@ -731,7 +731,7 @@ public abstract class Info extends CDialog return ""; } // - StringBuffer sb = new StringBuffer(getKeyColumn()); + StringBuilder sb = new StringBuilder(getKeyColumn()); if (keys.length > 1) sb.append(" IN ("); else @@ -1176,7 +1176,7 @@ public abstract class Info extends CDialog p_table.setRowCount(0); // String dynWhere = getSQLWhere(); - StringBuffer sql = new StringBuffer (m_sqlMain); + StringBuilder sql = new StringBuilder (m_sqlMain); if (dynWhere.length() > 0) sql.append(dynWhere); // includes first AND sql.append(m_sqlOrder); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoAsset.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoAsset.java index 20a071364a..bfe7c6bf52 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoAsset.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoAsset.java @@ -172,7 +172,7 @@ public class InfoAsset extends Info private void initInfo (String value, int A_Asset_ID, String whereClause) { // Create Grid - StringBuffer where = new StringBuffer(); + StringBuilder where = new StringBuilder(); where.append("a.IsActive='Y'"); if (whereClause != null && whereClause.length() > 0) where.append(" AND ").append(whereClause); @@ -199,7 +199,7 @@ public class InfoAsset extends Info */ protected String getSQLWhere() { - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); // => Value String value = fieldValue.getText().toUpperCase(); if (!(value.equals("") || value.equals("%"))) diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoAssignment.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoAssignment.java index 22bb7f1244..e861bfb561 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoAssignment.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoAssignment.java @@ -201,7 +201,7 @@ AND rt.C_UOM_ID=uom.C_UOM_ID // C_BPartner bp, AD_User c, C_BPartner_Location l, C_Location a // Create Grid - StringBuffer where = new StringBuffer(s_assignmentWHERE); + StringBuilder where = new StringBuilder(s_assignmentWHERE); if (whereClause != null && whereClause.length() > 0) where.append(" AND ").append(whereClause); // @@ -234,7 +234,7 @@ AND rt.C_UOM_ID=uom.C_UOM_ID */ protected String getSQLWhere() { - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); // Integer S_ResourceType_ID = (Integer)fieldResourceType.getValue(); if (S_ResourceType_ID != null) diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoBPartner.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoBPartner.java index cee88173b6..6125d6bec3 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoBPartner.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoBPartner.java @@ -223,7 +223,7 @@ public class InfoBPartner extends Info **/ // Create Grid - StringBuffer where = new StringBuffer(); + StringBuilder where = new StringBuilder(); where.append("C_BPartner.IsSummary='N' AND C_BPartner.IsActive='Y'"); if (whereClause != null && whereClause.length() > 0) where.append(" AND ").append(whereClause); @@ -300,7 +300,7 @@ public class InfoBPartner extends Info if (!(postal.equals("") || postal.equals("%"))) list.add ("UPPER(a.Postal) LIKE ?"); - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); int size = list.size(); // Just one if (size == 1) diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoCashLine.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoCashLine.java index 9a5e10a790..9be2986b74 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoCashLine.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoCashLine.java @@ -233,7 +233,7 @@ public class InfoCashLine extends Info private boolean initInfo () { // prepare table - StringBuffer where = new StringBuffer("cl.IsActive='Y'"); + StringBuilder where = new StringBuilder("cl.IsActive='Y'"); if (p_whereClause.length() > 0) where.append(" AND ").append(Util.replace(p_whereClause, "C_CashLine.", "cl.")); prepareTable (s_cashLayout, @@ -253,7 +253,7 @@ public class InfoCashLine extends Info */ protected String getSQLWhere() { - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); if (fName.getText().length() > 0) sql.append(" AND UPPER(c.Name) LIKE ?"); // diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoGeneral.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoGeneral.java index fec988796d..a84e47886f 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoGeneral.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoGeneral.java @@ -176,7 +176,7 @@ public class InfoGeneral extends Info return false; // prepare table - StringBuffer where = new StringBuffer("IsActive='Y'"); + StringBuilder where = new StringBuilder("IsActive='Y'"); if (p_whereClause.length() > 0) where.append(" AND ").append(p_whereClause); prepareTable(m_generalLayout, 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 5f82052dda..b639bae8ac 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 @@ -215,7 +215,7 @@ public class InfoInOut extends Info fBPartner_ID.setValue(new Integer(bp)); // prepare table - StringBuffer where = new StringBuffer("i.IsActive='Y'"); + StringBuilder where = new StringBuilder("i.IsActive='Y'"); if (p_whereClause.length() > 0) where.append(" AND ").append(Util.replace(p_whereClause, "M_InOut.", "i.")); prepareTable(s_invoiceLayout, @@ -236,7 +236,7 @@ public class InfoInOut extends Info */ protected String getSQLWhere() { - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); if (fDocumentNo.getText().length() > 0) sql.append(" AND UPPER(i.DocumentNo) LIKE ?"); if (fDescription.getText().length() > 0) 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 392053b4f7..aab7318666 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 @@ -255,7 +255,7 @@ public class InfoInvoice extends Info fBPartner_ID.setValue(new Integer(bp)); // prepare table - StringBuffer where = new StringBuffer("i.IsActive='Y'"); + StringBuilder where = new StringBuilder("i.IsActive='Y'"); if (p_whereClause.length() > 0) where.append(" AND ").append(Util.replace(p_whereClause, "C_Invoice.", "i.")); prepareTable(s_invoiceLayout, @@ -276,7 +276,7 @@ public class InfoInvoice extends Info */ protected String getSQLWhere() { - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); if (fDocumentNo.getText().length() > 0) sql.append(" AND UPPER(i.DocumentNo) LIKE ?"); if (fDescription.getText().length() > 0) 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 cf77baa21a..7480d1e22f 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 @@ -233,7 +233,7 @@ public class InfoOrder extends Info fBPartner_ID.setValue(new Integer(bp)); // prepare table - StringBuffer where = new StringBuffer("o.IsActive='Y'"); + StringBuilder where = new StringBuilder("o.IsActive='Y'"); if (p_whereClause.length() > 0) where.append(" AND ").append(Util.replace(p_whereClause, "C_Order.", "o.")); prepareTable(s_invoiceLayout, @@ -253,7 +253,7 @@ public class InfoOrder extends Info */ protected String getSQLWhere() { - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); if (fDocumentNo.getText().length() > 0) sql.append(" AND UPPER(o.DocumentNo) LIKE ?"); if (fDescription.getText().length() > 0) diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoPAttribute.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoPAttribute.java index 3a49c78d8d..08001591e4 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoPAttribute.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoPAttribute.java @@ -404,7 +404,7 @@ public class InfoPAttribute extends CDialog **/ /*** Instance Attributes */ - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); // Serial No String s = serNoField.getText(); if (s != null && s.length() > 0) 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 e458e40a78..110b872a4f 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 @@ -232,7 +232,7 @@ public class InfoPayment extends Info fBPartner_ID.setValue(new Integer(bp)); // prepare table - StringBuffer where = new StringBuffer("p.IsActive='Y'"); + StringBuilder where = new StringBuilder("p.IsActive='Y'"); if (p_whereClause.length() > 0) where.append(" AND ").append(Util.replace(p_whereClause, "C_Payment.", "p.")); prepareTable(s_paymentLayout, @@ -253,7 +253,7 @@ public class InfoPayment extends Info */ protected String getSQLWhere() { - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); if (fDocumentNo.getText().length() > 0) sql.append(" AND UPPER(p.DocumentNo) LIKE ?"); // diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoProduct.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoProduct.java index 4ac9588740..0193a07845 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoProduct.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoProduct.java @@ -543,7 +543,7 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener // Create Grid String orderBy = null; - StringBuffer where = new StringBuffer(); + StringBuilder where = new StringBuilder(); where.append("p.IsActive='Y'"); if (M_Warehouse_ID != 0) { @@ -756,7 +756,7 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener */ protected String getSQLWhere() { - StringBuffer where = new StringBuffer(); + StringBuilder where = new StringBuilder(); // Optional PLV int M_PriceList_Version_ID = 0; @@ -933,7 +933,7 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener ((DefaultTableModel)p_table.getModel()).setColumnCount(0); int M_Warehouse_ID = ((KeyNamePair)pickWarehouse.getSelectedItem()).getKey(); // Create Grid - StringBuffer where = new StringBuffer(); + StringBuilder where = new StringBuilder(); where.append("p.IsActive='Y'"); if (M_Warehouse_ID != 0) where.append(" AND p.IsSummary='N'"); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFPanel.java b/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFPanel.java index 1677feb57d..4ca66714e0 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFPanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFPanel.java @@ -342,7 +342,7 @@ public class WFPanel extends CPanel } // Info Text - StringBuffer msg = new StringBuffer(""); + StringBuilder msg = new StringBuilder(""); msg.append("

").append(m_wf.getName(true)).append("

"); String s = m_wf.getDescription(true); if (s != null && s.length() > 0) @@ -413,7 +413,7 @@ public class WFPanel extends CPanel { log.fine("Node=" + node); // Info Text - StringBuffer msg = new StringBuffer(""); + StringBuilder msg = new StringBuilder(""); msg.append("

").append(node.getName(true)).append("

"); String s = node.getDescription(true); if (s != null && s.length() > 0) @@ -503,7 +503,7 @@ public class WFPanel extends CPanel */ public String toString() { - StringBuffer sb = new StringBuffer("WFPanel["); + StringBuilder sb = new StringBuilder("WFPanel["); if (m_wf != null) sb.append(m_wf.getAD_Workflow_ID()); sb.append("]"); diff --git a/org.adempiere.ui.swing/src/org/compiere/dbPort/ConvertDialog.java b/org.adempiere.ui.swing/src/org/compiere/dbPort/ConvertDialog.java index 4083b60f67..efa0be6fd7 100644 --- a/org.adempiere.ui.swing/src/org/compiere/dbPort/ConvertDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/dbPort/ConvertDialog.java @@ -243,7 +243,7 @@ public class ConvertDialog extends CFrame implements ActionListener return; } infoPane.append("Opening file: " + file + "\n"); - StringBuffer sb = new StringBuffer (1000); + StringBuilder sb = new StringBuilder (1000); // try { @@ -283,7 +283,7 @@ public class ConvertDialog extends CFrame implements ActionListener convert.execute(sb.toString(), conn); if (convert.hasError()) { - StringBuffer sbb = new StringBuffer ("- Error: "); + StringBuilder sbb = new StringBuilder ("- Error: "); if (convert.getConversionError() != null) sbb.append(convert.getConversionError()).append(' '); if (convert.getException() != null) diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/RecordAccessDialog.java b/org.adempiere.ui.swing/src/org/compiere/grid/RecordAccessDialog.java index ca3a91115e..f26932a678 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/RecordAccessDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/RecordAccessDialog.java @@ -224,7 +224,7 @@ public class RecordAccessDialog extends CDialog setLine(ra); } // Label - StringBuffer txt = new StringBuffer(); + StringBuilder txt = new StringBuilder(); if (newRecord) txt.append("+"); txt.append(m_currentRow+1).append("/").append(maxIndex+1); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromDialog.java b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromDialog.java index 353f758fb3..0e153f6409 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromDialog.java @@ -198,7 +198,7 @@ public class VCreateFromDialog extends CDialog implements ActionListener, TableM public void setStatusLine(int selectedRowCount, String text) { - StringBuffer sb = new StringBuffer(String.valueOf(selectedRowCount)); + StringBuilder sb = new StringBuilder(String.valueOf(selectedRowCount)); if (text != null && text.trim().length() > 0) { sb.append(" - ").append(text); } diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VSortTab.java b/org.adempiere.ui.swing/src/org/compiere/grid/VSortTab.java index be94f7bba5..ed9e3c458a 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VSortTab.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VSortTab.java @@ -185,7 +185,7 @@ public class VSortTab extends CPanel implements APanelTab { m_AD_Table_ID = AD_Table_ID; int identifiersCount = 0; - StringBuffer identifierSql = new StringBuffer(); + StringBuilder identifierSql = new StringBuilder(); String sql = "SELECT t.TableName, c.AD_Column_ID, c.ColumnName, e.Name," // 1..4 + "c.IsParent, c.IsKey, c.IsIdentifier, c.IsTranslated " // 4..8 + "FROM AD_Table t, AD_Column c, AD_Element e " @@ -407,7 +407,7 @@ public class VSortTab extends CPanel implements APanelTab // SELECT t.AD_Field_ID,t.Name,t.SeqNo,t.IsDisplayed FROM AD_Field t WHERE t.AD_Tab_ID=? ORDER BY 4 DESC,3,2 // SELECT t.AD_PrintFormatItem_ID,t.Name,t.SeqNo,t.IsPrinted FROM AD_PrintFormatItem t WHERE t.AD_PrintFormat_ID=? ORDER BY 4 DESC,3,2 // SELECT t.AD_PrintFormatItem_ID,t.Name,t.SortNo,t.IsOrderBy FROM AD_PrintFormatItem t WHERE t.AD_PrintFormat_ID=? ORDER BY 4 DESC,3,2 - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); // Columns sql.append("SELECT t.").append(m_KeyColumnName) // 1 .append(",").append(m_IdentifierSql) // 2 @@ -629,7 +629,7 @@ public class VSortTab extends CPanel implements APanelTab return; log.fine(""); boolean ok = true; - StringBuffer info = new StringBuffer(); + StringBuilder info = new StringBuilder(); StringBuffer sql = null; // noList - Set SortColumn to null and optional YesNo Column to 'N' for (int i = 0; i < noModel.getSize(); i++) diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VTableExcelAdapter.java b/org.adempiere.ui.swing/src/org/compiere/grid/VTableExcelAdapter.java index ac71be03a9..ebcea7d350 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VTableExcelAdapter.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VTableExcelAdapter.java @@ -125,7 +125,7 @@ public class VTableExcelAdapter } int colscount = table.getColumnCount(); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); GridTable model = (GridTable)table.getModel(); GridField[] fields = model.getFields(); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/CityAutoCompleter.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/CityAutoCompleter.java index c7af9418c9..7d0930f7dc 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/CityAutoCompleter.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/CityAutoCompleter.java @@ -120,7 +120,7 @@ public class CityAutoCompleter extends AutoCompleter list.clear(); listShow.clear(); ArrayList params = new ArrayList(); - final StringBuffer sql = new StringBuffer( + final StringBuilder sql = new StringBuilder( "SELECT cy.C_City_ID, cy.Name, cy.C_Region_ID, r.Name" +" FROM C_City cy" +" LEFT OUTER JOIN C_Region r ON (r.C_Region_ID=cy.C_Region_ID)" diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/Editor.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/Editor.java index 463a08682b..b186eb0eba 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/Editor.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/Editor.java @@ -271,7 +271,7 @@ public class Editor extends CDialog if (jc.showOpenDialog(this) != JFileChooser.APPROVE_OPTION) return; - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); try { InputStreamReader in = new InputStreamReader (new FileInputStream (jc.getSelectedFile())); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/HTMLEditor.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/HTMLEditor.java index 48e6b07296..47392e9458 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/HTMLEditor.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/HTMLEditor.java @@ -382,7 +382,7 @@ public class HTMLEditor extends CDialog if (jc.showOpenDialog(this) != JFileChooser.APPROVE_OPTION) return; - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); try { InputStreamReader in = new InputStreamReader (new FileInputStream (jc.getSelectedFile())); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/MDocNumber.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/MDocNumber.java index 4d00a7b925..02fa20e9f2 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/MDocNumber.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/MDocNumber.java @@ -125,7 +125,7 @@ public final class MDocNumber extends PlainDocument // remove all Thousands if (content.indexOf(m_groupingSeparator) != -1) { - StringBuffer result = new StringBuffer(); + StringBuilder result = new StringBuilder(); for (int i = 0; i < content.length(); i++) { if (content.charAt(i) == m_groupingSeparator) @@ -173,7 +173,7 @@ public final class MDocNumber extends PlainDocument if (pos != 0) { content = getText(); - StringBuffer result = new StringBuffer(); + StringBuilder result = new StringBuilder(); int correction = 0; for (int i = 0; i < content.length(); i++) { @@ -281,7 +281,7 @@ public final class MDocNumber extends PlainDocument // remove all Thousands if (content.indexOf(m_groupingSeparator) != -1) { - StringBuffer result = new StringBuffer(); + StringBuilder result = new StringBuilder(); for (int i = 0; i < content.length(); i++) { if (content.charAt(i) == m_groupingSeparator && i != origOffset) diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/MDocTime.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/MDocTime.java index d90ff4b475..1dc4f1f5b6 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/MDocTime.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/MDocTime.java @@ -147,7 +147,7 @@ public final class MDocTime extends PlainDocument */ private String getText() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); try { sb.append(getContent().getString(0, getContent().length()-1)); // cr at end 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 52c7982b17..53974a9c9d 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 @@ -462,7 +462,7 @@ public final class VAccount extends JComponent */ public String toString() { - StringBuffer sb = new StringBuffer ("VAccount["); + StringBuilder sb = new StringBuilder ("VAccount["); sb.append (m_value).append ("]"); return sb.toString (); } // toString 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 c71702b0d0..d33f13f3d8 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 @@ -752,8 +752,8 @@ public final class VAccountDialog extends CDialog /** * Check completeness (mandatory fields) ... and for duplicates */ - StringBuffer sb = new StringBuffer(); - StringBuffer sql = new StringBuffer ("SELECT C_ValidCombination_ID, Alias FROM C_ValidCombination WHERE "); + StringBuilder sb = new StringBuilder(); + StringBuilder sql = new StringBuilder ("SELECT C_ValidCombination_ID, Alias FROM C_ValidCombination WHERE "); Object value = null; if (s_AcctSchema.isHasAlias()) { @@ -950,7 +950,7 @@ public final class VAccountDialog extends CDialog if (IDvalue != 0 && s_AcctSchema.isHasAlias() && !f_Alias.getValue().toString().equals(Alias)) { - sql = new StringBuffer("UPDATE C_ValidCombination SET Alias="); + sql = new StringBuilder("UPDATE C_ValidCombination SET Alias="); if (f_Alias.getValue().toString().length() == 0) sql.append("NULL"); else 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 f2c7465e43..0ed09e4a0a 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 @@ -315,7 +315,7 @@ public class VAssignment extends JComponent ResultSet rs = m_pstmt.executeQuery(); if (rs.next()) { - StringBuffer sb = new StringBuffer(rs.getString(1)); + StringBuilder sb = new StringBuilder(rs.getString(1)); sb.append(" ").append(m_dateFormat.format(rs.getTimestamp(2))) .append(" ").append(m_qtyFormat.format(rs.getBigDecimal(3))) .append(" ").append(rs.getString(4).trim()); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAssignmentDialog.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAssignmentDialog.java index 8babd7c857..a334775dc1 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAssignmentDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAssignmentDialog.java @@ -354,7 +354,7 @@ public class VAssignmentDialog extends CDialog ResultSet rs = pstmt.executeQuery(); while (rs.next()) { - StringBuffer sb = new StringBuffer (rs.getString(2)); + StringBuilder sb = new StringBuilder (rs.getString(2)); if (!"Y".equals(rs.getString(3))) sb.insert(0,'~').append('~'); // inactive marker // Key S_Resource_ID/Name diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VButton.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VButton.java index 2d0698e655..0677ff5f54 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VButton.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VButton.java @@ -290,7 +290,7 @@ public final class VButton extends CButton */ public String toString() { - StringBuffer sb = new StringBuffer ("VButton["); + StringBuilder sb = new StringBuilder ("VButton["); sb.append(m_columnName); sb.append("=").append(m_value).append("]"); return sb.toString(); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocatorDialog.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocatorDialog.java index 8d5208a86b..10790657f7 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocatorDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocatorDialog.java @@ -416,7 +416,7 @@ public class VLocatorDialog extends CDialog return; getWarehouseInfo(pp.getKey()); // - StringBuffer buf = new StringBuffer(m_M_WarehouseValue); + StringBuilder buf = new StringBuilder(m_M_WarehouseValue); buf.append(m_Separator).append(fX.getText()); buf.append(m_Separator).append(fY.getText()); buf.append(m_Separator).append(fZ.getText()); 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 f068d44dcb..9c970ab95e 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 @@ -946,7 +946,7 @@ public class VLookup extends JComponent */ private String getExtraWhereClause (String text) { - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); m_tableName = m_columnName.substring(0, m_columnName.length()-3); m_keyColumnName = m_columnName; // 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 a66bd900a3..3b5a957643 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 @@ -238,7 +238,7 @@ public final class VNumber extends JComponent m_text.setPreferredSize(size); m_text.setMinimumSize(size); } else { - StringBuffer s = new StringBuffer(); + StringBuilder s = new StringBuilder(); for(int i = 0; i < SIZE; i++) { s.append("0"); } diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/ValuePreference.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/ValuePreference.java index 83f01e8fb8..4dbe3e435a 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/ValuePreference.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/ValuePreference.java @@ -394,7 +394,7 @@ public class ValuePreference extends CDialog private void setExplanation() { /** @todo translation */ - StringBuffer expl = new StringBuffer("For "); + StringBuilder expl = new StringBuilder("For "); if (cbClient.isSelected() && cbOrg.isSelected()) expl.append("this Client and Organization"); else if (cbClient.isSelected() && !cbOrg.isSelected()) @@ -432,7 +432,7 @@ public class ValuePreference extends CDialog { log.info(""); - StringBuffer sql = new StringBuffer ("DELETE FROM AD_Preference WHERE "); + StringBuilder sql = new StringBuilder ("DELETE FROM AD_Preference WHERE "); sql.append("AD_Client_ID=").append(cbClient.isSelected() ? m_AD_Client_ID : 0); sql.append(" AND AD_Org_ID=").append(cbOrg.isSelected() ? m_AD_Org_ID : 0); if (cbUser.isSelected()) @@ -493,7 +493,7 @@ public class ValuePreference extends CDialog int Org_ID = cbOrg.isSelected() ? m_AD_Org_ID : 0; int AD_Preference_ID = DB.getNextID(m_ctx, "AD_Preference", null); // - StringBuffer sql = new StringBuffer ("INSERT INTO AD_Preference (" + StringBuilder sql = new StringBuilder ("INSERT INTO AD_Preference (" + "AD_Preference_ID, AD_Client_ID, AD_Org_ID, IsActive, Created,CreatedBy,Updated,UpdatedBy," + "AD_Window_ID, AD_User_ID, Attribute, Value) VALUES ("); sql.append(AD_Preference_ID).append(",").append(Client_ID).append(",").append(Org_ID) diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/tree/AdempiereTreeModel.java b/org.adempiere.ui.swing/src/org/compiere/grid/tree/AdempiereTreeModel.java index 76213745b2..c716d3c92d 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/tree/AdempiereTreeModel.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/tree/AdempiereTreeModel.java @@ -67,7 +67,7 @@ public class AdempiereTreeModel extends DefaultTreeModel { for (int i = 0; i < from.getChildCount(); i++) { MTreeNode nd = (MTreeNode)from.getChildAt(i); - StringBuffer sql = new StringBuffer("UPDATE "); + StringBuilder sql = new StringBuilder("UPDATE "); sql.append(m_MTree.getNodeTableName()) .append(" SET Parent_ID=").append(from.getNode_ID()) .append(", SeqNo=").append(i) @@ -80,7 +80,7 @@ public class AdempiereTreeModel extends DefaultTreeModel { for (int i = 0; i < to.getChildCount(); i++) { MTreeNode nd = (MTreeNode)to.getChildAt(i); - StringBuffer sql = new StringBuffer("UPDATE "); + StringBuilder sql = new StringBuilder("UPDATE "); sql.append(m_MTree.getNodeTableName()) .append(" SET Parent_ID=").append(to.getNode_ID()) .append(", SeqNo=").append(i) diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/tree/VTreePanel.java b/org.adempiere.ui.swing/src/org/compiere/grid/tree/VTreePanel.java index 5f07552b21..c416461bfc 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/tree/VTreePanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/tree/VTreePanel.java @@ -944,7 +944,7 @@ public final class VTreePanel extends CPanel int AD_Client_ID = Env.getAD_Client_ID(Env.getCtx()); int AD_Org_ID = Env.getContextAsInt(Env.getCtx(), "#AD_Org_ID"); int AD_User_ID = Env.getContextAsInt(Env.getCtx(), "#AD_User_ID"); - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); if (add) sql.append("INSERT INTO AD_TreeBar " + "(AD_Tree_ID,AD_User_ID,Node_ID, " 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 efe425fc04..76b69d6846 100644 --- a/org.adempiere.ui.swing/src/org/compiere/minigrid/MiniTable.java +++ b/org.adempiere.ui.swing/src/org/compiere/minigrid/MiniTable.java @@ -262,7 +262,7 @@ public class MiniTable extends CTable implements IMiniTable m_layout = layout; m_multiSelection = multiSelection; // - StringBuffer sql = new StringBuffer ("SELECT "); + StringBuilder sql = new StringBuilder ("SELECT "); // add columns & sql for (int i = 0; i < layout.length; i++) { diff --git a/org.adempiere.ui.swing/src/org/compiere/plaf/CompiereColor.java b/org.adempiere.ui.swing/src/org/compiere/plaf/CompiereColor.java index 84f8c85e83..f778cc515f 100644 --- a/org.adempiere.ui.swing/src/org/compiere/plaf/CompiereColor.java +++ b/org.adempiere.ui.swing/src/org/compiere/plaf/CompiereColor.java @@ -987,7 +987,7 @@ public class CompiereColor implements Serializable */ public String toString() { - StringBuffer sb = new StringBuffer ("AdempiereColor["); + StringBuilder sb = new StringBuilder ("AdempiereColor["); if (isFlat()) sb.append("Flat") .append(" ").append(ThemeUtils.getColorAsString(getFlatColor())); diff --git a/org.adempiere.ui.swing/src/org/compiere/plaf/CompiereToolTipUI.java b/org.adempiere.ui.swing/src/org/compiere/plaf/CompiereToolTipUI.java index 4fa1fdd624..66f900cedb 100644 --- a/org.adempiere.ui.swing/src/org/compiere/plaf/CompiereToolTipUI.java +++ b/org.adempiere.ui.swing/src/org/compiere/plaf/CompiereToolTipUI.java @@ -72,7 +72,7 @@ public class CompiereToolTipUI extends MetalToolTipUI return str; KeyStroke[] keys = comp.getRegisteredKeyStrokes (); - StringBuffer controlKeyStr = new StringBuffer(); + StringBuilder controlKeyStr = new StringBuilder(); for (int i = 0; i < keys.length; i++) { int mod = keys[i].getModifiers (); diff --git a/org.adempiere.ui.swing/src/org/compiere/pos/PosKeyPanel.java b/org.adempiere.ui.swing/src/org/compiere/pos/PosKeyPanel.java index c4fb163e11..87b4d35ed1 100644 --- a/org.adempiere.ui.swing/src/org/compiere/pos/PosKeyPanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/pos/PosKeyPanel.java @@ -142,7 +142,7 @@ public class PosKeyPanel extends CPanel implements ActionListener { map.put(key.getC_POSKey_ID(), key); Color keyColor = stdColor; Font keyFont = stdFont; - StringBuffer buttonHTML = new StringBuffer("

"); + StringBuilder buttonHTML = new StringBuilder("

"); if (key.getAD_PrintColor_ID() != 0) { MPrintColor color = MPrintColor.get(Env.getCtx(), key.getAD_PrintColor_ID()); 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 189c138db9..fce37661a4 100644 --- a/org.adempiere.ui.swing/src/org/compiere/print/Viewer.java +++ b/org.adempiere.ui.swing/src/org/compiere/print/Viewer.java @@ -485,7 +485,7 @@ public class Viewer extends CFrame // Report Info setTitle(Msg.getMsg(m_ctx, "Report") + ": " + m_reportEngine.getName() + " " + Env.getHeader(m_ctx, 0)); - StringBuffer sb = new StringBuffer (); + StringBuilder sb = new StringBuilder (); sb.append(m_viewPanel.getPaper().toString(m_ctx)) .append(" - ").append(Msg.getMsg(m_ctx, "DataCols")).append("=") .append(m_reportEngine.getColumnCount()) @@ -1285,7 +1285,7 @@ public class Viewer extends CFrame String AD_Language = pp.getValue(); int AD_PrintFormat_ID = m_reportEngine.getPrintFormat().get_ID(); log.config(AD_Language + " - AD_PrintFormat_ID=" + AD_PrintFormat_ID); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); // English if (Language.isBaseLanguage (AD_Language)) { 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 b30a452594..abb81ef0b2 100644 --- a/org.adempiere.ui.swing/src/org/compiere/swing/CPanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/swing/CPanel.java @@ -194,7 +194,7 @@ public class CPanel extends JPanel */ public String toString() { - StringBuffer sb = new StringBuffer ("CPanel ["); + StringBuilder sb = new StringBuilder ("CPanel ["); sb.append(super.toString()); CompiereColor bg = getBackgroundColor(); if (bg != null) diff --git a/org.adempiere.ui.swing/src/org/compiere/swing/CTabbedPane.java b/org.adempiere.ui.swing/src/org/compiere/swing/CTabbedPane.java index 4862f44742..2e365b6151 100644 --- a/org.adempiere.ui.swing/src/org/compiere/swing/CTabbedPane.java +++ b/org.adempiere.ui.swing/src/org/compiere/swing/CTabbedPane.java @@ -331,7 +331,7 @@ public class CTabbedPane extends JTabbedPane */ public String toString() { - StringBuffer sb = new StringBuffer ("CTabbedPane ["); + StringBuilder sb = new StringBuilder ("CTabbedPane ["); sb.append(super.toString()); CompiereColor bg = getBackgroundColor(); if (bg != null) diff --git a/org.adempiere.ui.swing/src/org/eevolution/form/VInOutInvoiceGen.java b/org.adempiere.ui.swing/src/org/eevolution/form/VInOutInvoiceGen.java index 7335475287..ba9435029b 100755 --- a/org.adempiere.ui.swing/src/org/eevolution/form/VInOutInvoiceGen.java +++ b/org.adempiere.ui.swing/src/org/eevolution/form/VInOutInvoiceGen.java @@ -270,7 +270,7 @@ public class VInOutInvoiceGen extends CPanel private String getOrderSQL() { // Create SQL - StringBuffer sql = new StringBuffer( + StringBuilder sql = new StringBuilder( "SELECT C_Order_ID, o.Name, dt.Name, DocumentNo, bp.Name, DateOrdered, TotalLines " + "FROM M_InOut_Candidate_v ic, AD_Org o, C_BPartner bp, C_DocType dt " + "WHERE ic.AD_Org_ID=o.AD_Org_ID" @@ -307,7 +307,7 @@ public class VInOutInvoiceGen extends CPanel */ private String getRMASql() { - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); sql.append("SELECT rma.M_RMA_ID, org.Name, dt.Name, rma.DocumentNo, bp.Name, rma.Created, rma.Amt "); sql.append("FROM M_RMA rma INNER JOIN AD_Org org ON rma.AD_Org_ID=org.AD_Org_ID "); @@ -552,7 +552,7 @@ public class VInOutInvoiceGen extends CPanel } //insert selection - StringBuffer insert = new StringBuffer(); + StringBuilder insert = new StringBuilder(); insert.append("INSERT INTO T_SELECTION(AD_PINSTANCE_ID, T_SELECTION_ID) "); int counter = 0; for(Integer selectedId : selection) @@ -576,7 +576,7 @@ public class VInOutInvoiceGen extends CPanel trx.rollback(); return; } - insert = new StringBuffer(); + insert = new StringBuilder(); insert.append("INSERT INTO T_SELECTION(AD_PINSTANCE_ID, T_SELECTION_ID) "); counter = 0; } @@ -720,7 +720,7 @@ public class VInOutInvoiceGen extends CPanel //insert selection /*Selection exist from shipment*/ - StringBuffer insert = new StringBuffer(); + StringBuilder insert = new StringBuilder(); insert.append("INSERT INTO T_SELECTION(AD_PINSTANCE_ID, T_SELECTION_ID) "); int counter = 0; for(Integer selectedId : selection) @@ -744,7 +744,7 @@ public class VInOutInvoiceGen extends CPanel trx.rollback(); return; } - insert = new StringBuffer(); + insert = new StringBuilder(); insert.append("INSERT INTO T_SELECTION(AD_PINSTANCE_ID, T_SELECTION_ID) "); counter = 0; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/LayoutUtils.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/LayoutUtils.java index 79f2841aa5..e2a6ddbd66 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/LayoutUtils.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/LayoutUtils.java @@ -39,7 +39,7 @@ public final class LayoutUtils { * @param layout */ public static void sendDeferLayoutEvent(Borderlayout layout, int timeout) { - StringBuffer content = new StringBuffer(); + StringBuilder content = new StringBuilder(); content.append("ad_deferRenderBorderLayout('") .append(layout.getUuid()) .append("',").append(timeout).append(");"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/TimelineEventFeed.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/TimelineEventFeed.java index 8004ea8f32..8d53dab442 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/TimelineEventFeed.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/TimelineEventFeed.java @@ -100,7 +100,7 @@ public class TimelineEventFeed extends HttpServlet { MAssignmentSlot[] mas = m_model.getAssignmentSlots (resourceId, startDate, endDate, null, true, null); if (mas == null || mas.length == 0) return; - StringBuffer xml = new StringBuffer(); + StringBuilder xml = new StringBuilder(); xml.append("").append("\r\n"); for (MAssignmentSlot slot : mas) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/ValuePreference.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/ValuePreference.java index e30c0fceb8..9fde2d9ac9 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/ValuePreference.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/ValuePreference.java @@ -409,7 +409,7 @@ public class ValuePreference extends Window implements EventListener private void setExplanation() { /** @todo translation */ - StringBuffer expl = new StringBuffer("For "); + StringBuilder expl = new StringBuilder("For "); if (cbClient.isChecked() && cbOrg.isChecked() ) expl.append("this Client and Organization"); else if (cbClient.isChecked() && !cbOrg.isChecked()) @@ -446,7 +446,7 @@ public class ValuePreference extends Window implements EventListener { log.info(""); - StringBuffer sql = new StringBuffer ("DELETE FROM AD_Preference WHERE "); + StringBuilder sql = new StringBuilder ("DELETE FROM AD_Preference WHERE "); sql.append("AD_Client_ID=").append(cbClient.isChecked() ? m_AD_Client_ID : 0); sql.append(" AND AD_Org_ID=").append(cbOrg.isChecked() ? m_AD_Org_ID : 0); if (cbUser.isChecked()) @@ -507,7 +507,7 @@ public class ValuePreference extends Window implements EventListener int Org_ID = cbOrg.isChecked() ? m_AD_Org_ID : 0; int AD_Preference_ID = DB.getNextID(m_ctx, "AD_Preference", null); // - StringBuffer sql = new StringBuffer ("INSERT INTO AD_Preference (" + StringBuilder sql = new StringBuilder ("INSERT INTO AD_Preference (" + "AD_Preference_ID, AD_Client_ID, AD_Org_ID, IsActive, Created,CreatedBy,Updated,UpdatedBy," + "AD_Window_ID, AD_User_ID, Attribute, Value) VALUES ("); sql.append(AD_Preference_ID).append(",").append(Client_ID).append(",").append(Org_ID) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java index b1b9cec3b6..503a22e038 100755 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java @@ -868,7 +868,7 @@ public class WAcctViewer extends Window implements EventListener { // Parameter Info - StringBuffer para = new StringBuffer(); + StringBuilder para = new StringBuilder(); // Reset Selection Data 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 63412bdd9f..a70b3ad905 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 @@ -303,7 +303,7 @@ public class WAcctViewerData { // SELECT () FROM tableName avd WHERE avd. - StringBuffer sql = new StringBuffer ("SELECT ("); + StringBuilder sql = new StringBuilder ("SELECT ("); Language language = Env.getLanguage(Env.getCtx()); sql.append(MLookupFactory.getLookup_TableDirEmbed(language, columnName, "avd")) @@ -337,7 +337,7 @@ public class WAcctViewerData { // Set Where Clause - StringBuffer whereClause = new StringBuffer(); + StringBuilder whereClause = new StringBuilder(); // Add Organization @@ -411,7 +411,7 @@ public class WAcctViewerData // Set Order By Clause - StringBuffer orderClause = new StringBuffer(); + StringBuilder orderClause = new StringBuilder(); if (sortBy1.length() > 0) orderClause.append(RModel.TABLE_ALIAS).append(".").append(sortBy1); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java index 99cdaaffcf..962b5091fa 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java @@ -152,7 +152,7 @@ public class ADSortTab extends Panel implements IADTabpanel { m_AD_Table_ID = AD_Table_ID; int identifiersCount = 0; - StringBuffer identifierSql = new StringBuffer(); + StringBuilder identifierSql = new StringBuilder(); String sql = "SELECT t.TableName, c.AD_Column_ID, c.ColumnName, e.Name," // 1..4 + "c.IsParent, c.IsKey, c.IsIdentifier, c.IsTranslated " // 4..8 + "FROM AD_Table t, AD_Column c, AD_Element e " @@ -396,7 +396,7 @@ public class ADSortTab extends Panel implements IADTabpanel // SELECT t.AD_Field_ID,t.Name,t.SeqNo,t.IsDisplayed FROM AD_Field t WHERE t.AD_Tab_ID=? ORDER BY 4 DESC,3,2 // SELECT t.AD_PrintFormatItem_ID,t.Name,t.SeqNo,t.IsPrinted FROM AD_PrintFormatItem t WHERE t.AD_PrintFormat_ID=? ORDER BY 4 DESC,3,2 // SELECT t.AD_PrintFormatItem_ID,t.Name,t.SortNo,t.IsOrderBy FROM AD_PrintFormatItem t WHERE t.AD_PrintFormat_ID=? ORDER BY 4 DESC,3,2 - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); // Columns sql.append("SELECT t.").append(m_KeyColumnName) // 1 .append(",").append(m_IdentifierSql) // 2 @@ -640,7 +640,7 @@ public class ADSortTab extends Panel implements IADTabpanel return; log.fine(""); boolean ok = true; - StringBuffer info = new StringBuffer(); + StringBuilder info = new StringBuilder(); StringBuffer sql = null; // noList - Set SortColumn to null and optional YesNo Column to 'N' for (int i = 0; i < noModel.getSize(); i++) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADTabbox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADTabbox.java index 1ca071106b..2511db0953 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADTabbox.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADTabbox.java @@ -256,7 +256,7 @@ public abstract class AbstractADTabbox extends AbstractUIPart implements IADTabb * @return full path */ public String getPath() { - StringBuffer path = new StringBuffer(); + StringBuilder path = new StringBuilder(); int s = this.getSelectedIndex(); if (s <= 0 ) s = 0; IADTabpanel p = tabPanelList.get(s); 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 0eab965c83..08e6f68247 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 @@ -1202,7 +1202,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements } else { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); String msg = e.getMessage(); if (msg != null && msg.length() > 0) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java index c3c5cebe07..e99b1e21c1 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java @@ -669,7 +669,7 @@ public final class AEnv */ public static String getWindowHeader(Properties ctx, int WindowNo) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); if (WindowNo > 0){ sb.append(Env.getContext(ctx, WindowNo, "WindowName", false)).append(" "); final String documentNo = Env.getContext(ctx, WindowNo, "DocumentNo", false); @@ -733,7 +733,7 @@ public final class AEnv * @return dialog header */ public static String getDialogHeader(Properties ctx, int windowNo) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); if (windowNo > 0){ sb.append(Env.getContext(ctx, windowNo, "WindowName", false)).append(" "); final String documentNo = Env.getContext(ctx, windowNo, "DocumentNo", false); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java index 2b2ba2a794..df1a4ae11e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java @@ -345,7 +345,7 @@ public class ProcessParameterPanel extends Panel implements /** * Mandatory fields see - MTable.getMandatory */ - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); int size = m_mFields.size(); for (int i = 0; i < size; i++) { GridField field = (GridField) m_mFields.get(i); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromWindow.java index e2a1350268..25033c3ef4 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromWindow.java @@ -194,7 +194,7 @@ public class WCreateFromWindow extends Window implements EventListener, W public void setStatusLine(int selectedRowCount, String text) { - StringBuffer sb = new StringBuffer(String.valueOf(selectedRowCount)); + StringBuilder sb = new StringBuilder(String.valueOf(selectedRowCount)); if (text != null && text.trim().length() > 0) { sb.append(" - ").append(text); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFactReconcile.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFactReconcile.java index 07e1e4e730..38b93ee994 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFactReconcile.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFactReconcile.java @@ -333,7 +333,7 @@ implements IFormController, EventListener, WTableModelListener, ValueChan } // Information - StringBuffer info = new StringBuffer(); + StringBuilder info = new StringBuilder(); info.append(m_noSelected).append(" ").append(Msg.getMsg(Env.getCtx(), "Selected")).append(" / ").append(miniTable.getRowCount()); differenceField.setText(m_format.format(selectedAmt)); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WGenForm.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WGenForm.java index eee6e2209f..3a86d648c1 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WGenForm.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WGenForm.java @@ -333,7 +333,7 @@ public class WGenForm extends ADForm implements EventListener, WTableMode tabbedPane.setSelectedIndex(1); // ProcessInfoUtil.setLogFromDB(genForm.getProcessInfo()); - StringBuffer iText = new StringBuffer(); + StringBuilder iText = new StringBuilder(); iText.append("").append(genForm.getProcessInfo().getSummary()) .append("
(") .append(Msg.getMsg(Env.getCtx(), genForm.getTitle())) 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 23a0b14ad0..6524c21ebe 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 @@ -455,7 +455,7 @@ public class WPayPrint extends PayPrint implements IFormController, EventListene if (lastDocumentNo != 0) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("UPDATE C_BankAccountDoc SET CurrentNext=").append(++lastDocumentNo) .append(" WHERE C_BankAccount_ID=").append(m_C_BankAccount_ID) .append(" AND PaymentRule='").append(PaymentRule).append("'"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WSQLProcess.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WSQLProcess.java index 61aded609e..78bd4c70e3 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WSQLProcess.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WSQLProcess.java @@ -157,7 +157,7 @@ public class WSQLProcess extends ADForm implements EventListener { if (sqlStatements == null || sqlStatements.length() == 0) return ""; - StringBuffer result = new StringBuffer(); + StringBuilder result = new StringBuilder(); // StringTokenizer st = new StringTokenizer(sqlStatements, ";", false); while (st.hasMoreTokens()) @@ -180,7 +180,7 @@ public class WSQLProcess extends ADForm implements EventListener { if (sqlStatement == null) return ""; - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); char[] chars = sqlStatement.toCharArray(); for (int i = 0; i < chars.length; i++) { 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 9b89fe848f..b933f18bb2 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 @@ -551,7 +551,7 @@ class mySimpleTreeNode extends DefaultTreeNode Vector userObject = (Vector )getData(); // Product - StringBuffer sb = new StringBuffer(((KeyNamePair)userObject.elementAt(2)).getName()); + StringBuilder sb = new StringBuilder(((KeyNamePair)userObject.elementAt(2)).getName()); // UOM sb.append(" ["+((KeyNamePair) userObject.elementAt(3)).getName().trim()+"]"); // BOMQty diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/graph/WPerformanceIndicator.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/graph/WPerformanceIndicator.java index 3ab257381d..9ca625fdec 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/graph/WPerformanceIndicator.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/graph/WPerformanceIndicator.java @@ -100,7 +100,7 @@ public class WPerformanceIndicator extends Panel implements EventListener JFreeChart chart = null; // Set Text - StringBuffer text = new StringBuffer(m_goal.getName()); + StringBuilder text = new StringBuilder(m_goal.getName()); if (m_goal.isTarget()) text.append(": ").append(m_goal.getPercent()).append("%"); else @@ -109,7 +109,7 @@ public class WPerformanceIndicator extends Panel implements EventListener m_text = text.toString(); // ToolTip - text = new StringBuffer(); + text = new StringBuilder(); if (m_goal.getDescription() != null) text.append(m_goal.getDescription()).append(": "); text.append(s_format.format(m_goal.getMeasureActual())); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFPanel.java index 4c0ba99e21..68b3135a90 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFPanel.java @@ -226,7 +226,7 @@ public class WFPanel extends Borderlayout implements EventListener } // Info Text - StringBuffer msg = new StringBuffer(""); + StringBuilder msg = new StringBuilder(""); msg.append("

").append(m_wf.getName(true)).append("

"); String s = m_wf.getDescription(true); if (s != null && s.length() > 0) @@ -244,7 +244,7 @@ public class WFPanel extends Borderlayout implements EventListener */ public String toString() { - StringBuffer sb = new StringBuffer("WorkflowPanel["); + StringBuilder sb = new StringBuilder("WorkflowPanel["); if (m_wf != null) sb.append(m_wf.getAD_Workflow_ID()); sb.append("]"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ADTreeOnDropListener.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ADTreeOnDropListener.java index 07669c9d6b..cb1d7212f5 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ADTreeOnDropListener.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ADTreeOnDropListener.java @@ -165,7 +165,7 @@ public class ADTreeOnDropListener implements EventListener { { DefaultTreeNode nd = (DefaultTreeNode)oldParent.getChildAt(i); MTreeNode md = (MTreeNode) nd.getData(); - StringBuffer sql = new StringBuffer("UPDATE "); + StringBuilder sql = new StringBuilder("UPDATE "); sql.append(mTree.getNodeTableName()) .append(" SET Parent_ID=").append(oldMParent.getNode_ID()) .append(", SeqNo=").append(i) @@ -182,7 +182,7 @@ public class ADTreeOnDropListener implements EventListener { { DefaultTreeNode nd = (DefaultTreeNode)newParent.getChildAt(i); MTreeNode md = (MTreeNode) nd.getData(); - StringBuffer sql = new StringBuffer("UPDATE "); + StringBuilder sql = new StringBuilder("UPDATE "); sql.append(mTree.getNodeTableName()) .append(" SET Parent_ID=").append(newMParent.getNode_ID()) .append(", SeqNo=").append(i) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Listbox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Listbox.java index 74ab5083ae..047f64f80d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Listbox.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Listbox.java @@ -324,7 +324,7 @@ public class Listbox extends org.zkoss.zul.Listbox implements EventListener 1) items.append(", "); 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 d2d66c772e..76f515605b 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 @@ -344,7 +344,7 @@ public class WListbox extends Listbox implements IMiniTable, TableValueChangeLis String tableName,boolean addAccessSQL) { int columnIndex = 0; - StringBuffer sql = new StringBuffer ("SELECT "); + StringBuilder sql = new StringBuilder ("SELECT "); setLayout(layout); clearColumns(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/CalendarWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/CalendarWindow.java index f9f361dcf4..d252120910 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/CalendarWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/CalendarWindow.java @@ -252,7 +252,7 @@ public class CalendarWindow extends Window implements EventListener { CalendarsEvent evt = (CalendarsEvent) e; SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy/MM/d"); sdf1.setTimeZone(calendars.getDefaultTimeZone()); - StringBuffer sb = new StringBuffer("Update... from "); + StringBuilder sb = new StringBuilder("Update... from "); sb.append(sdf1.format(evt.getCalendarEvent().getBeginDate())); sb.append(" to "); sb.append(sdf1.format(evt.getBeginDate())); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPFavourites.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPFavourites.java index 17f1581114..75e9ef60a7 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPFavourites.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPFavourites.java @@ -175,7 +175,7 @@ public class DPFavourites extends DashboardPanel implements EventListener int AD_Client_ID = Env.getAD_Client_ID(Env.getCtx()); int AD_Org_ID = Env.getContextAsInt(Env.getCtx(), "#AD_Org_ID"); int AD_User_ID = Env.getContextAsInt(Env.getCtx(), "#AD_User_ID"); - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); if (add) sql.append("INSERT INTO AD_TreeBar " + "(AD_Tree_ID,AD_User_ID,Node_ID, " 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 1fd8fd48a7..e30b005be2 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 @@ -119,7 +119,7 @@ public class WAssignmentEditor extends WEditor implements ContextMenuListener { ResultSet rs = m_pstmt.executeQuery(); if (rs.next()) { - StringBuffer sb = new StringBuffer(rs.getString(1)); + StringBuilder sb = new StringBuilder(rs.getString(1)); sb.append(" ").append(m_dateFormat.format(rs.getTimestamp(2))) .append(" ").append(m_qtyFormat.format(rs.getBigDecimal(3))) .append(" ").append(rs.getString(4).trim()); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WEditor.java index 5f778788e7..ffa8725c6c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WEditor.java @@ -415,7 +415,7 @@ public abstract class WEditor implements EventListener, PropertyChangeLis public String toString() { - StringBuffer sb = new StringBuffer(30); + StringBuilder sb = new StringBuilder(30); sb.append(this.getClass().getName()); sb.append("[").append(this.getColumnName()); sb.append("="); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/CustomizeGridViewPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/CustomizeGridViewPanel.java index d0ba60e883..37e0f42296 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/CustomizeGridViewPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/CustomizeGridViewPanel.java @@ -505,7 +505,7 @@ public class CustomizeGridViewPanel extends Panel // yesList int index = 0; boolean ok = true; - StringBuffer custom = new StringBuffer(); + StringBuilder custom = new StringBuilder(); for (int i = 0; i < yesModel.getSize(); i++) { ListElement pp = (ListElement)yesModel.getElementAt(i); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssetPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssetPanel.java index 4207352d1a..0da3a174b9 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssetPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssetPanel.java @@ -236,7 +236,7 @@ public class InfoAssetPanel extends InfoPanel implements ValueChangeListener, Ev private void initInfo (String value, int A_Asset_ID, String whereClause) { // Create Grid - StringBuffer where = new StringBuffer(); + StringBuilder where = new StringBuilder(); where.append("a.IsActive='Y'"); if (whereClause != null && whereClause.length() > 0) @@ -262,7 +262,7 @@ public class InfoAssetPanel extends InfoPanel implements ValueChangeListener, Ev protected String getSQLWhere() { - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); // => Value diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssignmentPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssignmentPanel.java index d88ee9dd70..18693dc216 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssignmentPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssignmentPanel.java @@ -271,7 +271,7 @@ public class InfoAssignmentPanel extends InfoPanel implements EventListener 0) where.append(" AND ").append(whereClause); @@ -305,7 +305,7 @@ public class InfoAssignmentPanel extends InfoPanel implements EventListener **/ // Create Grid - StringBuffer where = new StringBuffer(); + StringBuilder where = new StringBuilder(); where.append("C_BPartner.IsSummary='N' AND C_BPartner.IsActive='Y'"); if (whereClause != null && whereClause.length() > 0) where.append(" AND ").append(whereClause); @@ -430,7 +430,7 @@ public class InfoBPartnerPanel extends InfoPanel implements EventListener String postal = fieldPostal.getText().toUpperCase(); if (!(postal.equals("") || postal.equals("%"))) list.add ("UPPER(a.Postal) LIKE ?"); - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); int size = list.size(); // Just one if (size == 1) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoCashLinePanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoCashLinePanel.java index e5a591d103..edb423a690 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoCashLinePanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoCashLinePanel.java @@ -293,7 +293,7 @@ public class InfoCashLinePanel extends InfoPanel implements ValueChangeListener, private boolean initInfo () { // Prepare table - StringBuffer where = new StringBuffer("cl.IsActive='Y'"); + StringBuilder where = new StringBuilder("cl.IsActive='Y'"); if (p_whereClause.length() > 0) where.append(" AND ").append(Util.replace(p_whereClause, "C_CashLine.", "cl.")); @@ -314,7 +314,7 @@ public class InfoCashLinePanel extends InfoPanel implements ValueChangeListener, protected String getSQLWhere() { - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); if (fName.getText().length() > 0) sql.append(" AND UPPER(c.Name) LIKE ?"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoGeneralPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoGeneralPanel.java index f2845f00c3..96a06297e7 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoGeneralPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoGeneralPanel.java @@ -203,7 +203,7 @@ public class InfoGeneralPanel extends InfoPanel implements EventListener // Prepare table - StringBuffer where = new StringBuffer("IsActive='Y'"); + StringBuilder where = new StringBuilder("IsActive='Y'"); if (p_whereClause.length() > 0) where.append(" AND ").append(p_whereClause); 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 4250d40017..f7ac1b3059 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 @@ -268,7 +268,7 @@ public class InfoInOutPanel extends InfoPanel implements ValueChangeListener, Ev // Prepare table - StringBuffer where = new StringBuffer("i.IsActive='Y'"); + StringBuilder where = new StringBuilder("i.IsActive='Y'"); if (p_whereClause.length() > 0) where.append(" AND ").append(Util.replace(p_whereClause, "M_InOut.", "i.")); @@ -289,7 +289,7 @@ public class InfoInOutPanel extends InfoPanel implements ValueChangeListener, Ev protected String getSQLWhere() { - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); if (fDocumentNo.getText().length() > 0) sql.append(" AND UPPER(i.DocumentNo) LIKE ?"); 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 a4d5ca3a2b..3466856d43 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 @@ -294,7 +294,7 @@ public class InfoInvoicePanel extends InfoPanel implements ValueChangeListener editorBPartner.setValue(new Integer(bp)); // prepare table - StringBuffer where = new StringBuffer("i.IsActive='Y'"); + StringBuilder where = new StringBuilder("i.IsActive='Y'"); if (p_whereClause.length() > 0) where.append(" AND ").append(Util.replace(p_whereClause, "C_Invoice.", "i.")); prepareTable(s_invoiceLayout, @@ -308,7 +308,7 @@ public class InfoInvoicePanel extends InfoPanel implements ValueChangeListener @Override public String getSQLWhere() { - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); if (txtDocumentNo.getText().length() > 0) sql.append(" AND UPPER(i.DocumentNo) LIKE ?"); if (txtDescription.getText().length() > 0) 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 1f843a0820..98b374fa0c 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 @@ -271,7 +271,7 @@ public class InfoOrderPanel extends InfoPanel implements ValueChangeListener editorBPartner.setValue(new Integer(bp)); // prepare table - StringBuffer where = new StringBuffer("o.IsActive='Y'"); + StringBuilder where = new StringBuilder("o.IsActive='Y'"); if (p_whereClause.length() > 0) where.append(" AND ").append(Util.replace(p_whereClause, "C_Order.", "o.")); prepareTable(s_invoiceLayout, @@ -283,7 +283,7 @@ public class InfoOrderPanel extends InfoPanel implements ValueChangeListener @Override public String getSQLWhere() { - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); if (txtDocumentNo.getText().length() > 0) sql.append(" AND UPPER(o.DocumentNo) LIKE ?"); if (txtDescription.getText().length() > 0) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPAttributePanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPAttributePanel.java index a6a984d738..e90c34aae2 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPAttributePanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPAttributePanel.java @@ -498,7 +498,7 @@ public class InfoPAttributePanel extends Window implements EventListener **/ /*** Instance Attributes */ - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); // Serial No String s = serNoField.getComponent().getText(); if (s != null && s.length() > 0) 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 c990b7f54e..9cb68c1c74 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 @@ -583,7 +583,7 @@ public abstract class InfoPanel extends Window implements EventListener, // String dynWhere = getSQLWhere(); - StringBuffer sql = new StringBuffer (m_sqlMain); + StringBuilder sql = new StringBuilder (m_sqlMain); if (dynWhere.length() > 0) sql.append(dynWhere); // includes first AND if (m_sqlUserOrder != null && m_sqlUserOrder.trim().length() > 0) @@ -677,7 +677,7 @@ public abstract class InfoPanel extends Window implements EventListener, { long start = System.currentTimeMillis(); String dynWhere = getSQLWhere(); - StringBuffer sql = new StringBuffer (m_sqlCount); + StringBuilder sql = new StringBuilder (m_sqlCount); if (dynWhere.length() > 0) sql.append(dynWhere); // includes first AND @@ -857,7 +857,7 @@ public abstract class InfoPanel extends Window implements EventListener, return ""; } // - StringBuffer sb = new StringBuffer(getKeyColumn()); + StringBuilder sb = new StringBuilder(getKeyColumn()); if (keys.length > 1) sb.append(" IN ("); else 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 3b76a79402..18f67b22cc 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 @@ -282,7 +282,7 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener, fBPartner_ID.setValue(new Integer(bp)); // Prepare table - StringBuffer where = new StringBuffer("p.IsActive='Y'"); + StringBuilder where = new StringBuilder("p.IsActive='Y'"); if (p_whereClause.length() > 0) where.append(" AND ").append(Util.replace(p_whereClause, "C_Payment.", "p.")); @@ -302,7 +302,7 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener, protected String getSQLWhere() { - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); if (fDocumentNo.getText().length() > 0) sql.append(" AND UPPER(p.DocumentNo) LIKE ?"); 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 31ac1c95cf..743581224c 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 @@ -588,7 +588,7 @@ public class InfoProductPanel extends InfoPanel implements EventListener where.append(" AND ") // replace fully qualified name with alias .append(Util.replace(p_whereClause, "M_Product.", "p.")); - StringBuffer sqlMain = new StringBuffer("SELECT "); + StringBuilder sqlMain = new StringBuilder("SELECT "); int colIndex = 0; ColumnInfo[] layout = getProductLayout(); for (colIndex = 0; colIndex < layout.length; colIndex++) @@ -758,7 +758,7 @@ public class InfoProductPanel extends InfoPanel implements EventListener // Create Grid String orderBy = null; - StringBuffer where = new StringBuffer(); + StringBuilder where = new StringBuilder(); where.append("p.IsActive='Y'"); if (M_Warehouse_ID != 0) { @@ -954,7 +954,7 @@ public class InfoProductPanel extends InfoPanel implements EventListener */ public String getSQLWhere() { - StringBuffer where = new StringBuffer(); + StringBuilder where = new StringBuilder(); // Optional PLV int M_PriceList_Version_ID = 0; @@ -1348,7 +1348,7 @@ public class InfoProductPanel extends InfoPanel implements EventListener ListItem listitem = pickWarehouse.getSelectedItem(); if (listitem != null) M_Warehouse_ID = (Integer)listitem.getValue(); - StringBuffer where = new StringBuffer(); + StringBuilder where = new StringBuilder(); where.append("p.IsActive='Y'"); if (M_Warehouse_ID != 0) where.append(" AND p.IsSummary='N'"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/MenuTreeFilterPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/MenuTreeFilterPanel.java index 21db8bf9a0..f6ffea2b04 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/MenuTreeFilterPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/MenuTreeFilterPanel.java @@ -105,7 +105,7 @@ public class MenuTreeFilterPanel extends Popup implements EventListener, { if (treeItem.getParentItem() != null && !treeItem.getParentItem().isVisible()) { - StringBuffer label = new StringBuffer(treeItem.getLabel()); + StringBuilder label = new StringBuilder(treeItem.getLabel()); treeItem.setAttribute("flatView.label", treeItem.getLabel()); Treeitem parent = treeItem.getParentItem(); treeItem.setAttribute("flatView.parent", parent); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/StatusBarPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/StatusBarPanel.java index 8f899cec75..b23e2efdfe 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/StatusBarPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/StatusBarPanel.java @@ -156,7 +156,7 @@ public class StatusBarPanel extends Panel implements EventListener, IStat } else { - StringBuffer sb = new StringBuffer (" "); + StringBuilder sb = new StringBuilder (" "); sb.append(text).append(" "); statusDB.setValue(sb.toString()); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FDialog.java index 9b5f02eb77..d0378cced7 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FDialog.java @@ -258,7 +258,7 @@ public class FDialog */ public static boolean ask(int windowNo, Component comp, String adMessage, String msg, Callback callback) { - StringBuffer out = new StringBuffer(); + StringBuilder out = new StringBuilder(); if (adMessage != null && !adMessage.equals("")) out.append(Msg.getMsg(Env.getCtx(), adMessage)); if (msg != null && msg.length() > 0) 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 a8bdb20417..6ec4d5c3e7 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 @@ -735,8 +735,8 @@ public final class WAccountDialog extends Window /** * Check completeness (mandatory fields) ... and for duplicates */ - StringBuffer sb = new StringBuffer(); - StringBuffer sql = new StringBuffer ("SELECT C_ValidCombination_ID, Alias FROM C_ValidCombination WHERE "); + StringBuilder sb = new StringBuilder(); + StringBuilder sql = new StringBuilder ("SELECT C_ValidCombination_ID, Alias FROM C_ValidCombination WHERE "); Object value = null; if (s_AcctSchema.isHasAlias()) { @@ -933,7 +933,7 @@ public final class WAccountDialog extends Window if (IDvalue != 0 && s_AcctSchema.isHasAlias() && !f_Alias.getValue().toString().equals(Alias)) { - sql = new StringBuffer("UPDATE C_ValidCombination SET Alias="); + sql = new StringBuilder("UPDATE C_ValidCombination SET Alias="); if (f_Alias.getValue().toString().length() == 0) sql.append("NULL"); else diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAssignmentDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAssignmentDialog.java index 2cb24e3381..e45c28b977 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAssignmentDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAssignmentDialog.java @@ -319,7 +319,7 @@ public class WAssignmentDialog extends Window implements EventListener ResultSet rs = pstmt.executeQuery(); while (rs.next()) { - StringBuffer sb = new StringBuffer (rs.getString(2)); + StringBuilder sb = new StringBuilder (rs.getString(2)); if (!"Y".equals(rs.getString(3))) sb.insert(0,'~').append('~'); // inactive marker // Key S_Resource_ID/Name diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAutoCompleterCity.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAutoCompleterCity.java index 221af71ddb..a5c467d61b 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAutoCompleterCity.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAutoCompleterCity.java @@ -149,7 +149,7 @@ public class WAutoCompleterCity extends AutoComplete implements EventListener params = new ArrayList(); - final StringBuffer sql = new StringBuffer( + final StringBuilder sql = new StringBuilder( "SELECT cy.C_City_ID, cy.Name, cy.C_Region_ID, r.Name" +" FROM C_City cy" +" LEFT OUTER JOIN C_Region r ON (r.C_Region_ID=cy.C_Region_ID)" diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocatorDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocatorDialog.java index ecf355a9d8..a5b6396ea7 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocatorDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocatorDialog.java @@ -480,7 +480,7 @@ public class WLocatorDialog extends Window implements EventListener getWarehouseInfo(pp.getKey()); - StringBuffer buf = new StringBuffer(m_M_WarehouseValue); + StringBuilder buf = new StringBuilder(m_M_WarehouseValue); buf.append(m_Separator).append(txtAisleX.getText()); buf.append(m_Separator).append(txtBinY.getText()); buf.append(m_Separator).append(txtLevelZ.getText()); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WRecordAccessDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WRecordAccessDialog.java index e8fc87c6a1..f5cf4cbebc 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WRecordAccessDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WRecordAccessDialog.java @@ -259,7 +259,7 @@ public class WRecordAccessDialog extends Window implements EventListener setLine(ra); } // Label - StringBuffer txt = new StringBuffer(); + StringBuilder txt = new StringBuilder(); if (newRecord) txt.append("+"); txt.append(m_currentRow+1).append("/").append(maxIndex+1); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WTask.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WTask.java index d2b141a76a..6a0c5fc048 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WTask.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WTask.java @@ -116,7 +116,7 @@ public class WTask extends Window implements EventListener Thread.sleep(500); Executions.activate(desktop, 500); try { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(osTask.getOut()) .append("
-----------
") .append(osTask.getErr()) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WTextEditorDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WTextEditorDialog.java index 9bb1d50ae8..26caec2e4b 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WTextEditorDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WTextEditorDialog.java @@ -174,7 +174,7 @@ public class WTextEditorDialog extends Window implements EventListener{ private void updateStatus(int newLength) { if (status != null && maxSize > 0) { - StringBuffer msg = new StringBuffer(); + StringBuilder msg = new StringBuilder(); msg.append(newLength); if (newLength == maxSize) msg.append(" = "); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewer.java index 2c08ab83c0..7bc5d4a425 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewer.java @@ -101,7 +101,7 @@ public class ZkJRViewer extends Window implements EventListener, ITabOnCl } private String makePrefix(String name) { - StringBuffer prefix = new StringBuffer(); + StringBuilder prefix = new StringBuilder(); char[] nameArray = name.toCharArray(); for (char ch : nameArray) { if (Character.isLetterOrDigit(ch)) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java index b0424021f6..96e1ce16dd 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java @@ -452,7 +452,7 @@ public class ZkReportViewer extends Window implements EventListener, ITab } private String makePrefix(String name) { - StringBuffer prefix = new StringBuffer(); + StringBuilder prefix = new StringBuilder(); char[] nameArray = name.toCharArray(); for (char ch : nameArray) { if (Character.isLetterOrDigit(ch)) { @@ -591,7 +591,7 @@ public class ZkReportViewer extends Window implements EventListener, ITab { // Report Info setTitle(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Report") + ": " + m_reportEngine.getName() + " " + Env.getHeader(Env.getCtx(), 0))); - StringBuffer sb = new StringBuffer (); + StringBuilder sb = new StringBuilder (); sb.append(Msg.getMsg(Env.getCtx(), "DataCols")).append("=") .append(m_reportEngine.getColumnCount()) .append(", ").append(Msg.getMsg(Env.getCtx(), "DataRows")).append("=") 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 386972da6e..40aad68ae3 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/Allocation.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/Allocation.java @@ -118,7 +118,7 @@ public class Allocation * 5-ConvAmt, 6-ConvOpen, 7-Allocated */ Vector> data = new Vector>(); - StringBuffer sql = new StringBuffer("SELECT p.DateTrx,p.DocumentNo,p.C_Payment_ID," // 1..3 + StringBuilder sql = new StringBuilder("SELECT p.DateTrx,p.DocumentNo,p.C_Payment_ID," // 1..3 + "c.ISO_Code,p.PayAmt," // 4..5 + "currencyConvert(p.PayAmt,p.C_Currency_ID,?,?,p.C_ConversionType_ID,p.AD_Client_ID,p.AD_Org_ID),"// 6 #1, #2 + "currencyConvert(paymentAvailable(C_Payment_ID),p.C_Currency_ID,?,?,p.C_ConversionType_ID,p.AD_Client_ID,p.AD_Org_ID)," // 7 #3, #4 @@ -135,7 +135,7 @@ public class Allocation sql.append(" ORDER BY p.DateTrx,p.DocumentNo"); // role security - sql = new StringBuffer( MRole.getDefault(Env.getCtx(), false).addAccessSQL( sql.toString(), "p", MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO ) ); + sql = new StringBuilder( MRole.getDefault(Env.getCtx(), false).addAccessSQL( sql.toString(), "p", MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO ) ); log.fine("PaySQL=" + sql.toString()); try @@ -245,7 +245,7 @@ public class Allocation WHERE -- i.IsPaid='N' AND i.Processed='Y' AND i.C_BPartner_ID=1000001 */ Vector> data = new Vector>(); - StringBuffer sql = new StringBuffer("SELECT i.DateInvoiced,i.DocumentNo,i.C_Invoice_ID," // 1..3 + StringBuilder sql = new StringBuilder("SELECT i.DateInvoiced,i.DocumentNo,i.C_Invoice_ID," // 1..3 + "c.ISO_Code,i.GrandTotal*i.MultiplierAP, " // 4..5 Orig Currency + "currencyConvert(i.GrandTotal*i.MultiplierAP,i.C_Currency_ID,?,?,i.C_ConversionType_ID,i.AD_Client_ID,i.AD_Org_ID), " // 6 #1 Converted, #2 Date + "currencyConvert(invoiceOpen(C_Invoice_ID,C_InvoicePaySchedule_ID),i.C_Currency_ID,?,?,i.C_ConversionType_ID,i.AD_Client_ID,i.AD_Org_ID)*i.MultiplierAP, " // 7 #3, #4 Converted Open @@ -264,7 +264,7 @@ public class Allocation log.fine("InvSQL=" + sql.toString()); // role security - sql = new StringBuffer( MRole.getDefault(Env.getCtx(), false).addAccessSQL( sql.toString(), "i", MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO ) ); + sql = new StringBuilder( MRole.getDefault(Env.getCtx(), false).addAccessSQL( sql.toString(), "i", MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO ) ); try { diff --git a/org.adempiere.ui/src/org/compiere/apps/form/Archive.java b/org.adempiere.ui/src/org/compiere/apps/form/Archive.java index 5c0300489f..e9443081b0 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/Archive.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/Archive.java @@ -110,7 +110,7 @@ public class Archive { String name, String description, String help, KeyNamePair createdBy, Timestamp createdFrom, Timestamp createdTo) { - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); MRole role = MRole.getDefault(); if (!role.isCanReport()) { diff --git a/org.adempiere.ui/src/org/compiere/apps/form/FactReconcile.java b/org.adempiere.ui/src/org/compiere/apps/form/FactReconcile.java index 036c4d55df..6c53bcd78e 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/FactReconcile.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/FactReconcile.java @@ -74,7 +74,7 @@ public class FactReconcile { Vector> data = new Vector>(); - StringBuffer sql = new StringBuffer("SELECT abs(fa.amtacctdr-fa.amtacctcr), (fa.amtacctdr-fa.amtacctcr)," // 1-2 + StringBuilder sql = new StringBuilder("SELECT abs(fa.amtacctdr-fa.amtacctcr), (fa.amtacctdr-fa.amtacctcr)," // 1-2 + " (CASE WHEN (fa.amtacctdr-fa.amtacctcr) < 0 THEN 'CR' ELSE 'DR' END), fa.Fact_Acct_ID, bp.name, DateAcct," + " glc.name, p.name, Qty, fa.Description, r.MatchCode, fa.DateTrx, o.value" + " FROM Fact_Acct fa" @@ -86,7 +86,7 @@ public class FactReconcile { + " WHERE fa.AD_Client_ID=?"); // role security - sql = new StringBuffer( MRole.getDefault(Env.getCtx(), false).addAccessSQL( sql.toString(), "fa", MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO ) ); + sql = new StringBuilder( MRole.getDefault(Env.getCtx(), false).addAccessSQL( sql.toString(), "fa", MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO ) ); // Parameter if(m_AD_Org_ID>0) diff --git a/org.adempiere.ui/src/org/compiere/apps/form/InOutGen.java b/org.adempiere.ui/src/org/compiere/apps/form/InOutGen.java index 480b2c8d12..b5a747eae9 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/InOutGen.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/InOutGen.java @@ -91,7 +91,7 @@ public class InOutGen extends GenForm private String getOrderSQL() { // Create SQL - StringBuffer sql = new StringBuffer( + StringBuilder sql = new StringBuilder( "SELECT C_Order_ID, o.Name, dt.Name, DocumentNo, bp.Name, DateOrdered, TotalLines " + "FROM M_InOut_Candidate_v ic, AD_Org o, C_BPartner bp, C_DocType dt " + "WHERE ic.AD_Org_ID=o.AD_Org_ID" @@ -128,7 +128,7 @@ public class InOutGen extends GenForm */ private String getRMASql() { - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); sql.append("SELECT rma.M_RMA_ID, org.Name, dt.Name, rma.DocumentNo, bp.Name, rma.Created, rma.Amt "); sql.append("FROM M_RMA rma INNER JOIN AD_Org org ON rma.AD_Org_ID=org.AD_Org_ID "); @@ -280,7 +280,7 @@ public class InOutGen extends GenForm } //insert selection - StringBuffer insert = new StringBuffer(); + StringBuilder insert = new StringBuilder(); insert.append("INSERT INTO T_SELECTION(AD_PINSTANCE_ID, T_SELECTION_ID) "); int counter = 0; for(Integer selectedId : getSelection()) @@ -304,7 +304,7 @@ public class InOutGen extends GenForm trx.rollback(); return info; } - insert = new StringBuffer(); + insert = new StringBuilder(); insert.append("INSERT INTO T_SELECTION(AD_PINSTANCE_ID, T_SELECTION_ID) "); counter = 0; } diff --git a/org.adempiere.ui/src/org/compiere/apps/form/InvoiceGen.java b/org.adempiere.ui/src/org/compiere/apps/form/InvoiceGen.java index f5504e043e..575ad925c9 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/InvoiceGen.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/InvoiceGen.java @@ -89,7 +89,7 @@ public class InvoiceGen extends GenForm */ private String getOrderSQL() { - StringBuffer sql = new StringBuffer( + StringBuilder sql = new StringBuilder( "SELECT C_Order_ID, o.Name, dt.Name, DocumentNo, bp.Name, DateOrdered, TotalLines " + "FROM C_Invoice_Candidate_v ic, AD_Org o, C_BPartner bp, C_DocType dt " + "WHERE ic.AD_Org_ID=o.AD_Org_ID" @@ -126,7 +126,7 @@ public class InvoiceGen extends GenForm */ private String getRMASql() { - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); sql.append("SELECT rma.M_RMA_ID, org.Name, dt.Name, rma.DocumentNo, bp.Name, rma.Created, rma.Amt "); sql.append("FROM M_RMA rma INNER JOIN AD_Org org ON rma.AD_Org_ID=org.AD_Org_ID "); sql.append("INNER JOIN C_DocType dt ON rma.C_DocType_ID=dt.C_DocType_ID "); @@ -278,7 +278,7 @@ public class InvoiceGen extends GenForm } //insert selection - StringBuffer insert = new StringBuffer(); + StringBuilder insert = new StringBuilder(); insert.append("INSERT INTO T_SELECTION(AD_PINSTANCE_ID, T_SELECTION_ID) "); int counter = 0; for(Integer selectedId : getSelection()) @@ -302,7 +302,7 @@ public class InvoiceGen extends GenForm trx.rollback(); return info; } - insert = new StringBuffer(); + insert = new StringBuilder(); insert.append("INSERT INTO T_SELECTION(AD_PINSTANCE_ID, T_SELECTION_ID) "); counter = 0; } diff --git a/org.adempiere.ui/src/org/compiere/apps/form/PaySelect.java b/org.adempiere.ui/src/org/compiere/apps/form/PaySelect.java index 283173f8ac..decfd50016 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/PaySelect.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/PaySelect.java @@ -366,7 +366,7 @@ public class PaySelect // Information BigDecimal remaining = m_bankBalance.subtract(invoiceAmt); - StringBuffer info = new StringBuffer(); + StringBuilder info = new StringBuilder(); info.append(m_noSelected).append(" ").append(Msg.getMsg(Env.getCtx(), "Selected")).append(" - "); info.append(m_format.format(invoiceAmt)).append(", "); info.append(Msg.getMsg(Env.getCtx(), "Remaining")).append(" ").append(m_format.format(remaining)); diff --git a/org.adempiere.ui/src/org/compiere/apps/form/TreeBOM.java b/org.adempiere.ui/src/org/compiere/apps/form/TreeBOM.java index 15d4bd8962..2f2234011c 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/TreeBOM.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/TreeBOM.java @@ -49,7 +49,7 @@ public class TreeBOM { String value = product.getValue(); String name = product.get_Translation(MProduct.COLUMNNAME_Name); // - StringBuffer sb = new StringBuffer(value); + StringBuilder sb = new StringBuilder(value); if (name != null && !value.equals(name)) sb.append("_").append(product.getName()); sb.append(" [").append(uom.get_Translation(MUOM.COLUMNNAME_UOMSymbol)).append("]"); @@ -66,7 +66,7 @@ public class TreeBOM { String value = bom.getValue(); String name = bom.get_Translation(MPPProductBOM.COLUMNNAME_Name); // - StringBuffer sb = new StringBuffer(value); + StringBuilder sb = new StringBuilder(value); if (name != null && !name.equals(value)) sb.append("_").append(name); // diff --git a/org.adempiere.ui/src/org/compiere/grid/CreateFrom.java b/org.adempiere.ui/src/org/compiere/grid/CreateFrom.java index bfd18fa80a..3628241f0f 100644 --- a/org.adempiere.ui/src/org/compiere/grid/CreateFrom.java +++ b/org.adempiere.ui/src/org/compiere/grid/CreateFrom.java @@ -153,7 +153,7 @@ public abstract class CreateFrom implements ICreateFrom p_order = new MOrder (Env.getCtx(), C_Order_ID, null); Vector> data = new Vector>(); - StringBuffer sql = new StringBuffer("SELECT " + StringBuilder sql = new StringBuilder("SELECT " + "l.QtyOrdered-SUM(COALESCE(m.Qty,0))," // 1 + "CASE WHEN l.QtyOrdered=0 THEN 0 ELSE l.QtyEntered/l.QtyOrdered END," // 2 + " l.C_UOM_ID,COALESCE(uom.UOMSymbol,uom.Name)," // 3..4 diff --git a/org.adempiere.ui/src/org/compiere/grid/CreateFromInvoice.java b/org.adempiere.ui/src/org/compiere/grid/CreateFromInvoice.java index d459db8ec1..6a534ea81b 100644 --- a/org.adempiere.ui/src/org/compiere/grid/CreateFromInvoice.java +++ b/org.adempiere.ui/src/org/compiere/grid/CreateFromInvoice.java @@ -177,7 +177,7 @@ public abstract class CreateFromInvoice extends CreateFrom // Vector> data = new Vector>(); - StringBuffer sql = new StringBuffer("SELECT " // QtyEntered + StringBuilder sql = new StringBuilder("SELECT " // QtyEntered + "l.MovementQty-SUM(NVL(mi.Qty, 0)), l.QtyEntered/l.MovementQty," + " l.C_UOM_ID, COALESCE(uom.UOMSymbol, uom.Name)," // 3..4 + " l.M_Product_ID, p.Name, po.VendorProductNo, l.M_InOutLine_ID, l.Line," // 5..9 @@ -251,7 +251,7 @@ public abstract class CreateFromInvoice extends CreateFrom // MRMA m_rma = new MRMA(Env.getCtx(), M_RMA_ID, null); Vector> data = new Vector>(); - StringBuffer sqlStmt = new StringBuffer(); + StringBuilder sqlStmt = new StringBuilder(); sqlStmt.append("SELECT rl.M_RMALine_ID, rl.line, rl.Qty - COALESCE(rl.QtyInvoiced, 0), iol.M_Product_ID, p.Name, uom.C_UOM_ID, COALESCE(uom.UOMSymbol,uom.Name) "); sqlStmt.append("FROM M_RMALine rl INNER JOIN M_InOutLine iol ON rl.M_InOutLine_ID=iol.M_InOutLine_ID "); diff --git a/org.adempiere.ui/src/org/compiere/grid/CreateFromRMA.java b/org.adempiere.ui/src/org/compiere/grid/CreateFromRMA.java index 685ced8ffd..12102648bd 100644 --- a/org.adempiere.ui/src/org/compiere/grid/CreateFromRMA.java +++ b/org.adempiere.ui/src/org/compiere/grid/CreateFromRMA.java @@ -67,7 +67,7 @@ public abstract class CreateFromRMA extends CreateFrom { * 5 Movement Qty * 6 ASI */ - StringBuffer sqlStmt = new StringBuffer(); + StringBuilder sqlStmt = new StringBuilder(); sqlStmt.append("SELECT iol.M_InOutLine_ID, iol.Line, "); sqlStmt.append("CASE WHEN iol.M_Product_ID IS NOT NULL THEN (Select p.Name from M_Product p where p.M_Product_ID = iol.M_Product_ID) END as ProductName, "); diff --git a/org.adempiere.ui/src/org/compiere/grid/CreateFromShipment.java b/org.adempiere.ui/src/org/compiere/grid/CreateFromShipment.java index 08d4c5cdfc..d250cb0eb9 100644 --- a/org.adempiere.ui/src/org/compiere/grid/CreateFromShipment.java +++ b/org.adempiere.ui/src/org/compiere/grid/CreateFromShipment.java @@ -189,7 +189,7 @@ public abstract class CreateFromShipment extends CreateFrom p_order = new MOrder (Env.getCtx(), C_Order_ID, null); // save Vector> data = new Vector>(); - StringBuffer sql = new StringBuffer("SELECT " + StringBuilder sql = new StringBuilder("SELECT " + "l.QtyOrdered-SUM(COALESCE(m.Qty,0))," // 1 + "CASE WHEN l.QtyOrdered=0 THEN 0 ELSE l.QtyEntered/l.QtyOrdered END," // 2 + " l.C_UOM_ID,COALESCE(uom.UOMSymbol,uom.Name)," // 3..4 @@ -272,7 +272,7 @@ public abstract class CreateFromShipment extends CreateFrom m_rma = new MRMA(Env.getCtx(), M_RMA_ID, null); Vector> data = new Vector>(); - StringBuffer sqlStmt = new StringBuffer(); + StringBuilder sqlStmt = new StringBuilder(); sqlStmt.append("SELECT rl.M_RMALine_ID, rl.line, rl.Qty - rl.QtyDelivered, iol.M_Product_ID, p.Name, uom.C_UOM_ID, COALESCE(uom.UOMSymbol,uom.Name) "); sqlStmt.append("FROM M_RMALine rl INNER JOIN M_InOutLine iol ON rl.M_InOutLine_ID=iol.M_InOutLine_ID "); @@ -356,7 +356,7 @@ public abstract class CreateFromShipment extends CreateFrom m_rma = null; Vector> data = new Vector>(); - StringBuffer sql = new StringBuffer("SELECT " // Entered UOM + StringBuilder sql = new StringBuilder("SELECT " // Entered UOM + "l.QtyInvoiced-SUM(NVL(mi.Qty,0)),l.QtyEntered/l.QtyInvoiced," + " l.C_UOM_ID,COALESCE(uom.UOMSymbol,uom.Name)," // 3..4 + " p.M_Locator_ID, loc.Value, " // 5..6 diff --git a/org.adempiere.ui/src/org/compiere/grid/CreateFromStatement.java b/org.adempiere.ui/src/org/compiere/grid/CreateFromStatement.java index 0bdb9184a9..00a61ee1fe 100644 --- a/org.adempiere.ui/src/org/compiere/grid/CreateFromStatement.java +++ b/org.adempiere.ui/src/org/compiere/grid/CreateFromStatement.java @@ -77,7 +77,7 @@ public abstract class CreateFromStatement extends CreateFrom public String getSQLWhere(String DocumentNo, Object BPartner, Object DateFrom, Object DateTo, Object AmtFrom, Object AmtTo, Object DocType, Object TenderType, String AuthCode) { - StringBuffer sql = new StringBuffer("WHERE p.Processed='Y' AND p.IsReconciled='N'" + StringBuilder sql = new StringBuilder("WHERE p.Processed='Y' AND p.IsReconciled='N'" + " AND p.DocStatus IN ('CO','CL','RE','VO') AND p.PayAmt<>0" + " AND p.C_BankAccount_ID = ?"); diff --git a/org.adempiere.ui/src/org/compiere/grid/ed/CityVO.java b/org.adempiere.ui/src/org/compiere/grid/ed/CityVO.java index af87a137b0..202b21e5c9 100644 --- a/org.adempiere.ui/src/org/compiere/grid/ed/CityVO.java +++ b/org.adempiere.ui/src/org/compiere/grid/ed/CityVO.java @@ -69,7 +69,7 @@ public class CityVO @Override public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); if (this.CityName != null) { sb.append(this.CityName); diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/AdvertisementServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/AdvertisementServlet.java index b0cbd8b696..3eff71b580 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/AdvertisementServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/AdvertisementServlet.java @@ -136,7 +136,7 @@ public class AdvertisementServlet extends HttpServlet WebUtil.createForwardPage(response, "Web Advertisement Not Found", "advertisements.jsp", 0); return; } - StringBuffer info = new StringBuffer(); + StringBuilder info = new StringBuilder(); // String Name = WebUtil.getParameter (request, "Name"); if (Name != null && Name.length() > 0 && !Name.equals(ad.getName())) diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/IssueReportServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/IssueReportServlet.java index 08c14eb1b7..2d6763ae78 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/IssueReportServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/IssueReportServlet.java @@ -134,7 +134,7 @@ public class IssueReportServlet extends HttpServlet } // - StringBuffer answer = new StringBuffer(); + StringBuilder answer = new StringBuilder(); if (issue != null && issue.get_ID() != 0) { answer.append("RECORDID=").append(issue.get_ID()) diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/OrderServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/OrderServlet.java index 0ddf44ce26..bd34cf92ab 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/OrderServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/OrderServlet.java @@ -315,7 +315,7 @@ public class OrderServlet extends HttpServlet */ private void sendEMail (HttpServletRequest request, Properties ctx, WebOrder wo, WebUser wu) { - StringBuffer message = new StringBuffer("\n"); + StringBuilder message = new StringBuilder("\n"); // MOrder mo = wo.getOrder(); if (mo != null) diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/PaymentServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/PaymentServlet.java index 989e12f90c..137e5b6c0b 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/PaymentServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/PaymentServlet.java @@ -308,7 +308,7 @@ public class PaymentServlet extends HttpServlet */ private boolean processParameter (HttpServletRequest request, Properties ctx, MPayment p, WebUser wu) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); p.setTenderType(MPayment.TENDERTYPE_CreditCard); p.setTrxType(MPayment.TRXTYPE_Sales); p.setA_EMail(wu.getEmail()); diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/PriceList.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/PriceList.java index ee145b2611..73e929d6b4 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/PriceList.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/PriceList.java @@ -338,7 +338,7 @@ public class PriceList */ public String toString() { - StringBuffer sb = new StringBuffer("PriceList["); + StringBuilder sb = new StringBuilder("PriceList["); sb.append(m_prices.size()) .append("]"); return sb.toString(); diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/PriceListProduct.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/PriceListProduct.java index 08c0c67e96..285e576b18 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/PriceListProduct.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/PriceListProduct.java @@ -88,7 +88,7 @@ public class PriceListProduct */ public String toString() { - StringBuffer sb = new StringBuffer("PriceListProduct["); + StringBuilder sb = new StringBuilder("PriceListProduct["); sb.append(m_Product_ID).append("-").append(m_name) .append("-").append(m_price) .append("]"); diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/RequestServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/RequestServlet.java index dda068407c..1edaefb67a 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/RequestServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/RequestServlet.java @@ -287,7 +287,7 @@ public class RequestServlet extends HttpServlet if (IsConfidential) req.setConfidentialType(MRequest.CONFIDENTIALTYPE_PartnerConfidential); // - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("From:").append(request.getRemoteHost()) .append("-").append(request.getRemoteAddr()); sb.append(", Request:").append(requestURL).append("-").append(requestRef); diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/WebBasket.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/WebBasket.java index 5c1c9c68b0..df9d5f2b48 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/WebBasket.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/WebBasket.java @@ -57,7 +57,7 @@ public class WebBasket */ public String toString() { - StringBuffer sb = new StringBuffer("WebBasket[Lines="); + StringBuilder sb = new StringBuilder("WebBasket[Lines="); sb.append(m_lines.size()).append(",Total=").append(m_total) .append(",M_PriceList_ID=" + m_PriceList_ID) .append("]"); diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/WebBasketLine.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/WebBasketLine.java index b360973309..251f4c199c 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/WebBasketLine.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/WebBasketLine.java @@ -56,7 +56,7 @@ public class WebBasketLine */ public String toStringX() { - StringBuffer sb = new StringBuffer("WebBasketLine["); + StringBuilder sb = new StringBuilder("WebBasketLine["); sb.append(m_line).append("-M_Product_ID=") .append(m_M_Product_ID) .append(",Qty=").append(m_Quantity).append(",Price=").append(m_Price) .append(",Total=").append(getTotal()) @@ -70,7 +70,7 @@ public class WebBasketLine */ public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(m_Quantity).append(" * ").append(m_Name) .append(" = ").append(getTotal()); return sb.toString(); diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/WebOrder.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/WebOrder.java index 103ab79dc6..ad4346a2b4 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/WebOrder.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/WebOrder.java @@ -136,7 +136,7 @@ public class WebOrder */ public String toString() { - StringBuffer sb = new StringBuffer("WebOrder["); + StringBuilder sb = new StringBuilder("WebOrder["); sb.append(m_order) .append("]"); return sb.toString(); diff --git a/org.compiere.db.oracle.provider/src/org/adempiere/db/oracle/config/ConfigOracle.java b/org.compiere.db.oracle.provider/src/org/adempiere/db/oracle/config/ConfigOracle.java index 80d0bc9b49..91e3be2ff1 100644 --- a/org.compiere.db.oracle.provider/src/org/adempiere/db/oracle/config/ConfigOracle.java +++ b/org.compiere.db.oracle.provider/src/org/adempiere/db/oracle/config/ConfigOracle.java @@ -480,8 +480,8 @@ public class ConfigOracle implements IDatabaseConfig */ private boolean testSQL (String sqlplus) { - StringBuffer sbOut = new StringBuffer(); - StringBuffer sbErr = new StringBuffer(); + StringBuilder sbOut = new StringBuilder(); + StringBuilder sbErr = new StringBuilder(); int result = -1; try { diff --git a/org.compiere.db.postgresql.provider/src/org/compiere/db/DB_PostgreSQL.java b/org.compiere.db.postgresql.provider/src/org/compiere/db/DB_PostgreSQL.java index 6bb072ccb0..f8f54ae402 100755 --- a/org.compiere.db.postgresql.provider/src/org/compiere/db/DB_PostgreSQL.java +++ b/org.compiere.db.postgresql.provider/src/org/compiere/db/DB_PostgreSQL.java @@ -266,11 +266,11 @@ public class DB_PostgreSQL implements AdempiereDatabase */ public String toString() { - StringBuffer sb = new StringBuffer("DB_PostgreSQL["); + StringBuilder sb = new StringBuilder("DB_PostgreSQL["); sb.append(m_connectionURL); try { - StringBuffer logBuffer = new StringBuffer(50); + StringBuilder logBuffer = new StringBuilder(50); logBuffer.append("# Connections: ").append(m_ds.getNumConnections()); logBuffer.append(" , # Busy Connections: ").append(m_ds.getNumBusyConnections()); logBuffer.append(" , # Idle Connections: ").append(m_ds.getNumIdleConnections()); @@ -295,7 +295,7 @@ public class DB_PostgreSQL implements AdempiereDatabase return null; } - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); try { sb.append("# Connections: ").append(m_ds.getNumConnections()); @@ -398,7 +398,7 @@ public class DB_PostgreSQL implements AdempiereDatabase return "current_date()"; } - StringBuffer dateString = new StringBuffer("TO_DATE('"); + StringBuilder dateString = new StringBuilder("TO_DATE('"); // YYYY-MM-DD HH24:MI:SS.mmmm JDBC Timestamp format String myDate = time.toString(); if (dayOnly) @@ -429,7 +429,7 @@ public class DB_PostgreSQL implements AdempiereDatabase **/ public String TO_CHAR (String columnName, int displayType, String AD_Language) { - StringBuffer retValue = new StringBuffer("CAST ("); + StringBuilder retValue = new StringBuilder("CAST ("); retValue.append(columnName); retValue.append(" AS Text)"); @@ -986,7 +986,7 @@ public class DB_PostgreSQL implements AdempiereDatabase String[] keyColumns = po.get_KeyColumns(); if (keyColumns != null && keyColumns.length > 0 && !po.is_new()) { - StringBuffer sqlBuffer = new StringBuffer(" SELECT "); + StringBuilder sqlBuffer = new StringBuilder(" SELECT "); sqlBuffer.append(keyColumns[0]) .append(" FROM ") .append(po.get_TableName()) diff --git a/org.compiere.db.postgresql.provider/src/org/compiere/dbPort/Convert_PostgreSQL.java b/org.compiere.db.postgresql.provider/src/org/compiere/dbPort/Convert_PostgreSQL.java index e7c084fc69..c99ae6eed7 100644 --- a/org.compiere.db.postgresql.provider/src/org/compiere/dbPort/Convert_PostgreSQL.java +++ b/org.compiere.db.postgresql.provider/src/org/compiere/dbPort/Convert_PostgreSQL.java @@ -124,7 +124,7 @@ public class Convert_PostgreSQL extends Convert_SQL92 { @Override protected String escapeQuotedString(String in) { - StringBuffer out = new StringBuffer(); + StringBuilder out = new StringBuilder(); boolean escape = false; int size = in.length(); for(int i = 0; i < size; i++) { @@ -160,7 +160,7 @@ public class Convert_PostgreSQL extends Convert_SQL92 { */ protected String convertComplexStatement(String sqlStatement) { String retValue = sqlStatement; - StringBuffer sb = null; + StringBuilder sb = null; // Convert all decode parts int found = retValue.toUpperCase().indexOf("DECODE"); @@ -380,7 +380,7 @@ public class Convert_PostgreSQL extends Convert_SQL92 { String targetAlias = null; String sqlUpper = sqlStatement.toUpperCase(); - StringBuffer token = new StringBuffer(); + StringBuilder token = new StringBuilder(); String previousToken = null; int charIndex = 0; int sqlLength = sqlUpper.length(); @@ -406,7 +406,7 @@ public class Convert_PostgreSQL extends Convert_SQL92 { targetAlias = targetTable; } previousToken = token.toString(); - token = new StringBuffer(); + token = new StringBuilder(); } } else @@ -428,7 +428,7 @@ public class Convert_PostgreSQL extends Convert_SQL92 { //get the sub query String beforePreviousToken = null; previousToken = null; - token = new StringBuffer(); + token = new StringBuilder(); while (charIndex < sqlLength) { char c = sqlUpper.charAt(charIndex); @@ -490,7 +490,7 @@ public class Convert_PostgreSQL extends Convert_SQL92 { } beforePreviousToken = previousToken; previousToken = token.toString(); - token = new StringBuffer(); + token = new StringBuilder(); } } else{ @@ -522,7 +522,7 @@ public class Convert_PostgreSQL extends Convert_SQL92 { String mainWhere = ""; String otherUpdateFields = ""; //get update where clause - token = new StringBuffer(); + token = new StringBuilder(); for(int i = subQueryEnd; i < select.length(); i++) { char c = select.charAt(i); @@ -536,7 +536,7 @@ public class Convert_PostgreSQL extends Convert_SQL92 { mainWhere = select.substring(i + 1); break; } - token = new StringBuffer(); + token = new StringBuilder(); } } else @@ -550,7 +550,7 @@ public class Convert_PostgreSQL extends Convert_SQL92 { //get join table and alias String joinTable = null; String joinAlias = null; - token = new StringBuffer(); + token = new StringBuilder(); previousToken = null; int joinFieldsBegin = 0; String joinFields = null; @@ -584,7 +584,7 @@ public class Convert_PostgreSQL extends Convert_SQL92 { joinAlias = token.toString(); } previousToken = token.toString(); - token = new StringBuffer(); + token = new StringBuilder(); } } else @@ -607,7 +607,7 @@ public class Convert_PostgreSQL extends Convert_SQL92 { if (joinAlias == null) joinAlias = joinTable; //construct update clause - StringBuffer Update = new StringBuffer("UPDATE "); + StringBuilder Update = new StringBuilder("UPDATE "); Update.append(targetTable); if (!targetAlias.equals(targetTable)) Update.append(" " + targetAlias); @@ -721,7 +721,7 @@ public class Convert_PostgreSQL extends Convert_SQL92 { { String fieldsUpper = fields.toUpperCase(); int size = fieldsUpper.length(); - StringBuffer buffer = new StringBuffer(); + StringBuilder buffer = new StringBuilder(); String token = null; for (int i = 0; i < size; i++) { @@ -731,7 +731,7 @@ public class Convert_PostgreSQL extends Convert_SQL92 { if (buffer.length() > 0) { token = buffer.toString(); - buffer = new StringBuffer(); + buffer = new StringBuilder(); } } else @@ -741,7 +741,7 @@ public class Convert_PostgreSQL extends Convert_SQL92 { if (buffer.length() > 0) { token = buffer.toString(); - buffer = new StringBuffer(); + buffer = new StringBuilder(); } else { @@ -791,7 +791,7 @@ public class Convert_PostgreSQL extends Convert_SQL92 { else { result = result + " "; - StringBuffer t = new StringBuffer(); + StringBuilder t = new StringBuilder(); for (int i = 0; i < token.length(); i++) { char c = token.charAt(i); if(isOperator(c)) @@ -805,7 +805,7 @@ public class Convert_PostgreSQL extends Convert_SQL92 { result = result + alias + "." + t.toString(); else result = result + t.toString(); - t = new StringBuffer(); + t = new StringBuilder(); } result = result + c; } diff --git a/org.compiere.db.postgresql.provider/src/org/compiere/dbPort/Convert_PostgreSQLTest.java b/org.compiere.db.postgresql.provider/src/org/compiere/dbPort/Convert_PostgreSQLTest.java index 42722a7806..975c8f73dc 100644 --- a/org.compiere.db.postgresql.provider/src/org/compiere/dbPort/Convert_PostgreSQLTest.java +++ b/org.compiere.db.postgresql.provider/src/org/compiere/dbPort/Convert_PostgreSQLTest.java @@ -446,8 +446,8 @@ public final class Convert_PostgreSQLTest extends TestCase{ {"cast(NULL as number(10))","cast(NULL as NUMERIC)"}, }; String sql_end = " FROM AD_Table tbl"; - StringBuffer sql = new StringBuffer(sql_begin); - StringBuffer sqle = new StringBuffer(sql_begin); + StringBuilder sql = new StringBuilder(sql_begin); + StringBuilder sqle = new StringBuilder(sql_begin); for (int i = 0; i < sql_tests.length; i++) { if (i > 0) { sql.append(","); diff --git a/org.compiere.db.postgresql.provider/src/org/compiere/dbPort/PostgresConvertTest.java b/org.compiere.db.postgresql.provider/src/org/compiere/dbPort/PostgresConvertTest.java index af0bea3a2f..b13590ea4b 100755 --- a/org.compiere.db.postgresql.provider/src/org/compiere/dbPort/PostgresConvertTest.java +++ b/org.compiere.db.postgresql.provider/src/org/compiere/dbPort/PostgresConvertTest.java @@ -67,7 +67,7 @@ public class PostgresConvertTest System.exit(1); log.info("start test"); - StringBuffer sql = new StringBuffer ( + StringBuilder sql = new StringBuilder ( "SELECT 'un DATE en una constante'," + " 'ropa de cache para damas' FROM DUAL"); try @@ -129,13 +129,13 @@ public class PostgresConvertTest int no = DB.executeUpdate(sql.toString(), getTrxName()); log.fine("M_Product_PO - Updated=" + no); */ - sql = new StringBuffer ("UPDATE I_Order SET M_Warehouse_ID=(SELECT M_Warehouse_ID FROM M_Warehouse w WHERE ROWNUM=1 AND I_Order.AD_Client_ID=w.AD_Client_ID AND I_Order.AD_Org_ID=w.AD_Org_ID) WHERE M_Warehouse_ID IS NULL AND I_IsImported<>'Y' AND AD_Client_ID=11"); + sql = new StringBuilder ("UPDATE I_Order SET M_Warehouse_ID=(SELECT M_Warehouse_ID FROM M_Warehouse w WHERE ROWNUM=1 AND I_Order.AD_Client_ID=w.AD_Client_ID AND I_Order.AD_Org_ID=w.AD_Org_ID) WHERE M_Warehouse_ID IS NULL AND I_IsImported<>'Y' AND AD_Client_ID=11"); int no = DB.executeUpdate(sql.toString(), getTrxName()); /*sql = new StringBuffer ("UPDATE I_Order o SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Org, ' WHERE (AD_Org_ID IS NULL OR AD_Org_ID=0 OR EXISTS (SELECT * FROM AD_Org oo WHERE o.AD_Org_ID=oo.AD_Org_ID AND (oo.IsSummary='Y' OR oo.IsActive='N'))) AND I_IsImported<>'Y'"); no = DB.executeUpdate(sql.toString(), getTrxName()); sql = new StringBuffer ("UPDATE I_Order o SET C_DocType_ID=(SELECT C_DocType_ID FROM C_DocType d WHERE d.Name=o.DocTypeName AND d.DocBaseType='POO' AND o.AD_Client_ID=d.AD_Client_ID) WHERE C_DocType_ID IS NULL AND IsSOTrx='N' AND DocTypeName IS NOT NULL AND I_IsImported<>'Y'"); no = DB.executeUpdate(sql.toString(), getTrxName());*/ - sql = new StringBuffer ("UPDATE I_Order o SET (C_BPartner_ID,AD_User_ID)=(SELECT C_BPartner_ID,AD_User_ID FROM AD_User u WHERE o.ContactName=u.Name AND o.AD_Client_ID=u.AD_Client_ID AND u.C_BPartner_ID IS NOT NULL) WHERE C_BPartner_ID IS NULL AND ContactName IS NOT NULL AND EXISTS (SELECT Name FROM AD_User u WHERE o.ContactName=u.Name AND o.AD_Client_ID=u.AD_Client_ID AND u.C_BPartner_ID IS NOT NULL GROUP BY Name HAVING COUNT(*)=1) AND I_IsImported<>'Y' AND AD_Client_ID=11"); + sql = new StringBuilder ("UPDATE I_Order o SET (C_BPartner_ID,AD_User_ID)=(SELECT C_BPartner_ID,AD_User_ID FROM AD_User u WHERE o.ContactName=u.Name AND o.AD_Client_ID=u.AD_Client_ID AND u.C_BPartner_ID IS NOT NULL) WHERE C_BPartner_ID IS NULL AND ContactName IS NOT NULL AND EXISTS (SELECT Name FROM AD_User u WHERE o.ContactName=u.Name AND o.AD_Client_ID=u.AD_Client_ID AND u.C_BPartner_ID IS NOT NULL GROUP BY Name HAVING COUNT(*)=1) AND I_IsImported<>'Y' AND AD_Client_ID=11"); no = DB.executeUpdate(sql.toString(), getTrxName()); diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADDataStatusListener.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADDataStatusListener.java index a96ae189dd..7e66ec8dc8 100644 --- a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADDataStatusListener.java +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADDataStatusListener.java @@ -41,7 +41,7 @@ public class ADDataStatusListener implements DataStatusListener { // Set Message / Info if (e.getAD_Message() != null || e.getInfo() != null) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); String msg = e.getMessage(); if (msg != null && msg.length() > 0) sb.append(Msg.getMsg(m_ctx, e.getAD_Message())); diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADServiceImpl.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADServiceImpl.java index cb2c3ddc8f..44851c9fb3 100644 --- a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADServiceImpl.java +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADServiceImpl.java @@ -1318,8 +1318,8 @@ public class ADServiceImpl implements ADService { tree.trimTree(); // Print tree - StringBuffer buf = new StringBuffer(); - StringBuffer barbuf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); + StringBuilder barbuf = new StringBuilder(); en = root.preorderEnumeration(); int oldLevel = 0; while (en.hasMoreElements()) diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/InfoBPartner.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/InfoBPartner.java index 8f9635650d..64b65939c4 100644 --- a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/InfoBPartner.java +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/InfoBPartner.java @@ -28,7 +28,7 @@ public class InfoBPartner implements ADInfo { params = dr; m_isSOTrx = true; // TODO - StringBuffer where = new StringBuffer(); + StringBuilder where = new StringBuilder(); where.append("C_BPartner.IsSummary='N' AND C_BPartner.IsActive='Y'"); if (whereClause != null && whereClause.length() > 0) where.append(" AND ").append(whereClause); @@ -94,7 +94,7 @@ public class InfoBPartner implements ADInfo { if (!(postal.equals("") || postal.equals("%"))) list.add ("UPPER(a.Postal) LIKE ?"); - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); int size = list.size(); // Just one if (size == 1) @@ -197,7 +197,7 @@ public class InfoBPartner implements ADInfo { protected void prepareTable ( String from, String staticWhere, String orderBy) { - StringBuffer sql = new StringBuffer ("SELECT "); + StringBuilder sql = new StringBuilder ("SELECT "); // add columns & sql sql.append( " C_BPartner.C_BPartner_ID, C_BPartner.Value, C_BPartner.Name, c.Name AS Contact, " ); sql.append( " C_BPartner.SO_CreditLimit-C_BPartner.SO_CreditUsed AS SO_CreditAvailable, "); @@ -284,7 +284,7 @@ public class InfoBPartner implements ADInfo { public String getSQL() { String dynWhere = getSQLWhere(); - StringBuffer sql = new StringBuffer (m_sqlMain); + StringBuilder sql = new StringBuilder (m_sqlMain); if (dynWhere.length() > 0) sql.append(dynWhere); // includes first AND sql.append(m_sqlOrder); @@ -297,7 +297,7 @@ public class InfoBPartner implements ADInfo { public String getSQLCount() { String dynWhere = getSQLWhere(); - StringBuffer sql = new StringBuffer (m_sqlCount); + StringBuilder sql = new StringBuilder (m_sqlCount); if (dynWhere.length() > 0) sql.append(dynWhere); // includes first AND String countSql = Msg.parseTranslation(Env.getCtx(), sql.toString()); // Variables diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/InfoProduct.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/InfoProduct.java index 14de8166f8..19e2c9d583 100644 --- a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/InfoProduct.java +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/InfoProduct.java @@ -68,7 +68,7 @@ public class InfoProduct implements ADInfo { // setPriceListVersion (M_PriceList_Version_ID); // Create Grid - StringBuffer where = new StringBuffer(); + StringBuilder where = new StringBuilder(); where.append("p.IsActive='Y'"); if (M_Warehouse_ID != 0) where.append(" AND p.IsSummary='N'"); @@ -114,7 +114,7 @@ public class InfoProduct implements ADInfo { int M_PriceList_ID = 101; String getSQLWhere() { - StringBuffer where = new StringBuffer(); + StringBuilder where = new StringBuilder(); // Optional PLV //int M_PriceList_Version_ID = 0; @@ -246,7 +246,7 @@ public class InfoProduct implements ADInfo { protected void prepareTable ( String from, String staticWhere, String orderBy) { - StringBuffer sql = new StringBuffer ("SELECT "); + StringBuilder sql = new StringBuilder ("SELECT "); for (int i = 0; i < s_productLayout.length; i++) { @@ -385,7 +385,7 @@ public class InfoProduct implements ADInfo { public String getSQL() { String dynWhere = getSQLWhere(); - StringBuffer sql = new StringBuffer (m_sqlMain); + StringBuilder sql = new StringBuilder (m_sqlMain); if (dynWhere.length() > 0) sql.append(dynWhere); // includes first AND @@ -401,7 +401,7 @@ public class InfoProduct implements ADInfo { public String getSQLCount() { String dynWhere = getSQLWhere(); - StringBuffer sql = new StringBuffer (m_sqlCount); + StringBuilder sql = new StringBuilder (m_sqlCount); if (dynWhere.length() > 0) sql.append(dynWhere); // includes first AND diff --git a/org.idempiere.webservices/WEB-INF/src/net/sf/jasperreports/engine/util/JRQueryExecuter.java b/org.idempiere.webservices/WEB-INF/src/net/sf/jasperreports/engine/util/JRQueryExecuter.java index 9d7d7c718a..6db7e63731 100644 --- a/org.idempiere.webservices/WEB-INF/src/net/sf/jasperreports/engine/util/JRQueryExecuter.java +++ b/org.idempiere.webservices/WEB-INF/src/net/sf/jasperreports/engine/util/JRQueryExecuter.java @@ -115,7 +115,7 @@ public class JRQueryExecuter JRQueryChunk[] chunks = query.getChunks(); if (chunks != null && chunks.length > 0) { - StringBuffer sbuffer = new StringBuffer(); + StringBuilder sbuffer = new StringBuilder(); JRQueryChunk chunk = null; for(int i = 0; i < chunks.length; i++) {