Author: doogie
Date: Mon Jun 30 13:20:37 2008 New Revision: 672898 URL: http://svn.apache.org/viewvc?rev=672898&view=rev Log: Number.valueOf changes. Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityCount.java ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionBegin.java ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/Loop.java ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Calculate.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceEventHandler.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizAmountTransform.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizCurrencyTransform.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/pseudotag/EntityField.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/VisitHandler.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/taglib/IfTag.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsJXlsViewHandler.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPdfViewHandler.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPoiXlsViewHandler.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsXmlViewHandler.java ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormWrapper.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuWrapper.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenRenderer.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityCount.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityCount.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityCount.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/EntityCount.java Mon Jun 30 13:20:37 2008 @@ -102,7 +102,7 @@ long count = delegator.findCountByCondition(entityName, whereEntityCondition, havingEntityCondition, null); - this.countAcsr.put(context, new Long(count)); + this.countAcsr.put(context, Long.valueOf(count)); } catch (GeneralException e) { Debug.logError(e, module); String errMsg = "ERROR: Could not complete the " + simpleMethod.getShortDescription() + " process: " + e.getMessage(); Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionBegin.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionBegin.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionBegin.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/TransactionBegin.java Mon Jun 30 13:20:37 2008 @@ -53,7 +53,7 @@ return false; } - beganTransactionAcsr.put(methodContext, new Boolean(beganTransaction)); + beganTransactionAcsr.put(methodContext, Boolean.valueOf(beganTransaction)); return true; } Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/Loop.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/Loop.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/Loop.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/Loop.java Mon Jun 30 13:20:37 2008 @@ -54,7 +54,7 @@ String countStrExp = methodContext.expandString(this.countStr); int count = 0; try { - Double ctDbl = new Double(countStrExp); + Double ctDbl = Double.valueOf(countStrExp); if (ctDbl != null) { count = ctDbl.intValue(); } @@ -69,7 +69,7 @@ } for (int i = 0; i < count; i++) { - fieldAcsr.put(methodContext, new Integer(i)); + fieldAcsr.put(methodContext, Integer.valueOf(i)); if (!SimpleMethod.runSubOps(subOps, methodContext)) { // only return here if it returns false, otherwise just carry on return false; Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Calculate.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Calculate.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Calculate.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Calculate.java Mon Jun 30 13:20:37 2008 @@ -169,18 +169,18 @@ Object resultObj = null; switch (type) { case TYPE_DOUBLE: - resultObj = new Double(resultValue.doubleValue()); + resultObj = Double.valueOf(resultValue.doubleValue()); break; case TYPE_FLOAT: - resultObj = new Float(resultValue.floatValue()); + resultObj = Float.valueOf(resultValue.floatValue()); break; case TYPE_LONG: resultValue = resultValue.setScale(0, roundingMode); - resultObj = new Long(resultValue.longValue()); + resultObj = Long.valueOf(resultValue.longValue()); break; case TYPE_INTEGER: resultValue = resultValue.setScale(0, roundingMode); - resultObj = new Integer(resultValue.intValue()); + resultObj = Integer.valueOf(resultValue.intValue()); break; case TYPE_STRING: // run the decimal-formatting Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java Mon Jun 30 13:20:37 2008 @@ -441,7 +441,7 @@ } catch (GenericServiceException e) { Debug.logError(e, "Error getting user preference", module); } - session.setAttribute("javaScriptEnabled", new Boolean("Y".equals(javaScriptEnabled))); + session.setAttribute("javaScriptEnabled", Boolean.valueOf("Y".equals(javaScriptEnabled))); ModelEntity modelUserLogin = userLogin.getModelEntity(); if (modelUserLogin.isField("partyId")) { Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java Mon Jun 30 13:20:37 2008 @@ -219,13 +219,13 @@ // the frequency map Map freqMap = new HashMap(); - freqMap.put("SECONDLY", new Integer(1)); - freqMap.put("MINUTELY", new Integer(2)); - freqMap.put("HOURLY", new Integer(3)); - freqMap.put("DAILY", new Integer(4)); - freqMap.put("WEEKLY", new Integer(5)); - freqMap.put("MONTHLY", new Integer(6)); - freqMap.put("YEARLY", new Integer(7)); + freqMap.put("SECONDLY", Integer.valueOf(1)); + freqMap.put("MINUTELY", Integer.valueOf(2)); + freqMap.put("HOURLY", Integer.valueOf(3)); + freqMap.put("DAILY", Integer.valueOf(4)); + freqMap.put("WEEKLY", Integer.valueOf(5)); + freqMap.put("MONTHLY", Integer.valueOf(6)); + freqMap.put("YEARLY", Integer.valueOf(7)); // some defaults long startTime = (new Date()).getTime(); @@ -578,7 +578,7 @@ // load the file File file = new File(filePath); if (file.exists()) { - Long longLen = new Long(file.length()); + Long longLen = Long.valueOf(file.length()); int length = longLen.intValue(); try { FileInputStream fis = new FileInputStream(file); Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceEventHandler.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceEventHandler.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceEventHandler.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceEventHandler.java Mon Jun 30 13:20:37 2008 @@ -215,7 +215,7 @@ } } multiPartMap.put(fieldName, ByteBuffer.wrap(item.get())); - multiPartMap.put("_" + fieldName + "_size", new Long(item.getSize())); + multiPartMap.put("_" + fieldName + "_size", Long.valueOf(item.getSize())); multiPartMap.put("_" + fieldName + "_fileName", fileName); multiPartMap.put("_" + fieldName + "_contentType", item.getContentType()); } Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizAmountTransform.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizAmountTransform.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizAmountTransform.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizAmountTransform.java Mon Jun 30 13:20:37 2008 @@ -71,24 +71,24 @@ // handle nulls better if (o == null) { - o = new Double(0.00); + o = Double.valueOf(0.00); } if (o instanceof NumberModel) { NumberModel s = (NumberModel) o; - return new Double( s.getAsNumber().doubleValue() ); + return Double.valueOf( s.getAsNumber().doubleValue() ); } if (o instanceof SimpleNumber) { SimpleNumber s = (SimpleNumber) o; - return new Double( s.getAsNumber().doubleValue() ); + return Double.valueOf( s.getAsNumber().doubleValue() ); } if (o instanceof SimpleScalar) { SimpleScalar s = (SimpleScalar) o; - return new Double( s.getAsString() ); + return Double.valueOf( s.getAsString() ); } - return new Double( o.toString() ); + return Double.valueOf( o.toString() ); } - return new Double(0.00); + return Double.valueOf(0.00); } public Writer getWriter(final Writer out, Map args) { Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizCurrencyTransform.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizCurrencyTransform.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizCurrencyTransform.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizCurrencyTransform.java Mon Jun 30 13:20:37 2008 @@ -83,9 +83,9 @@ } if (o instanceof SimpleScalar) { SimpleScalar s = (SimpleScalar) o; - return new Double( s.getAsString() ); + return Double.valueOf( s.getAsString() ); } - return new Double( o.toString() ); + return Double.valueOf( o.toString() ); } return 0.00; } @@ -110,9 +110,9 @@ } if (o instanceof SimpleScalar) { SimpleScalar s = (SimpleScalar) o; - return new Integer( s.getAsString() ); + return Integer.valueOf( s.getAsString() ); } - return new Integer(o.toString()); + return Integer.valueOf(o.toString()); } return 0; } Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/pseudotag/EntityField.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/pseudotag/EntityField.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/pseudotag/EntityField.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/pseudotag/EntityField.java Mon Jun 30 13:20:37 2008 @@ -149,7 +149,7 @@ try { if (objStr.length() > 0) { - fieldObject = new Double(objStr); + fieldObject = Double.valueOf(objStr); } } catch (NumberFormatException nfe) { throw new IllegalStateException("String not a number for printing of type currency: " + objStr); Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java Mon Jun 30 13:20:37 2008 @@ -553,10 +553,10 @@ serverHitBin.set("hitTypeId", ServerHitBin.typeIds[this.type]); serverHitBin.set("binStartDateTime", new java.sql.Timestamp(this.startTime)); serverHitBin.set("binEndDateTime", new java.sql.Timestamp(this.endTime)); - serverHitBin.set("numberHits", new Long(this.numberHits)); - serverHitBin.set("totalTimeMillis", new Long(this.totalRunningTime)); - serverHitBin.set("minTimeMillis", new Long(this.minTime)); - serverHitBin.set("maxTimeMillis", new Long(this.maxTime)); + serverHitBin.set("numberHits", Long.valueOf(this.numberHits)); + serverHitBin.set("totalTimeMillis", Long.valueOf(this.totalRunningTime)); + serverHitBin.set("minTimeMillis", Long.valueOf(this.minTime)); + serverHitBin.set("maxTimeMillis", Long.valueOf(this.maxTime)); // get localhost ip address and hostname to store try { InetAddress address = InetAddress.getLocalHost(); @@ -626,7 +626,7 @@ } } serverHit.set("contentId", this.id); - serverHit.set("runningTimeMillis", new Long(runningTime)); + serverHit.set("runningTimeMillis", Long.valueOf(runningTime)); String fullRequestUrl = UtilHttp.getFullRequestUrl(request).toString(); Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/VisitHandler.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/VisitHandler.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/VisitHandler.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/VisitHandler.java Mon Jun 30 13:20:37 2008 @@ -69,7 +69,7 @@ if (modelUserLogin.isField("partyId")) { visit.set("partyId", userLogin.get("partyId")); } - visit.set("userCreated", new Boolean(userCreated)); + visit.set("userCreated", Boolean.valueOf(userCreated)); // make sure the visitorId is still in place if (visitor != null) { Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/taglib/IfTag.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/taglib/IfTag.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/taglib/IfTag.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/taglib/IfTag.java Mon Jun 30 13:20:37 2008 @@ -125,7 +125,7 @@ Boolean b = (Boolean) object; if (value != null) { - Boolean v = new Boolean(value); + Boolean v = Boolean.valueOf(value); if (b.equals(v)) return EVAL_BODY_AGAIN; Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsJXlsViewHandler.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsJXlsViewHandler.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsJXlsViewHandler.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsJXlsViewHandler.java Mon Jun 30 13:20:37 2008 @@ -72,7 +72,7 @@ } // tell the ContextFilter we are forwarding - request.setAttribute(ContextFilter.FORWARDED_FROM_SERVLET, new Boolean(true)); + request.setAttribute(ContextFilter.FORWARDED_FROM_SERVLET, Boolean.valueOf(true)); GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator"); if (delegator == null) { throw new ViewHandlerException("The delegator object was null, how did that happen?"); Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPdfViewHandler.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPdfViewHandler.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPdfViewHandler.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPdfViewHandler.java Mon Jun 30 13:20:37 2008 @@ -70,7 +70,7 @@ } // tell the ContextFilter we are forwarding - request.setAttribute(ContextFilter.FORWARDED_FROM_SERVLET, new Boolean(true)); + request.setAttribute(ContextFilter.FORWARDED_FROM_SERVLET, Boolean.valueOf(true)); GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator"); if (delegator == null) { throw new ViewHandlerException("The delegator object was null, how did that happen?"); Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPoiXlsViewHandler.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPoiXlsViewHandler.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPoiXlsViewHandler.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPoiXlsViewHandler.java Mon Jun 30 13:20:37 2008 @@ -72,7 +72,7 @@ } // tell the ContextFilter we are forwarding - request.setAttribute(ContextFilter.FORWARDED_FROM_SERVLET, new Boolean(true)); + request.setAttribute(ContextFilter.FORWARDED_FROM_SERVLET, Boolean.valueOf(true)); GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator"); if (delegator == null) { throw new ViewHandlerException("The delegator object was null, how did that happen?"); Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsXmlViewHandler.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsXmlViewHandler.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsXmlViewHandler.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsXmlViewHandler.java Mon Jun 30 13:20:37 2008 @@ -68,7 +68,7 @@ } // tell the ContextFilter we are forwarding - request.setAttribute(ContextFilter.FORWARDED_FROM_SERVLET, new Boolean(true)); + request.setAttribute(ContextFilter.FORWARDED_FROM_SERVLET, Boolean.valueOf(true)); GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator"); Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java (original) +++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java Mon Jun 30 13:20:37 2008 @@ -125,7 +125,7 @@ Integer txTimeout = (Integer)context.get("txTimeout"); if (txTimeout == null) { - txTimeout = new Integer(7200); + txTimeout = Integer.valueOf(7200); } InputSource ins = null; URL url = null; @@ -244,10 +244,10 @@ Long filePause = (Long)context.get("filePause"); if (txTimeout == null) { - txTimeout = new Integer(7200); + txTimeout = Integer.valueOf(7200); } if (filePause == null) { - filePause = new Long(0); + filePause = Long.valueOf(0); } if (path != null && path.length() > 0) { @@ -458,10 +458,10 @@ Integer txTimeout = (Integer)context.get("txTimeout"); if (txTimeout == null) { - txTimeout = new Integer(7200); + txTimeout = Integer.valueOf(7200); } - Long rowProcessed = new Long(0); + Long rowProcessed = Long.valueOf(0); try { EntitySaxReader reader = new EntitySaxReader(delegator); reader.setUseTryInsertMethod(mostlyInserts); @@ -471,7 +471,7 @@ reader.setCheckDataOnly(checkDataOnly); long numberRead = (url != null ? reader.parse(url) : reader.parse(xmltext)); - rowProcessed = new Long(numberRead); + rowProcessed = Long.valueOf(numberRead); } catch (Exception ex){ return ServiceUtil.returnError("Error parsing entity xml file: " + ex.toString()); } @@ -486,7 +486,7 @@ String outpath = (String)context.get("outpath"); // mandatory Integer txTimeout = (Integer)context.get("txTimeout"); if (txTimeout == null) { - txTimeout = new Integer(7200); + txTimeout = Integer.valueOf(7200); } List results = new ArrayList(); @@ -913,7 +913,7 @@ } catch (Exception e) { viewIndex = 0; } - result.put("viewIndex", new Integer(viewIndex)); + result.put("viewIndex", Integer.valueOf(viewIndex)); int viewSize = 50; try { @@ -921,7 +921,7 @@ } catch (Exception e) { viewSize = 50; } - result.put("viewSize", new Integer(viewSize)); + result.put("viewSize", Integer.valueOf(viewSize)); // get the lookup flag String lookupFlag = (String) context.get("lookupFlag"); @@ -1021,10 +1021,10 @@ if (jobList == null) jobList = FastList.newInstance(); String paramString = StringUtil.join(paramList, "&"); result.put("paramList", (paramString != null ? paramString: "")); - result.put("lowIndex", new Integer(lowIndex)); - result.put("highIndex", new Integer(highIndex)); + result.put("lowIndex", Integer.valueOf(lowIndex)); + result.put("highIndex", Integer.valueOf(highIndex)); result.put("jobs", jobList); - result.put("jobListSize", new Integer(jobListSize)); + result.put("jobListSize", Integer.valueOf(jobListSize)); return result; } Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java Mon Jun 30 13:20:37 2008 @@ -981,7 +981,7 @@ if (nextFormField != null) { if (nextFormField.getPosition() > currentFormField.getPosition()) { positionSpan = nextFormField.getPosition() - currentFormField.getPosition() - 1; - nextPositionInRow = new Integer(nextFormField.getPosition()); + nextPositionInRow = Integer.valueOf(nextFormField.getPosition()); } else { positionSpan = positions - currentFormField.getPosition(); if (!stayingOnRow && nextFormField.getPosition() > 1) { @@ -1344,9 +1344,9 @@ if ((itemIndex + 1) < highIndex) { highIndex = itemIndex + 1; // if list size is overridden, use full listSize - context.put("highIndex", new Integer(isOverridenListSize() ? listSize : highIndex)); + context.put("highIndex", Integer.valueOf(isOverridenListSize() ? listSize : highIndex)); } - context.put("actualPageSize", new Integer(highIndex - lowIndex)); + context.put("actualPageSize", Integer.valueOf(highIndex - lowIndex)); if (iter instanceof EntityListIterator) { try { @@ -1426,7 +1426,7 @@ ModelFormAction.runSubActions(this.rowActions, localContext); - localContext.put("itemIndex", new Integer(itemIndex - lowIndex)); + localContext.put("itemIndex", Integer.valueOf(itemIndex - lowIndex)); this.resetBshInterpreter(localContext); if (Debug.verboseOn()) Debug.logVerbose("In form got another row, context is: " + localContext, module); @@ -1560,9 +1560,9 @@ if ((itemIndex + 1) < highIndex) { highIndex = itemIndex + 1; // if list size is overridden, use full listSize - context.put("highIndex", new Integer(isOverridenListSize() ? listSize : highIndex)); + context.put("highIndex", Integer.valueOf(isOverridenListSize() ? listSize : highIndex)); } - context.put("actualPageSize", new Integer(highIndex - lowIndex)); + context.put("actualPageSize", Integer.valueOf(highIndex - lowIndex)); if (iter instanceof EntityListIterator) { try { @@ -1722,7 +1722,7 @@ Iterator fieldListIter = modelFormFieldList.iterator(); while (fieldListIter.hasNext()) { ModelFormField modelFormField = (ModelFormField) fieldListIter.next(); - Integer position = new Integer(modelFormField.getPosition()); + Integer position = Integer.valueOf(modelFormField.getPosition()); List<ModelFormField> fieldListByPosition = fieldsByPosition.get(position); if (fieldListByPosition == null) { fieldListByPosition = FastList.newInstance(); @@ -2434,7 +2434,7 @@ public void setDefaultViewSize(String val) { try { - Integer sz = new Integer(val); + Integer sz = Integer.valueOf(val); defaultViewSize = sz.intValue(); } catch(NumberFormatException e) { defaultViewSize = DEFAULT_PAGE_SIZE; @@ -2524,11 +2524,11 @@ highIndex = defaultViewSize; } - context.put("listSize", new Integer(listSize)); - context.put("viewIndex", new Integer(viewIndex)); - context.put("viewSize", new Integer(viewSize)); - context.put("lowIndex", new Integer(lowIndex)); - context.put("highIndex", new Integer(highIndex)); + context.put("listSize", Integer.valueOf(listSize)); + context.put("viewIndex", Integer.valueOf(viewIndex)); + context.put("viewSize", Integer.valueOf(viewSize)); + context.put("lowIndex", Integer.valueOf(lowIndex)); + context.put("highIndex", Integer.valueOf(highIndex)); } public String getPassedRowCount(Map<String, Object> context) { Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java Mon Jun 30 13:20:37 2008 @@ -442,27 +442,27 @@ if ("id".equals(modelField.getType()) || "id-ne".equals(modelField.getType())) { ModelFormField.TextFindField textField = new ModelFormField.TextFindField(ModelFormField.FieldInfo.SOURCE_AUTO_ENTITY, this); textField.setSize(20); - textField.setMaxlength(new Integer(20)); + textField.setMaxlength(Integer.valueOf(20)); this.setFieldInfo(textField); } else if ("id-long".equals(modelField.getType()) || "id-long-ne".equals(modelField.getType())) { ModelFormField.TextFindField textField = new ModelFormField.TextFindField(ModelFormField.FieldInfo.SOURCE_AUTO_ENTITY, this); textField.setSize(40); - textField.setMaxlength(new Integer(60)); + textField.setMaxlength(Integer.valueOf(60)); this.setFieldInfo(textField); } else if ("id-vlong".equals(modelField.getType()) || "id-vlong-ne".equals(modelField.getType())) { ModelFormField.TextFindField textField = new ModelFormField.TextFindField(ModelFormField.FieldInfo.SOURCE_AUTO_ENTITY, this); textField.setSize(60); - textField.setMaxlength(new Integer(250)); + textField.setMaxlength(Integer.valueOf(250)); this.setFieldInfo(textField); } else if ("very-short".equals(modelField.getType())) { ModelFormField.TextField textField = new ModelFormField.TextField(ModelFormField.FieldInfo.SOURCE_AUTO_ENTITY, this); textField.setSize(6); - textField.setMaxlength(new Integer(10)); + textField.setMaxlength(Integer.valueOf(10)); this.setFieldInfo(textField); } else if ("name".equals(modelField.getType()) || "short-varchar".equals(modelField.getType())) { ModelFormField.TextFindField textField = new ModelFormField.TextFindField(ModelFormField.FieldInfo.SOURCE_AUTO_ENTITY, this); textField.setSize(40); - textField.setMaxlength(new Integer(60)); + textField.setMaxlength(Integer.valueOf(60)); this.setFieldInfo(textField); } else if ( "value".equals(modelField.getType()) @@ -473,7 +473,7 @@ || "email".equals(modelField.getType())) { ModelFormField.TextFindField textField = new ModelFormField.TextFindField(ModelFormField.FieldInfo.SOURCE_AUTO_ENTITY, this); textField.setSize(60); - textField.setMaxlength(new Integer(250)); + textField.setMaxlength(Integer.valueOf(250)); this.setFieldInfo(textField); } else if ( "floating-point".equals(modelField.getType()) || "currency-amount".equals(modelField.getType()) || "numeric".equals(modelField.getType())) { @@ -504,17 +504,17 @@ if ("id".equals(modelField.getType()) || "id-ne".equals(modelField.getType())) { ModelFormField.TextField textField = new ModelFormField.TextField(ModelFormField.FieldInfo.SOURCE_AUTO_ENTITY, this); textField.setSize(20); - textField.setMaxlength(new Integer(20)); + textField.setMaxlength(Integer.valueOf(20)); this.setFieldInfo(textField); } else if ("id-long".equals(modelField.getType()) || "id-long-ne".equals(modelField.getType())) { ModelFormField.TextField textField = new ModelFormField.TextField(ModelFormField.FieldInfo.SOURCE_AUTO_ENTITY, this); textField.setSize(40); - textField.setMaxlength(new Integer(60)); + textField.setMaxlength(Integer.valueOf(60)); this.setFieldInfo(textField); } else if ("id-vlong".equals(modelField.getType()) || "id-vlong-ne".equals(modelField.getType())) { ModelFormField.TextField textField = new ModelFormField.TextField(ModelFormField.FieldInfo.SOURCE_AUTO_ENTITY, this); textField.setSize(60); - textField.setMaxlength(new Integer(250)); + textField.setMaxlength(Integer.valueOf(250)); this.setFieldInfo(textField); } else if ("indicator".equals(modelField.getType())) { ModelFormField.DropDownField dropDownField = new ModelFormField.DropDownField(ModelFormField.FieldInfo.SOURCE_AUTO_ENTITY, this); @@ -524,12 +524,12 @@ this.setFieldInfo(dropDownField); //ModelFormField.TextField textField = new ModelFormField.TextField(ModelFormField.FieldInfo.SOURCE_AUTO_ENTITY, this); //textField.setSize(1); - //textField.setMaxlength(new Integer(1)); + //textField.setMaxlength(Integer.valueOf(1)); //this.setFieldInfo(textField); } else if ("very-short".equals(modelField.getType())) { ModelFormField.TextField textField = new ModelFormField.TextField(ModelFormField.FieldInfo.SOURCE_AUTO_ENTITY, this); textField.setSize(6); - textField.setMaxlength(new Integer(10)); + textField.setMaxlength(Integer.valueOf(10)); this.setFieldInfo(textField); } else if ("very-long".equals(modelField.getType())) { ModelFormField.TextareaField textareaField = new ModelFormField.TextareaField(ModelFormField.FieldInfo.SOURCE_AUTO_ENTITY, this); @@ -539,7 +539,7 @@ } else if ("name".equals(modelField.getType()) || "short-varchar".equals(modelField.getType())) { ModelFormField.TextField textField = new ModelFormField.TextField(ModelFormField.FieldInfo.SOURCE_AUTO_ENTITY, this); textField.setSize(40); - textField.setMaxlength(new Integer(60)); + textField.setMaxlength(Integer.valueOf(60)); this.setFieldInfo(textField); } else if ( "value".equals(modelField.getType()) @@ -550,7 +550,7 @@ || "email".equals(modelField.getType())) { ModelFormField.TextField textField = new ModelFormField.TextField(ModelFormField.FieldInfo.SOURCE_AUTO_ENTITY, this); textField.setSize(60); - textField.setMaxlength(new Integer(250)); + textField.setMaxlength(Integer.valueOf(250)); this.setFieldInfo(textField); } else if ( "floating-point".equals(modelField.getType()) || "currency-amount".equals(modelField.getType()) || "numeric".equals(modelField.getType())) { @@ -1252,7 +1252,7 @@ * @param i */ public void setPosition(int i) { - position = new Integer(i); + position = Integer.valueOf(i); } /** @@ -1418,26 +1418,26 @@ public static Map<String, Integer> fieldTypeByName = new HashMap<String, Integer>(); static { - fieldTypeByName.put("display", new Integer(1)); - fieldTypeByName.put("hyperlink", new Integer(2)); - fieldTypeByName.put("text", new Integer(3)); - fieldTypeByName.put("textarea", new Integer(4)); - fieldTypeByName.put("date-time", new Integer(5)); - fieldTypeByName.put("drop-down", new Integer(6)); - fieldTypeByName.put("check", new Integer(7)); - fieldTypeByName.put("radio", new Integer(8)); - fieldTypeByName.put("submit", new Integer(9)); - fieldTypeByName.put("reset", new Integer(10)); - fieldTypeByName.put("hidden", new Integer(11)); - fieldTypeByName.put("ignored", new Integer(12)); - fieldTypeByName.put("text-find", new Integer(13)); - fieldTypeByName.put("date-find", new Integer(14)); - fieldTypeByName.put("range-find", new Integer(15)); - fieldTypeByName.put("lookup", new Integer(16)); - fieldTypeByName.put("file", new Integer(17)); - fieldTypeByName.put("password", new Integer(18)); - fieldTypeByName.put("image", new Integer(19)); - fieldTypeByName.put("display-entity", new Integer(20)); + fieldTypeByName.put("display", Integer.valueOf(1)); + fieldTypeByName.put("hyperlink", Integer.valueOf(2)); + fieldTypeByName.put("text", Integer.valueOf(3)); + fieldTypeByName.put("textarea", Integer.valueOf(4)); + fieldTypeByName.put("date-time", Integer.valueOf(5)); + fieldTypeByName.put("drop-down", Integer.valueOf(6)); + fieldTypeByName.put("check", Integer.valueOf(7)); + fieldTypeByName.put("radio", Integer.valueOf(8)); + fieldTypeByName.put("submit", Integer.valueOf(9)); + fieldTypeByName.put("reset", Integer.valueOf(10)); + fieldTypeByName.put("hidden", Integer.valueOf(11)); + fieldTypeByName.put("ignored", Integer.valueOf(12)); + fieldTypeByName.put("text-find", Integer.valueOf(13)); + fieldTypeByName.put("date-find", Integer.valueOf(14)); + fieldTypeByName.put("range-find", Integer.valueOf(15)); + fieldTypeByName.put("lookup", Integer.valueOf(16)); + fieldTypeByName.put("file", Integer.valueOf(17)); + fieldTypeByName.put("password", Integer.valueOf(18)); + fieldTypeByName.put("image", Integer.valueOf(19)); + fieldTypeByName.put("display-entity", Integer.valueOf(20)); } protected int fieldType; @@ -2846,7 +2846,7 @@ public Boolean isAllChecked(Map<String, Object> context) { String allCheckedStr = this.allChecked.expandString(context); if (UtilValidate.isNotEmpty(allCheckedStr)) { - return new Boolean("true".equals(allCheckedStr)); + return Boolean.valueOf("true".equals(allCheckedStr)); } else { return null; } Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormWrapper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormWrapper.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormWrapper.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormWrapper.java Mon Jun 30 13:20:37 2008 @@ -133,7 +133,7 @@ * parameters Map instead of the value Map. */ public void setIsError(boolean isError) { - this.context.put("isError", new Boolean(isError)); + this.context.put("isError", Boolean.valueOf(isError)); } public boolean getIsError() { @@ -155,7 +155,7 @@ * @param useRequestParameters */ public void setUseRequestParameters(boolean useRequestParameters) { - this.context.put("useRequestParameters", new Boolean(useRequestParameters)); + this.context.put("useRequestParameters", Boolean.valueOf(useRequestParameters)); } public boolean getUseRequestParameters() { Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuWrapper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuWrapper.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuWrapper.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuWrapper.java Mon Jun 30 13:20:37 2008 @@ -129,7 +129,7 @@ * parameters Map instead of the value Map. */ public void setIsError(boolean isError) { - this.context.put("isError", new Boolean(isError)); + this.context.put("isError", Boolean.valueOf(isError)); } public boolean getIsError() { Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java Mon Jun 30 13:20:37 2008 @@ -618,7 +618,7 @@ public void renderContentBody(Appendable writer, Map<String, Object> context, ModelScreenWidget.Content content) throws IOException { Locale locale = UtilMisc.ensureLocale(context.get("locale")); - //Boolean nullThruDatesOnly = new Boolean(false); + //Boolean nullThruDatesOnly = Boolean.valueOf(false); String mimeTypeId = "text/html"; String expandedContentId = content.getContentId(context); String expandedDataResourceId = content.getDataResourceId(context); @@ -831,7 +831,7 @@ String mapKey = content.getAssocName(context); GenericValue view = null; try { - view = ContentWorker.getSubContentCache(delegator, contentIdTo, mapKey, userLogin, null, UtilDateTime.nowTimestamp(), new Boolean(false), null); + view = ContentWorker.getSubContentCache(delegator, contentIdTo, mapKey, userLogin, null, UtilDateTime.nowTimestamp(), Boolean.valueOf(false), null); } catch(GenericEntityException e) { throw new IOException("Originally a GenericEntityException. " + e.getMessage()); } Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java Mon Jun 30 13:20:37 2008 @@ -433,7 +433,7 @@ * @param i */ public void setPosition(int i) { - position = new Integer(i); + position = Integer.valueOf(i); } Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java Mon Jun 30 13:20:37 2008 @@ -130,7 +130,7 @@ } else { contextMs.put(entryName, item); } - contextMs.put("itemIndex", new Integer(itemIndex)); + contextMs.put("itemIndex", Integer.valueOf(itemIndex)); rowCount++; Iterator sectionIter = this.sectionList.iterator(); @@ -178,7 +178,7 @@ public void setViewSize(String val) { try { - Integer sz = new Integer(val); + Integer sz = Integer.valueOf(val); viewSize = sz.intValue(); } catch(NumberFormatException e) { viewSize = DEFAULT_PAGE_SIZE; @@ -239,7 +239,7 @@ viewIndex = 0; } } - context.put("viewIndex", new Integer(this.viewIndex)); + context.put("viewIndex", Integer.valueOf(this.viewIndex)); try { viewSize = ((Integer) context.get("viewSize")).intValue(); Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenRenderer.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenRenderer.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenRenderer.java Mon Jun 30 13:20:37 2008 @@ -220,7 +220,7 @@ context.put("https", https); } } - context.put("javaScriptEnabled", new Boolean(UtilHttp.isJavaScriptEnabled(request))); + context.put("javaScriptEnabled", Boolean.valueOf(UtilHttp.isJavaScriptEnabled(request))); // these ones are FreeMarker specific and will only work in FTL templates, mainly here for backward compatibility BeansWrapper wrapper = BeansWrapper.getDefaultInstance(); Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java?rev=672898&r1=672897&r2=672898&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java Mon Jun 30 13:20:37 2008 @@ -438,7 +438,7 @@ } else { newContext.putAll(val); } - newContext.put("currentNodeIndex", new Integer(nodeIndex)); + newContext.put("currentNodeIndex", Integer.valueOf(nodeIndex)); String targetEntityId = null; List targetNodeTrail = UtilGenerics.checkList(context.get("targetNodeTrail")); if (newDepth < targetNodeTrail.size()) { @@ -446,7 +446,7 @@ } if ((targetEntityId != null && targetEntityId .equals(thisEntityId)) || this.showPeers(newDepth, context)) { boolean lastNode = !nodeIter.hasNext(); - newContext.put("lastNode", new Boolean(lastNode)); + newContext.put("lastNode", Boolean.valueOf(lastNode)); node.renderNodeString(writer, newContext, treeStringRenderer, newDepth, lastNode); } } @@ -522,7 +522,7 @@ } } */ - nodeCount = new Long(this.subNodeValues.size()); + nodeCount = Long.valueOf(this.subNodeValues.size()); String pkName = this.getPkName(); String id = null; if (UtilValidate.isNotEmpty(this.entryName)) { @@ -546,7 +546,7 @@ } else if (nodeCount == null) { getChildren(context); if (subNodeValues != null) - nodeCount = new Long(subNodeValues.size()); + nodeCount = Long.valueOf(subNodeValues.size()); } if (nodeCount != null && nodeCount.intValue() > 0) |
Free forum by Nabble | Edit this page |