Don't instantiate new java.lang.Number instances.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@586849 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -547,7 +547,7 @@ public class ServiceUtil {
|
||||
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) {
|
||||
|
||||
@@ -155,10 +155,8 @@ public class RecurrenceInfo {
|
||||
|
||||
/** 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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -380,15 +380,15 @@ public class RecurrenceRule {
|
||||
|
||||
// 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) {
|
||||
|
||||
@@ -90,13 +90,13 @@ public class ServiceEcaSetField {
|
||||
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
|
||||
|
||||
@@ -112,7 +112,7 @@ public abstract class GenericAsyncEngine extends AbstractEngine {
|
||||
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);
|
||||
|
||||
@@ -411,7 +411,7 @@ public class JobManager {
|
||||
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;
|
||||
|
||||
@@ -127,8 +127,8 @@ public class JobPoller implements Runnable {
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user