From b65f9deeb9f26d6576230aee1231f88670c5a005 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Fri, 28 Sep 2012 20:05:00 -0500 Subject: [PATCH] IDEMPIERE-308 Performance: Replace with StringBuilder / fix a problem found with StringBuilder(int) --- .../src/org/adempiere/process/ExpenseTypesFromAccounts.java | 2 +- .../src/org/compiere/process/ProductionCreate.java | 2 +- .../src/org/compiere/process/ProductionProcess.java | 2 +- .../src/org/compiere/process/UniversalSubstitution.java | 2 +- .../src/org/adempiere/util/ModelInterfaceGenerator.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/org.adempiere.base.process/src/org/adempiere/process/ExpenseTypesFromAccounts.java b/org.adempiere.base.process/src/org/adempiere/process/ExpenseTypesFromAccounts.java index efd6182c00..4cc0c9f000 100644 --- a/org.adempiere.base.process/src/org/adempiere/process/ExpenseTypesFromAccounts.java +++ b/org.adempiere.base.process/src/org/adempiere/process/ExpenseTypesFromAccounts.java @@ -224,7 +224,7 @@ public class ExpenseTypesFromAccounts extends SvrProcess { } } - StringBuilder returnStr = new StringBuilder(addCount).append(" products added."); + StringBuilder returnStr = new StringBuilder().append(addCount).append(" products added."); if (skipCount>0) returnStr.append(" ").append(skipCount).append(" products skipped."); return(returnStr.toString()); diff --git a/org.adempiere.base.process/src/org/compiere/process/ProductionCreate.java b/org.adempiere.base.process/src/org/compiere/process/ProductionCreate.java index a51da43714..f1b23b0ea5 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ProductionCreate.java +++ b/org.adempiere.base.process/src/org/compiere/process/ProductionCreate.java @@ -105,7 +105,7 @@ public class ProductionCreate extends SvrProcess { m_production.setIsCreated("Y"); m_production.save(get_TrxName()); - StringBuilder msgreturn = new StringBuilder(created).append(" production lines were created"); + StringBuilder msgreturn = new StringBuilder().append(created).append(" production lines were created"); return msgreturn.toString(); } diff --git a/org.adempiere.base.process/src/org/compiere/process/ProductionProcess.java b/org.adempiere.base.process/src/org/compiere/process/ProductionProcess.java index 07a0a19dfa..db3c15de95 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ProductionProcess.java +++ b/org.adempiere.base.process/src/org/compiere/process/ProductionProcess.java @@ -84,7 +84,7 @@ public class ProductionProcess extends SvrProcess { m_production.setProcessed(true); m_production.saveEx(get_TrxName()); - StringBuilder msgreturn = new StringBuilder(processed).append(" production lines were processed"); + StringBuilder msgreturn = new StringBuilder().append(processed).append(" production lines were processed"); return msgreturn.toString(); } diff --git a/org.adempiere.base.process/src/org/compiere/process/UniversalSubstitution.java b/org.adempiere.base.process/src/org/compiere/process/UniversalSubstitution.java index 156381f256..f97fb83065 100644 --- a/org.adempiere.base.process/src/org/compiere/process/UniversalSubstitution.java +++ b/org.adempiere.base.process/src/org/compiere/process/UniversalSubstitution.java @@ -45,7 +45,7 @@ public class UniversalSubstitution extends SvrProcess { bom.saveEx(); count++; } - StringBuilder msgreturn = new StringBuilder(count).append(" BOM products updated"); + StringBuilder msgreturn = new StringBuilder().append(count).append(" BOM products updated"); return msgreturn.toString(); } diff --git a/org.adempiere.base/src/org/adempiere/util/ModelInterfaceGenerator.java b/org.adempiere.base/src/org/adempiere/util/ModelInterfaceGenerator.java index 594c138526..00732354c8 100644 --- a/org.adempiere.base/src/org/adempiere/util/ModelInterfaceGenerator.java +++ b/org.adempiere.base/src/org/adempiere/util/ModelInterfaceGenerator.java @@ -162,7 +162,7 @@ public class ModelInterfaceGenerator if (tableName == null) throw new RuntimeException("TableName not found for ID=" + AD_Table_ID); // - StringBuilder accessLevelInfo = new StringBuilder(accessLevel).append(" "); + StringBuilder accessLevelInfo = new StringBuilder().append(accessLevel).append(" "); if (accessLevel >= 4 ) accessLevelInfo.append("- System "); if (accessLevel == 2 || accessLevel == 3 || accessLevel == 6 || accessLevel == 7)