Author: lektran
Date: Thu Sep 24 23:49:02 2009 New Revision: 818665 URL: http://svn.apache.org/viewvc?rev=818665&view=rev Log: Get rid of a whole pile of unnecessary string instantiations Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/HttpClient.java ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/Record.java ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/RecordIterator.java ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceUtil.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/taglib/IteratorTag.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/PosButtonWrapper.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/jpos/service/MsrKybService.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/jpos/service/ScannerKybService.java ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/SharkConstants.java ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/instance/EntityPersistentMgr.java ofbiz/trunk/specialpurpose/workflow/src/org/ofbiz/workflow/definition/XpdlReader.java Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java?rev=818665&r1=818664&r2=818665&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java Thu Sep 24 23:49:02 2009 @@ -61,7 +61,7 @@ public static Map<String, Object> ccAuth(DispatchContext dctx, Map<String, Object> context) { String ccAction = (String) context.get("ccAction"); - if (ccAction == null) ccAction = new String("PreAuth"); + if (ccAction == null) ccAction = "PreAuth"; Document authRequestDoc = buildPrimaryTxRequest(context, ccAction, (BigDecimal) context.get("processAmount"), (String) context.get("orderId")); @@ -88,9 +88,9 @@ } public static Map<String, Object> ccCredit(DispatchContext dctx, Map<String, Object> context) { - String action = new String("Credit"); + String action = "Credit"; if (context.get("pbOrder") != null) { - action = new String("Auth"); // required for periodic billing.... + action = "Auth"; // required for periodic billing.... } Document creditRequestDoc = buildPrimaryTxRequest(context, action, (BigDecimal) context.get("creditAmount"), Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java?rev=818665&r1=818664&r2=818665&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java Thu Sep 24 23:49:02 2009 @@ -65,11 +65,11 @@ @Override protected void setUp() throws Exception { // populate test data - configFile = new String("paymentTest.properties"); + configFile = "paymentTest.properties"; creditAmount = new BigDecimal("234.00"); emailAddr = delegator.makeValue("ContactMech", UtilMisc.toMap( "infoString","[hidden email]")); - orderId = new String("testOrder1000"); + orderId = "testOrder1000"; creditCard = delegator.makeValue("CreditCard", UtilMisc.toMap( "cardType","VISA", "expireDate","12/2008", // mm/yyyy, gets converted to mm/yy Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/HttpClient.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/HttpClient.java?rev=818665&r1=818664&r2=818665&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/HttpClient.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/HttpClient.java Thu Sep 24 23:49:02 2009 @@ -366,7 +366,7 @@ } BufferedReader post = new BufferedReader(charset == null ? new InputStreamReader(in) : new InputStreamReader(in, charset)); - String line = new String(); + String line = ""; if (Debug.verboseOn() || debug) Debug.log("---- HttpClient Response Content ----", module); while ((line = post.readLine()) != null) { Modified: ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/Record.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/Record.java?rev=818665&r1=818664&r2=818665&view=diff ============================================================================== --- ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/Record.java (original) +++ ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/Record.java Thu Sep 24 23:49:02 2009 @@ -395,7 +395,7 @@ for (int i = 0; i < modelField.length; i++) sb.append(PAD_CHAR); - data = new String(sb); + data = sb.toString(); } // Pad the record Modified: ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/RecordIterator.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/RecordIterator.java?rev=818665&r1=818664&r2=818665&view=diff ============================================================================== --- ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/RecordIterator.java (original) +++ ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/RecordIterator.java Thu Sep 24 23:49:02 2009 @@ -47,7 +47,7 @@ protected Record curRecord = null; protected String nextLine = null; protected Record nextRecord = null; - protected String eof = new String("\u001A"); // aka ASCII char 26, aka substitute, aka 0x1A, aka CTRL-Z, aka EOF DOS character. Added because problems in some DOS file, specifically file extracted from zip archives. + protected String eof = "\u001A"; // aka ASCII char 26, aka substitute, aka 0x1A, aka CTRL-Z, aka EOF DOS character. Added because problems in some DOS file, specifically file extracted from zip archives. public RecordIterator(URL fileUrl, ModelDataFile modelDataFile) throws DataFileException { this.modelDataFile = modelDataFile; Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceUtil.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceUtil.java?rev=818665&r1=818664&r2=818665&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceUtil.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceUtil.java Thu Sep 24 23:49:02 2009 @@ -33,7 +33,7 @@ /** Returns a Date object from a String. */ public static Date parseDate(String dateStr) { - String formatString = new String(); + String formatString = ""; if (dateStr.length() == 16) dateStr = dateStr.substring(0, 14); @@ -61,7 +61,7 @@ /** Returns a String from a Date object */ public static String formatDate(Date date) { - String formatString = new String(); + String formatString = ""; Calendar cal = Calendar.getInstance(); cal.setTime(date); Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/taglib/IteratorTag.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/taglib/IteratorTag.java?rev=818665&r1=818664&r2=818665&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/taglib/IteratorTag.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/taglib/IteratorTag.java Thu Sep 24 23:49:02 2009 @@ -246,7 +246,7 @@ Map.Entry entry = (Map.Entry) mapEntries.next(); Object value = entry.getValue(); - if (value == null) value = new String(); + if (value == null) value = ""; pageContext.setAttribute((String) entry.getKey(), value); } } Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/PosButtonWrapper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/PosButtonWrapper.java?rev=818665&r1=818664&r2=818665&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/PosButtonWrapper.java (original) +++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/PosButtonWrapper.java Thu Sep 24 23:49:02 2009 @@ -193,7 +193,7 @@ if (thisPosition == text.length()) { line = text; buf.append(line); - text = new String(); + text = ""; break; } Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/jpos/service/MsrKybService.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/jpos/service/MsrKybService.java?rev=818665&r1=818664&r2=818665&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/jpos/service/MsrKybService.java (original) +++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/jpos/service/MsrKybService.java Thu Sep 24 23:49:02 2009 @@ -33,15 +33,15 @@ public static final int JPOS_MSR_ACCT_ERR = 100; public static final int JPOS_MSR_EXPD_ERR = 101; - protected String title = new String(); - protected String firstname = new String(); - protected String middle = new String(); - protected String surname = new String(); - protected String suffix = new String(); + protected String title = ""; + protected String firstname = ""; + protected String middle = ""; + protected String surname = ""; + protected String suffix = ""; protected String[] accountNumber = new String[2]; protected String[] expireDate = new String[2]; - protected String serviceCode = new String(); + protected String serviceCode = ""; protected byte[] track1DiscretionaryData = new byte[0]; protected byte[] track2DiscretionaryData = new byte[0]; @@ -176,11 +176,11 @@ public void clearInput() throws JposException { this.title = null; - this.firstname = new String(); - this.middle = new String(); - this.surname = new String(); - this.suffix = new String(); - this.serviceCode = new String(); + this.firstname = ""; + this.middle = ""; + this.surname = ""; + this.suffix = ""; + this.serviceCode = ""; this.accountNumber = new String[2]; this.expireDate = new String[2]; this.track1Data = new byte[0]; Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/jpos/service/ScannerKybService.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/jpos/service/ScannerKybService.java?rev=818665&r1=818664&r2=818665&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/jpos/service/ScannerKybService.java (original) +++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/jpos/service/ScannerKybService.java Thu Sep 24 23:49:02 2009 @@ -50,7 +50,7 @@ protected byte[] scannedDataLabel = new byte[0]; protected byte[] scannedData = new byte[0]; - protected String codeId = new String(); + protected String codeId = ""; protected boolean decodeData = true; protected boolean eventEnabled = true; @@ -116,7 +116,7 @@ public void clearInput() throws JposException { this.scannedDataLabel = new byte[0]; this.scannedData = new byte[0]; - this.codeId = new String(); + this.codeId = ""; } // ScannerService13 Modified: ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/SharkConstants.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/SharkConstants.java?rev=818665&r1=818664&r2=818665&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/SharkConstants.java (original) +++ ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/SharkConstants.java Thu Sep 24 23:49:02 2009 @@ -21,126 +21,126 @@ public class SharkConstants { - public static String WfAssignmentEventAudit = new String("WfAssignmentEventAudit"); - public static String eventAuditId = new String("eventAuditId"); - public static String oldUserName = new String("oldUserName"); - public static String oldName = new String("oldName"); - public static String newUserName = new String("newUserName"); - public static String newName = new String("newName"); - public static String isAccepted = new String("isAccepted"); - public static String WfCreateProcessEventAudit = new String("WfCreateProcessEventAudit"); - public static String pActivityId = new String("pActivityId"); - public static String pActivityDefId = new String("pActivityDefId"); - public static String pActivitySetDefId = new String("pActivitySetDefId"); - public static String pProcessId = new String("pProcessId"); - public static String pProcessName = new String("pProcessName"); - public static String pProcessDefId = new String("pProcessDefId"); - public static String pProcessDefName = new String("pProcessDefName"); - public static String pProcessDefVer = new String("pProcessDefVer"); - public static String pPackageId = new String("pPackageId"); - public static String WfDataEventAudit = new String("WfDataEventAudit"); - public static String oldData = new String("oldData"); - public static String newData = new String("newData"); - public static String WfEventAudit = new String("WfEventAudit"); - public static String auditTime = new String("auditTime"); - public static String auditType = new String("auditType"); - public static String packageId = new String("packageId"); - public static String processId = new String("processId"); - public static String processName = new String("processName"); - public static String processDefId = new String("processDefId"); - public static String processDefName = new String("processDefName"); - public static String processDefVer = new String("processDefVer"); - public static String activityId = new String("activityId"); - public static String activityName = new String("activityName"); - public static String activityDefId = new String("activityDefId"); - public static String activitySetDefId = new String("activitySetDefId"); - public static String WfStateEventAudit = new String("WfStateEventAudit"); - public static String oldState = new String("oldState"); - public static String newState = new String("newState"); - public static String SharkGroup = new String("SharkGroup"); - public static String groupName = new String("groupName"); - public static String description = new String("description"); - public static String SharkGroupMember = new String("SharkGroupMember"); - public static String userName = new String("userName"); - public static String SharkGroupRollup = new String("SharkGroupRollup"); - public static String parentGroupName = new String("parentGroupName"); - public static String SharkUser = new String("SharkUser"); - public static String firstName = new String("firstName"); - public static String lastName = new String("lastName"); - public static String passwd = new String("passwd"); - public static String emailAddress = new String("emailAddress"); - public static String WfActivity = new String("WfActivity"); - public static String setDefinitionId = new String("setDefinitionId"); - public static String definitionId = new String("definitionId"); - public static String subFlowId = new String("subFlowId"); - public static String blockId = new String("blockId"); - public static String isSubAsync = new String("isSubAsync"); - public static String resourceUser = new String("resourceUser"); - public static String processMgrName = new String("processMgrName"); - public static String currentState = new String("currentState"); - public static String priority = new String("priority"); - public static String accepted = new String("accepted"); - public static String activatedTime = new String("activatedTime"); - public static String timeLimit = new String("timeLimit"); - public static String acceptedTime = new String("acceptedTime"); - public static String lastStateTime = new String("lastStateTime"); - public static String WfActivityVariable = new String("WfActivityVariable"); - public static String activityVariableId = new String("activityVariableId"); - public static String valueField = new String("valueField"); - public static String strValue = new String("strValue"); - public static String numValue = new String("numValue"); - public static String dblValue = new String("dblValue"); - public static String objValue = new String("objValue"); - public static String isModified = new String("isModified"); - public static String WfAndJoin = new String("WfAndJoin"); - public static String andJoinId = new String("andJoinId"); - public static String WfAssignment = new String("WfAssignment"); - public static String isValid = new String("isValid"); - public static String mgrName = new String("mgrName"); - public static String WfDeadline = new String("WfDeadline"); - public static String deadlineId = new String("deadlineId"); - public static String exceptionName = new String("exceptionName"); - public static String isExecuted = new String("isExecuted"); - public static String isSync = new String("isSync"); - public static String WfProcess = new String("WfProcess"); - public static String packageVer = new String("packageVer"); - public static String activityReqProcessId = new String("activityReqProcessId"); - public static String activityReqId = new String("activityReqId"); - public static String resourceReqId = new String("resourceReqId"); - public static String externalReq = new String("externalReq"); - public static String createdTime = new String("createdTime"); - public static String startedTime = new String("startedTime"); - public static String ExternalRequesterClassName = new String("ExternalRequesterClassName"); - public static String WfProcessMgr = new String("WfProcessMgr"); - public static String created = new String("created"); - public static String WfProcessVariable = new String("WfProcessVariable"); - public static String processVariableId = new String("processVariableId"); - public static String WfResource = new String("WfResource"); - public static String resourceName = new String("resourceName"); - public static String WfApplicationMap = new String("WfApplicationMap"); - public static String applicationDefId = new String("applicationDefId"); - public static String toolAgentName = new String("toolAgentName"); - public static String applicationName = new String("applicationName"); - public static String applicationMode = new String("applicationMode"); - public static String WfParticipantMap = new String("WfParticipantMap"); - public static String participantMapId = new String("participantMapId"); - public static String participantId = new String("participantId"); - public static String isGroupUser = new String("isGroupUser"); - public static String WfRepository = new String("WfRepository"); - public static String xpdlId = new String("xpdlId"); - public static String xpdlVersion = new String("xpdlVersion"); - public static String xpdlData = new String("xpdlData"); - public static String isHistorical = new String("isHistorical"); - public static String XPDLClassVersion = new String("XPDLClassVersion"); - public static String serializedPkg = new String("serializedPkg"); - public static String WfRepositoryRef = new String("WfRepositoryRef"); - public static String refXpdlId = new String("refXpdlId"); - public static String refNumber = new String("refNumber"); - public static String WfRequester = new String("WfRequester"); - public static String requesterId = new String("requesterId"); - public static String fromDate = new String("fromDate"); - public static String thruDate = new String("thruDate"); - public static String className = new String("className"); - public static String classData = new String("classData"); + public static String WfAssignmentEventAudit = "WfAssignmentEventAudit"; + public static String eventAuditId = "eventAuditId"; + public static String oldUserName = "oldUserName"; + public static String oldName = "oldName"; + public static String newUserName = "newUserName"; + public static String newName = "newName"; + public static String isAccepted = "isAccepted"; + public static String WfCreateProcessEventAudit = "WfCreateProcessEventAudit"; + public static String pActivityId = "pActivityId"; + public static String pActivityDefId = "pActivityDefId"; + public static String pActivitySetDefId = "pActivitySetDefId"; + public static String pProcessId = "pProcessId"; + public static String pProcessName = "pProcessName"; + public static String pProcessDefId = "pProcessDefId"; + public static String pProcessDefName = "pProcessDefName"; + public static String pProcessDefVer = "pProcessDefVer"; + public static String pPackageId = "pPackageId"; + public static String WfDataEventAudit = "WfDataEventAudit"; + public static String oldData = "oldData"; + public static String newData = "newData"; + public static String WfEventAudit = "WfEventAudit"; + public static String auditTime = "auditTime"; + public static String auditType = "auditType"; + public static String packageId = "packageId"; + public static String processId = "processId"; + public static String processName = "processName"; + public static String processDefId = "processDefId"; + public static String processDefName = "processDefName"; + public static String processDefVer = "processDefVer"; + public static String activityId = "activityId"; + public static String activityName = "activityName"; + public static String activityDefId = "activityDefId"; + public static String activitySetDefId = "activitySetDefId"; + public static String WfStateEventAudit = "WfStateEventAudit"; + public static String oldState = "oldState"; + public static String newState = "newState"; + public static String SharkGroup = "SharkGroup"; + public static String groupName = "groupName"; + public static String description = "description"; + public static String SharkGroupMember = "SharkGroupMember"; + public static String userName = "userName"; + public static String SharkGroupRollup = "SharkGroupRollup"; + public static String parentGroupName = "parentGroupName"; + public static String SharkUser = "SharkUser"; + public static String firstName = "firstName"; + public static String lastName = "lastName"; + public static String passwd = "passwd"; + public static String emailAddress = "emailAddress"; + public static String WfActivity = "WfActivity"; + public static String setDefinitionId = "setDefinitionId"; + public static String definitionId = "definitionId"; + public static String subFlowId = "subFlowId"; + public static String blockId = "blockId"; + public static String isSubAsync = "isSubAsync"; + public static String resourceUser = "resourceUser"; + public static String processMgrName = "processMgrName"; + public static String currentState = "currentState"; + public static String priority = "priority"; + public static String accepted = "accepted"; + public static String activatedTime = "activatedTime"; + public static String timeLimit = "timeLimit"; + public static String acceptedTime = "acceptedTime"; + public static String lastStateTime = "lastStateTime"; + public static String WfActivityVariable = "WfActivityVariable"; + public static String activityVariableId = "activityVariableId"; + public static String valueField = "valueField"; + public static String strValue = "strValue"; + public static String numValue = "numValue"; + public static String dblValue = "dblValue"; + public static String objValue = "objValue"; + public static String isModified = "isModified"; + public static String WfAndJoin = "WfAndJoin"; + public static String andJoinId = "andJoinId"; + public static String WfAssignment = "WfAssignment"; + public static String isValid = "isValid"; + public static String mgrName = "mgrName"; + public static String WfDeadline = "WfDeadline"; + public static String deadlineId = "deadlineId"; + public static String exceptionName = "exceptionName"; + public static String isExecuted = "isExecuted"; + public static String isSync = "isSync"; + public static String WfProcess = "WfProcess"; + public static String packageVer = "packageVer"; + public static String activityReqProcessId = "activityReqProcessId"; + public static String activityReqId = "activityReqId"; + public static String resourceReqId = "resourceReqId"; + public static String externalReq = "externalReq"; + public static String createdTime = "createdTime"; + public static String startedTime = "startedTime"; + public static String ExternalRequesterClassName = "ExternalRequesterClassName"; + public static String WfProcessMgr = "WfProcessMgr"; + public static String created = "created"; + public static String WfProcessVariable = "WfProcessVariable"; + public static String processVariableId = "processVariableId"; + public static String WfResource = "WfResource"; + public static String resourceName = "resourceName"; + public static String WfApplicationMap = "WfApplicationMap"; + public static String applicationDefId = "applicationDefId"; + public static String toolAgentName = "toolAgentName"; + public static String applicationName = "applicationName"; + public static String applicationMode = "applicationMode"; + public static String WfParticipantMap = "WfParticipantMap"; + public static String participantMapId = "participantMapId"; + public static String participantId = "participantId"; + public static String isGroupUser = "isGroupUser"; + public static String WfRepository = "WfRepository"; + public static String xpdlId = "xpdlId"; + public static String xpdlVersion = "xpdlVersion"; + public static String xpdlData = "xpdlData"; + public static String isHistorical = "isHistorical"; + public static String XPDLClassVersion = "XPDLClassVersion"; + public static String serializedPkg = "serializedPkg"; + public static String WfRepositoryRef = "WfRepositoryRef"; + public static String refXpdlId = "refXpdlId"; + public static String refNumber = "refNumber"; + public static String WfRequester = "WfRequester"; + public static String requesterId = "requesterId"; + public static String fromDate = "fromDate"; + public static String thruDate = "thruDate"; + public static String className = "className"; + public static String classData = "classData"; } Modified: ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/instance/EntityPersistentMgr.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/instance/EntityPersistentMgr.java?rev=818665&r1=818664&r2=818665&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/instance/EntityPersistentMgr.java (original) +++ ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/instance/EntityPersistentMgr.java Thu Sep 24 23:49:02 2009 @@ -323,8 +323,8 @@ public List getProcessMgrsWhere(SharkTransaction trans, String sqlWhere) throws PersistenceException { StringTokenizer st = null; StringTokenizer strtoc = null; - String pkgId = new String(); - String Elem = new String(); + String pkgId = ""; + String Elem = ""; List l = getAllProcessMgrs(trans); List returnList = new ArrayList(); if (sqlWhere != null) @@ -961,8 +961,8 @@ StringTokenizer strtoc = null; List returnList = new ArrayList(); List l = new ArrayList(); - String prcsMngrName = new String(); - String procState = new String(); + String prcsMngrName = ""; + String procState = ""; String element = null; if (sqlWhere != null) { @@ -993,7 +993,7 @@ l = getAllProcessesForMgr(prcsMngrName, trans); for(int i = 0; i < l.size(); i ++) { - if (((Process)l.get(i)).getState().startsWith(new String(procState.substring(0, procState.length()-1)))) + if (((Process)l.get(i)).getState().startsWith(procState.substring(0, procState.length()-1))) returnList.add(l.get(i)); } } else { @@ -1025,12 +1025,12 @@ public List getActivitiesWhere(SharkTransaction trans, String sqlWhere) throws PersistenceException { Debug.logInfo(">>>>>>>>>>>>>>>>>>>>>>> getActivitiesWhere(SharkTransaction trans, String sqlWhere)",module); Debug.logInfo(">>>>>>>>>>>>>>>>>>>>>>> sqlWhere = " + sqlWhere,module); - String ProcessId = new String(); + String ProcessId = ""; List act_list = new ArrayList(); StringTokenizer st = null; StringTokenizer strtoc = null; List returnList = new ArrayList(); - String element = new String(); + String element = ""; String state = null; String defId = null; if (sqlWhere != null) @@ -1069,10 +1069,10 @@ if (((Activity)act_list.get(i)).getActivityDefinitionId().equalsIgnoreCase(defId)) returnList.add(act_list.get(i)); } else if ((state != null) && (defId == null)) { - if (((Activity)act_list.get(i)).getState().startsWith(new String(state.substring(0, state.length()-1)))) + if (((Activity)act_list.get(i)).getState().startsWith(state.substring(0, state.length()-1))) returnList.add(act_list.get(i)); } else if ((state != null) && (defId != null)) { - if ((((Activity)act_list.get(i)).getState().startsWith(new String(state.substring(0, state.length()-1))))&& + if ((((Activity)act_list.get(i)).getState().startsWith(state.substring(0, state.length()-1)))&& (((Activity)act_list.get(i)).getActivityDefinitionId().equalsIgnoreCase(defId))) returnList.add(act_list.get(i)); } Modified: ofbiz/trunk/specialpurpose/workflow/src/org/ofbiz/workflow/definition/XpdlReader.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/workflow/src/org/ofbiz/workflow/definition/XpdlReader.java?rev=818665&r1=818664&r2=818665&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/workflow/src/org/ofbiz/workflow/definition/XpdlReader.java (original) +++ ofbiz/trunk/specialpurpose/workflow/src/org/ofbiz/workflow/definition/XpdlReader.java Thu Sep 24 23:49:02 2009 @@ -241,7 +241,7 @@ private boolean checkVersion(GenericValue valueObject, String prefix) { // Test if the object already exists. If so throw an exception. try { - String message = new String(); + String message = ""; if (prefix.equals("package")) { GenericValue gvCheck = valueObject.getDelegator().findByPrimaryKey("WorkflowPackage", |
Free forum by Nabble | Edit this page |