IDEMPIERE-308 Performance: Replace with StringBuilder / fix a problem found with StringBuilder(int)

This commit is contained in:
Carlos Ruiz 2012-09-28 20:05:00 -05:00
parent 80d9c6bda3
commit b65f9deeb9
5 changed files with 5 additions and 5 deletions

View File

@ -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."); if (skipCount>0) returnStr.append(" ").append(skipCount).append(" products skipped.");
return(returnStr.toString()); return(returnStr.toString());

View File

@ -105,7 +105,7 @@ public class ProductionCreate extends SvrProcess {
m_production.setIsCreated("Y"); m_production.setIsCreated("Y");
m_production.save(get_TrxName()); 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(); return msgreturn.toString();
} }

View File

@ -84,7 +84,7 @@ public class ProductionProcess extends SvrProcess {
m_production.setProcessed(true); m_production.setProcessed(true);
m_production.saveEx(get_TrxName()); 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(); return msgreturn.toString();
} }

View File

@ -45,7 +45,7 @@ public class UniversalSubstitution extends SvrProcess {
bom.saveEx(); bom.saveEx();
count++; count++;
} }
StringBuilder msgreturn = new StringBuilder(count).append(" BOM products updated"); StringBuilder msgreturn = new StringBuilder().append(count).append(" BOM products updated");
return msgreturn.toString(); return msgreturn.toString();
} }

View File

@ -162,7 +162,7 @@ public class ModelInterfaceGenerator
if (tableName == null) if (tableName == null)
throw new RuntimeException("TableName not found for ID=" + AD_Table_ID); 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 ) if (accessLevel >= 4 )
accessLevelInfo.append("- System "); accessLevelInfo.append("- System ");
if (accessLevel == 2 || accessLevel == 3 || accessLevel == 6 || accessLevel == 7) if (accessLevel == 2 || accessLevel == 3 || accessLevel == 6 || accessLevel == 7)