diff --git a/org.adempiere.base.process/src/org/adempiere/process/ImmediateBankTransfer.java b/org.adempiere.base.process/src/org/adempiere/process/ImmediateBankTransfer.java index 6000dc6a42..24041ec454 100644 --- a/org.adempiere.base.process/src/org/adempiere/process/ImmediateBankTransfer.java +++ b/org.adempiere.base.process/src/org/adempiere/process/ImmediateBankTransfer.java @@ -249,7 +249,7 @@ public class ImmediateBankTransfer extends SvrProcess MCash cash = createCash(); MCashLine cashLines[]= createCashLines(cash); - StringBuilder processMsg = new StringBuilder(cash.getDocumentNo()); + StringBuilder processMsg = new StringBuilder().append(cash.getDocumentNo()); cash.setDocAction(p_docAction); if (!cash.processIt(p_docAction)) diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportOrder.java b/org.adempiere.base.process/src/org/compiere/process/ImportOrder.java index 06d12d54f5..08ecf97f96 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportOrder.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportOrder.java @@ -90,7 +90,7 @@ public class ImportOrder extends SvrProcess { StringBuilder sql = null; int no = 0; - String clientCheck = " AND AD_Client_ID=" + m_AD_Client_ID; + StringBuilder clientCheck = new StringBuilder(" AND AD_Client_ID=").append(m_AD_Client_ID); // **** Prepare **** diff --git a/org.adempiere.base.process/src/org/compiere/process/ProjectPhaseGenOrder.java b/org.adempiere.base.process/src/org/compiere/process/ProjectPhaseGenOrder.java index 5c6cd21aa3..393641b9a8 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ProjectPhaseGenOrder.java +++ b/org.adempiere.base.process/src/org/compiere/process/ProjectPhaseGenOrder.java @@ -77,7 +77,7 @@ public class ProjectPhaseGenOrder extends SvrProcess { MOrderLine ol = new MOrderLine(order); ol.setLine(fromPhase.getSeqNo()); - StringBuilder sb = new StringBuilder (fromPhase.getName()); + StringBuilder sb = new StringBuilder ().append(fromPhase.getName()); if (fromPhase.getDescription() != null && fromPhase.getDescription().length() > 0) sb.append(" - ").append(fromPhase.getDescription()); ol.setDescription(sb.toString()); @@ -122,7 +122,7 @@ public class ProjectPhaseGenOrder extends SvrProcess { MOrderLine ol = new MOrderLine(order); ol.setLine(tasks[i].getSeqNo()); - StringBuilder sb = new StringBuilder (tasks[i].getName()); + StringBuilder sb = new StringBuilder ().append(tasks[i].getName()); if (tasks[i].getDescription() != null && tasks[i].getDescription().length() > 0) sb.append(" - ").append(tasks[i].getDescription()); ol.setDescription(sb.toString()); diff --git a/org.adempiere.base.process/src/org/compiere/process/RequestEMailProcessor.java b/org.adempiere.base.process/src/org/compiere/process/RequestEMailProcessor.java index 7a8afb9cc9..854ff8a052 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RequestEMailProcessor.java +++ b/org.adempiere.base.process/src/org/compiere/process/RequestEMailProcessor.java @@ -746,7 +746,7 @@ public class RequestEMailProcessor extends SvrProcess 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) diff --git a/org.adempiere.base/src/org/adempiere/model/PromotionRule.java b/org.adempiere.base/src/org/adempiere/model/PromotionRule.java index f8bb5085a1..bbb505b252 100644 --- a/org.adempiere.base/src/org/adempiere/model/PromotionRule.java +++ b/org.adempiere.base/src/org/adempiere/model/PromotionRule.java @@ -337,7 +337,7 @@ public class PromotionRule { //optional promotion code filter String promotionCode = (String)order.get_Value("PromotionCode"); - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); sql.append(select) .append(" WHERE") .append(" (" + bpFilter + ")") diff --git a/org.adempiere.base/src/org/compiere/model/MDistribution.java b/org.adempiere.base/src/org/compiere/model/MDistribution.java index a63fd5c622..f479394dd2 100644 --- a/org.adempiere.base/src/org/compiere/model/MDistribution.java +++ b/org.adempiere.base/src/org/compiere/model/MDistribution.java @@ -270,12 +270,12 @@ public class MDistribution extends X_GL_Distribution */ public String validate() { - StringBuilder retValue = null; + String retValue = null; getLines(true); if (m_lines.length == 0) - retValue = new StringBuilder("@NoLines@"); + retValue = "@NoLines@"; else if (getPercentTotal().compareTo(Env.ONEHUNDRED) != 0) - retValue = new StringBuilder("@PercentTotal@ <> 100"); + retValue = "@PercentTotal@ <> 100"; else { // More then one line with 0 @@ -286,8 +286,8 @@ public class MDistribution extends X_GL_Distribution { if (lineFound >= 0 && m_lines[i].getPercent().compareTo(Env.ZERO) == 0) { - retValue = new StringBuilder("@Line@ ").append(lineFound) - .append(" + ").append(m_lines[i].getLine()).append(": == 0"); + retValue = "@Line@ " + lineFound + + " + " + m_lines[i].getLine() + ": == 0"; break; } lineFound = m_lines[i].getLine(); @@ -296,7 +296,7 @@ public class MDistribution extends X_GL_Distribution } setIsValid (retValue == null); - return retValue.toString(); + return retValue; } // validate