Author: doogie
Date: Sat Oct 20 20:53:56 2007 New Revision: 586849 URL: http://svn.apache.org/viewvc?rev=586849&view=rev Log: Don't instantiate new java.lang.Number instances. Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceInfo.java ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceRule.java ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaSetField.java ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GenericAsyncEngine.java ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobPoller.java 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=586849&r1=586848&r2=586849&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java Sat Oct 20 20:53:56 2007 @@ -547,7 +547,7 @@ try { job = delegator.findByPrimaryKey("JobSandbox", fields); if (job != null) { - job.set("maxRetry", new Long(0)); + job.set("maxRetry", Long.valueOf(0)); job.store(); } } catch (GenericEntityException e) { Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceInfo.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceInfo.java?rev=586849&r1=586848&r2=586849&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceInfo.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceInfo.java Sat Oct 20 20:53:56 2007 @@ -155,10 +155,8 @@ /** Increments the current count of this recurrence. */ public void incrementCurrentCount(boolean store) throws GenericEntityException { - Long count = new Long(getCurrentCount() + 1); - if (store) { - info.set("recurrenceCount", count); + info.set("recurrenceCount", getCurrentCount() + 1); info.store(); } } 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=586849&r1=586848&r2=586849&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 Sat Oct 20 20:53:56 2007 @@ -380,15 +380,15 @@ // Test each byXXX rule. if (bySecondList != null && bySecondList.size() > 0) { - if (!bySecondList.contains(new Integer(cal.get(Calendar.SECOND)))) + if (!bySecondList.contains(cal.get(Calendar.SECOND))) return false; } if (byMinuteList != null && byMinuteList.size() > 0) { - if (!byMinuteList.contains(new Integer(cal.get(Calendar.MINUTE)))) + if (!byMinuteList.contains(cal.get(Calendar.MINUTE))) return false; } if (byHourList != null && byHourList.size() > 0) { - if (!byHourList.contains(new Integer(cal.get(Calendar.HOUR)))) + if (!byHourList.contains(cal.get(Calendar.HOUR))) return false; } if (byDayList != null && byDayList.size() > 0) { Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaSetField.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaSetField.java?rev=586849&r1=586848&r2=586849&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaSetField.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaSetField.java Sat Oct 20 20:53:56 2007 @@ -90,13 +90,13 @@ return s.toLowerCase(); } if ("hash-code".equalsIgnoreCase(format)) { - return new Integer(s.hashCode()); + return Integer.valueOf(s.hashCode()); } if ("long".equalsIgnoreCase(format)) { - return new Long(s); + return Long.valueOf(s); } if ("double".equalsIgnoreCase(format)) { - return new Double(s); + return Double.valueOf(s); } // entity formats Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GenericAsyncEngine.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GenericAsyncEngine.java?rev=586849&r1=586848&r2=586849&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GenericAsyncEngine.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GenericAsyncEngine.java Sat Oct 20 20:53:56 2007 @@ -112,7 +112,7 @@ jFields.put("statusId", "SERVICE_PENDING"); jFields.put("serviceName", modelService.name); jFields.put("loaderName", localName); - jFields.put("maxRetry", new Long(modelService.maxRetry)); + jFields.put("maxRetry", Long.valueOf(modelService.maxRetry)); jFields.put("runtimeDataId", dataId); if (UtilValidate.isNotEmpty(authUserLoginId)) { jFields.put("authUserLoginId", authUserLoginId); Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java?rev=586849&r1=586848&r2=586849&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java Sat Oct 20 20:53:56 2007 @@ -411,7 +411,7 @@ jFields.put("loaderName", dispatcherName); // set the max retry - jFields.put("maxRetry", new Long(maxRetry)); + jFields.put("maxRetry", Long.valueOf(maxRetry)); // create the value and store GenericValue jobV = null; Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobPoller.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobPoller.java?rev=586849&r1=586848&r2=586849&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobPoller.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobPoller.java Sat Oct 20 20:53:56 2007 @@ -127,8 +127,8 @@ stateMap.put("threadName", invoker.getName()); stateMap.put("jobName", invoker.getJobName()); stateMap.put("serviceName", invoker.getServiceName()); - stateMap.put("runTime", new Long(invoker.getCurrentRuntime())); - stateMap.put("status", new Integer(invoker.getCurrentStatus())); + stateMap.put("runTime", Long.valueOf(invoker.getCurrentRuntime())); + stateMap.put("status", Integer.valueOf(invoker.getCurrentStatus())); stateList.add(stateMap); } return stateList; |
Free forum by Nabble | Edit this page |