Author: doogie
Date: Wed Oct 17 19:54:25 2007 New Revision: 585804 URL: http://svn.apache.org/viewvc?rev=585804&view=rev Log: Use StringBuilder instead of StringBuffer in framework/service. Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelParam.java ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceRule.java ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaCondition.java ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/HttpEngine.java ofbiz/trunk/framework/service/src/org/ofbiz/service/group/GroupModel.java ofbiz/trunk/framework/service/src/org/ofbiz/service/group/GroupServiceModel.java ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsListenerFactory.java Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelParam.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelParam.java?rev=585804&r1=585803&r2=585804&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelParam.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelParam.java Wed Oct 17 19:54:25 2007 @@ -148,7 +148,7 @@ } public String toString() { - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); buf.append(name).append("::"); buf.append(type).append("::"); buf.append(mode).append("::"); Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java?rev=585804&r1=585803&r2=585804&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java Wed Oct 17 19:54:25 2007 @@ -223,7 +223,7 @@ } public String toString() { - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); buf.append(name).append("::"); buf.append(description).append("::"); buf.append(engineName).append("::"); Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java?rev=585804&r1=585803&r2=585804&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java Wed Oct 17 19:54:25 2007 @@ -209,7 +209,7 @@ } public static String getErrorMessage(Map result) { - StringBuffer errorMessage = new StringBuffer(); + StringBuilder errorMessage = new StringBuilder(); if (result.get(ModelService.ERROR_MESSAGE) != null) errorMessage.append((String) result.get(ModelService.ERROR_MESSAGE)); @@ -237,7 +237,7 @@ String errorMsg = (String) result.get(ModelService.ERROR_MESSAGE); List errorMsgList = (List) result.get(ModelService.ERROR_MESSAGE_LIST); Map errorMsgMap = (Map) result.get(ModelService.ERROR_MESSAGE_MAP); - StringBuffer outMsg = new StringBuffer(); + StringBuilder outMsg = new StringBuilder(); if (errorMsg != null) { if (msgPrefix != null) outMsg.append(msgPrefix); @@ -262,7 +262,7 @@ } if (outMsg.length() > 0) { - StringBuffer strBuf = new StringBuffer(); + StringBuilder strBuf = new StringBuilder(); if (errorPrefix != null) strBuf.append(errorPrefix); strBuf.append(outMsg.toString()); @@ -279,7 +279,7 @@ } String successMsg = (String) result.get(ModelService.SUCCESS_MESSAGE); List successMsgList = (List) result.get(ModelService.SUCCESS_MESSAGE_LIST); - StringBuffer outMsg = new StringBuffer(); + StringBuilder outMsg = new StringBuilder(); outMsg.append(makeMessageList(successMsgList, msgPrefix, msgSuffix)); @@ -290,7 +290,7 @@ } if (outMsg.length() > 0) { - StringBuffer strBuf = new StringBuffer(); + StringBuilder strBuf = new StringBuilder(); if (successPrefix != null) strBuf.append(successPrefix); strBuf.append(outMsg.toString()); if (successSuffix != null) strBuf.append(successSuffix); @@ -301,7 +301,7 @@ } public static String makeMessageList(List msgList, String msgPrefix, String msgSuffix) { - StringBuffer outMsg = new StringBuffer(); + StringBuilder outMsg = new StringBuilder(); if (msgList != null && msgList.size() > 0) { Iterator iter = msgList.iterator(); while (iter.hasNext()) { Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceRule.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceRule.java?rev=585804&r1=585803&r2=585804&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceRule.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceRule.java Wed Oct 17 19:54:25 2007 @@ -573,7 +573,7 @@ // Gets the numeric value of the number at the beginning of the string private int getDailyNumber(String str) { int number = 0; - StringBuffer numberBuf = new StringBuffer(); + StringBuilder numberBuf = new StringBuilder(); for (int i = 0; i < str.length(); i++) { String thisChar = str.substring(i, i); @@ -596,7 +596,7 @@ // Gets the string part of the combined number+string private String getDailyString(String str) { - StringBuffer sBuf = new StringBuffer(); + StringBuilder sBuf = new StringBuilder(); for (int i = 0; i < str.length(); i++) { String thisChar = str.substring(i, i); Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaCondition.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaCondition.java?rev=585804&r1=585803&r2=585804&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaCondition.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaCondition.java Wed Oct 17 19:54:25 2007 @@ -171,7 +171,7 @@ } public String toString() { - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); buf.append("[" + conditionService + "]"); buf.append("[" + lhsMapName + "]"); Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/HttpEngine.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/HttpEngine.java?rev=585804&r1=585803&r2=585804&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/HttpEngine.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/HttpEngine.java Wed Oct 17 19:54:25 2007 @@ -159,7 +159,7 @@ } // backup error message - StringBuffer errorMessage = new StringBuffer(); + StringBuilder errorMessage = new StringBuilder(); // process the result String resultString = null; Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/group/GroupModel.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/group/GroupModel.java?rev=585804&r1=585803&r2=585804&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/group/GroupModel.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/group/GroupModel.java Wed Oct 17 19:54:25 2007 @@ -146,7 +146,7 @@ * @see java.lang.Object#toString() */ public String toString() { - StringBuffer str = new StringBuffer(); + StringBuilder str = new StringBuilder(); str.append(getGroupName()); str.append("::"); str.append(getSendMode()); Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/group/GroupServiceModel.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/group/GroupServiceModel.java?rev=585804&r1=585803&r2=585804&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/group/GroupServiceModel.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/group/GroupServiceModel.java Wed Oct 17 19:54:25 2007 @@ -127,7 +127,7 @@ * @see java.lang.Object#toString() */ public String toString() { - StringBuffer str = new StringBuffer(); + StringBuilder str = new StringBuilder(); str.append(getName()); str.append("::"); str.append(getMode()); Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsListenerFactory.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsListenerFactory.java?rev=585804&r1=585803&r2=585804&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsListenerFactory.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsListenerFactory.java Wed Oct 17 19:54:25 2007 @@ -93,7 +93,7 @@ if (listenerEnabled.equalsIgnoreCase("true")) { // create a server key - StringBuffer serverKey = new StringBuffer(); + StringBuilder serverKey = new StringBuilder(); serverKey.append(server.getAttribute("jndi-server-name") + ":"); serverKey.append(server.getAttribute("jndi-name") + ":"); |
Free forum by Nabble | Edit this page |