svn commit: r682253 - in /ofbiz/trunk/applications/content/src/org/ofbiz/content: ./ content/ data/ openoffice/ search/ survey/ webapp/ftl/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r682253 - in /ofbiz/trunk/applications/content/src/org/ofbiz/content: ./ content/ data/ openoffice/ search/ survey/ webapp/ftl/

doogie-3
Author: doogie
Date: Sun Aug  3 21:28:23 2008
New Revision: 682253

URL: http://svn.apache.org/viewvc?rev=682253&view=rev
Log:
Avoid creating new base object wrappers; instead use valueOf.

Modified:
    ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementEvents.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/content/PermissionRecorder.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeServices.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeWorker.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchServices.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchWorker.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LoopSubContentTransform.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementEvents.java?rev=682253&r1=682252&r2=682253&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementEvents.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementEvents.java Sun Aug  3 21:28:23 2008
@@ -93,7 +93,7 @@
                 String idxStr = idxAndContentId.substring(0, pos);
                 int idx = Integer.parseInt(idxStr);
                 String contentId = idxAndContentId.substring(pos + 1);
-                contentIdLookup.put(contentId, new Integer(idx));
+                contentIdLookup.put(contentId, Integer.valueOf(idx));
             }
         }
 */

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java?rev=682253&r1=682252&r2=682253&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java Sun Aug  3 21:28:23 2008
@@ -901,7 +901,7 @@
         String contentIdTo = (String)context.get("contentIdTo");
         Integer seqInc = (Integer)context.get("seqInc");
         if (seqInc == null)
-            seqInc = new Integer(100);
+            seqInc = Integer.valueOf(100);
         int seqIncrement = seqInc.intValue();
         List typeList = (List)context.get("typeList");
         if (typeList == null) typeList = FastList.newInstance();
@@ -936,7 +936,7 @@
                                  try {
                                      GenericValue prevValue = (GenericValue)listFiltered.get(i-1);
                                      Long prevSeqNum = (Long)prevValue.get("sequenceNum");
-                                     prevValue.put("sequenceNum", new Long(seqNum));
+                                     prevValue.put("sequenceNum", Long.valueOf(seqNum));
                                      prevValue.store();
                                      contentAssoc.put("sequenceNum", prevSeqNum);
                                      contentAssoc.store();
@@ -948,20 +948,20 @@
                              if (i < listFiltered.size()) {
                                  // Swap with next entry
                                  GenericValue nextValue = (GenericValue)listFiltered.get(i+1);
-                                 nextValue.put("sequenceNum", new Long(seqNum));
+                                 nextValue.put("sequenceNum", Long.valueOf(seqNum));
                                  nextValue.store();
                                  seqNum += seqIncrement;
-                                 contentAssoc.put("sequenceNum", new Long(seqNum));
+                                 contentAssoc.put("sequenceNum", Long.valueOf(seqNum));
                                  contentAssoc.store();
                                  i++; // skip next one
                              }
                          }
                      } else {
-                         contentAssoc.put("sequenceNum", new Long(seqNum));
+                         contentAssoc.put("sequenceNum", Long.valueOf(seqNum));
                          contentAssoc.store();
                      }
                  } else {
-                     contentAssoc.put("sequenceNum", new Long(seqNum));
+                     contentAssoc.put("sequenceNum", Long.valueOf(seqNum));
                      contentAssoc.store();
                  }
                  seqNum += seqIncrement;
@@ -1022,7 +1022,7 @@
                 serviceIn.put("userLogin", userLogin);
                 serviceIn.put("contentIdTo", contentId);
                 serviceIn.put("contentAssocTypeId", "SUB_CONTENT");
-                serviceIn.put("sequenceNum", new Long(50));
+                serviceIn.put("sequenceNum", Long.valueOf(50));
                 try {
                     Map thisResult = dispatcher.runSync("persistContentAndAssoc", serviceIn);
                 } catch(ServiceAuthException e) {
@@ -1052,7 +1052,7 @@
         String startContentId = (String)context.get("contentId");
         try {
             int leafCount = ContentManagementWorker.updateStatsTopDown(delegator, startContentId, typeList);
-            result.put("leafCount", new Integer(leafCount));
+            result.put("leafCount", Integer.valueOf(leafCount));
         } catch(GenericEntityException e) {
             Debug.logError(e, module);
             return ServiceUtil.returnError(e.toString());            
@@ -1109,7 +1109,7 @@
                 else
                     branchCount += 1;
                 // For the level just above only, update the branch count
-                contentTo.put("childBranchCount", new Integer(branchCount));
+                contentTo.put("childBranchCount", Integer.valueOf(branchCount));
                 
                 // Start the updating of leaf counts above
                 ContentManagementWorker.updateStatsBottomUp(delegator, subContentId, typeList, subLeafCount);
@@ -1380,11 +1380,11 @@
             }
             Long leafCount = (Long)content.get("childLeafCount");
             if (leafCount == null) {
-                content.set("childLeafCount", new Long(0));
+                content.set("childLeafCount", Long.valueOf(0));
             }
             Long branchCount = (Long)content.get("childBranchCount");
             if (branchCount == null) {
-                content.set("childBranchCount", new Long(0));
+                content.set("childBranchCount", Long.valueOf(0));
             }
             
             //content.store();
@@ -1406,7 +1406,7 @@
                 }
                 Long leafCount = (Long)content.get("childLeafCount");
                 if (leafCount == null) {
-                    leafCount = new Long(0);
+                    leafCount = Long.valueOf(0);
                 }
                 int changeLeafCount = leafCount.intValue() + 1;
                 int changeBranchCount = 1;
@@ -1432,7 +1432,7 @@
                 }
                 Long leafCount = (Long)content.get("childLeafCount");
                 if (leafCount == null) {
-                    leafCount = new Long(0);
+                    leafCount = Long.valueOf(0);
                 }
                 int changeLeafCount = -1 * leafCount.intValue() - 1;
                 int changeBranchCount = -1;
@@ -1552,7 +1552,7 @@
         String productId = (String) context.get("productId");
         Integer qty = (Integer) context.get("quantity");
         if (qty == null) {
-            qty = new Integer(1);
+            qty = Integer.valueOf(1);
         }
         
         Timestamp orderCreatedDate = (Timestamp) context.get("orderCreatedDate");
@@ -1580,7 +1580,7 @@
             return ServiceUtil.returnError(msg);
         }
         Long useTime = (Long)productContent.get("useTime");
-        Integer newUseTime = new Integer(useTime.intValue() * qty.intValue());
+        Integer newUseTime = Integer.valueOf(useTime.intValue() * qty.intValue());
         context.put("useTime", newUseTime);
         context.put("useTimeUomId", productContent.get("useTimeUomId"));
         context.put("useRoleTypeId", productContent.get("useRoleTypeId"));
@@ -1630,7 +1630,7 @@
                 List productContentListFiltered = EntityUtil.filterByDate(productContentList);
                 if (productContentListFiltered.size() > 0) {
                     context.put("productId", productId);
-                    context.put("quantity", new Integer(qty.intValue()));
+                    context.put("quantity", Integer.valueOf(qty.intValue()));
                     Map ctx = subscriptionModel.makeValid(context, "IN");
                     Map thisResult = dispatcher.runSync("updateContentSubscriptionByProduct", ctx);  
                 }

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java?rev=682253&r1=682252&r2=682253&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java Sun Aug  3 21:28:23 2008
@@ -767,8 +767,8 @@
         // If no children, count this as a leaf
         if (subLeafCount == 0)
             subLeafCount = 1;
-        thisContent.put("childBranchCount", new Long(listFiltered.size()));
-        thisContent.put("childLeafCount", new Long(subLeafCount));
+        thisContent.put("childBranchCount", Long.valueOf(listFiltered.size()));
+        thisContent.put("childLeafCount", Long.valueOf(subLeafCount));
         thisContent.store();
         
         return subLeafCount;
@@ -800,7 +800,7 @@
             if (leafCount != null) {
                 intLeafCount = leafCount.intValue();
                 }
-                contentTo.set("childLeafCount", new Long(intLeafCount + leafChangeAmount));
+                contentTo.set("childLeafCount", Long.valueOf(intLeafCount + leafChangeAmount));
                 
                 if (branchChangeAmount != 0) {
                  int intBranchCount = 0;
@@ -808,7 +808,7 @@
              if (branchCount != null) {
                  intBranchCount = branchCount.intValue();
              }
-                 contentTo.set("childBranchCount", new Long(intBranchCount + branchChangeAmount));
+                 contentTo.set("childBranchCount", Long.valueOf(intBranchCount + branchChangeAmount));
                 }
                 contentTo.store();
                 updateStatsBottomUp(delegator, contentIdTo, typeList, 0, leafChangeAmount);

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java?rev=682253&r1=682252&r2=682253&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java Sun Aug  3 21:28:23 2008
@@ -652,9 +652,9 @@
             if (isPick) {
                     Integer count = (Integer) currentNode.get("count");
                     if (count == null) {
-                        count = new Integer(1);
+                        count = Integer.valueOf(1);
                     } else {
-                        count = new Integer(count.intValue() + 1);
+                        count = Integer.valueOf(count.intValue() + 1);
                     }
                     currentNode.put("count", count);
             }
@@ -1176,7 +1176,7 @@
             }
         }
         ctx.put("globalNodeTrail", passedGlobalNodeTrail);
-        ctx.put("indent", new Integer(sz));
+        ctx.put("indent", Integer.valueOf(sz));
         //if (Debug.infoOn()) Debug.logInfo("getCurrentContent, currentContent:" + currentContent, "");
         return currentContent;
     }
@@ -1269,13 +1269,13 @@
         }
         context.put("typeAncestry", contentTypeAncestry);
         boolean isReturnBefore = checkReturnWhen(context, (String)whenMap.get("returnBeforePickWhen"));
-        trailNode.put("isReturnBefore", new Boolean(isReturnBefore));
+        trailNode.put("isReturnBefore", Boolean.valueOf(isReturnBefore));
         boolean isPick = checkWhen(context, (String)whenMap.get("pickWhen"));
-        trailNode.put("isPick", new Boolean(isPick));
+        trailNode.put("isPick", Boolean.valueOf(isPick));
         boolean isFollow = checkWhen(context, (String)whenMap.get("followWhen"));
-        trailNode.put("isFollow", new Boolean(isFollow));
+        trailNode.put("isFollow", Boolean.valueOf(isFollow));
         boolean isReturnAfter = checkReturnWhen(context, (String)whenMap.get("returnAfterPickWhen"));
-        trailNode.put("isReturnAfter", new Boolean(isReturnAfter));
+        trailNode.put("isReturnAfter", Boolean.valueOf(isReturnAfter));
         trailNode.put("checked", Boolean.TRUE);
 
     }

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/PermissionRecorder.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/PermissionRecorder.java?rev=682253&r1=682252&r2=682253&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/PermissionRecorder.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/PermissionRecorder.java Sun Aug  3 21:28:23 2008
@@ -197,11 +197,11 @@
     public void record(GenericValue purposeOp, boolean targetOpCond, boolean purposeCond, boolean statusCond, boolean privilegeCond, boolean roleCond) {
 
         Map map = UtilMisc.makeMapWritable(purposeOp);
-        map.put("contentOperationIdCond", new Boolean(targetOpCond));
-        map.put("contentPurposeTypeIdCond", new Boolean(purposeCond));
-        map.put("statusIdCond", new Boolean(statusCond));
-        map.put("privilegeEnumIdCond", new Boolean(privilegeCond));
-        map.put("roleTypeIdCond", new Boolean(roleCond));
+        map.put("contentOperationIdCond", Boolean.valueOf(targetOpCond));
+        map.put("contentPurposeTypeIdCond", Boolean.valueOf(purposeCond));
+        map.put("statusIdCond", Boolean.valueOf(statusCond));
+        map.put("privilegeEnumIdCond", Boolean.valueOf(privilegeCond));
+        map.put("roleTypeIdCond", Boolean.valueOf(roleCond));
         map.put("contentId", currentContentId);
         ((List)currentContentMap.get("checkResultList")).add(map);
             //if (Debug.infoOn()) Debug.logInfo("record, map:" + map, module);

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java?rev=682253&r1=682252&r2=682253&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java Sun Aug  3 21:28:23 2008
@@ -451,7 +451,7 @@
                 if (objSequenceNum instanceof String) {
                     Long sequenceNum = null;
                     try {
-                        sequenceNum = new Long((String)objSequenceNum);
+                        sequenceNum = Long.valueOf((String)objSequenceNum);
                     } catch(NumberFormatException e) {}
                     passedParams.put("caSequenceNum", sequenceNum);
                 }

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java?rev=682253&r1=682252&r2=682253&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java Sun Aug  3 21:28:23 2008
@@ -102,7 +102,7 @@
             matchValue = null;
         }
         List categoryValues = delegator.findByAndCache("DataCategory", UtilMisc.toMap("parentCategoryId", matchValue));
-        categoryNode.put("count", new Integer(categoryValues.size()));
+        categoryNode.put("count", Integer.valueOf(categoryValues.size()));
         List subCategoryIds = FastList.newInstance();
         for (int i = 0; i < categoryValues.size(); i++) {
             GenericValue category = (GenericValue) categoryValues.get(i);
@@ -520,7 +520,7 @@
             File[] subs = parent.listFiles();
             for (int i = 0; i < subs.length; i++) {
                 if (subs[i].isDirectory()) {
-                    dirMap.put(new Long(subs[0].lastModified()), subs[i]);
+                    dirMap.put(Long.valueOf(subs[0].lastModified()), subs[i]);
                 }
             }
         } else {
@@ -993,7 +993,7 @@
             }
 
             byte[] bytes = text.getBytes();
-            return UtilMisc.toMap("stream", new ByteArrayInputStream(bytes), "length", new Integer(bytes.length));
+            return UtilMisc.toMap("stream", new ByteArrayInputStream(bytes), "length", Integer.valueOf(bytes.length));
 
         // object (binary) data
         } else if (dataResourceTypeId.endsWith("_OBJECT")) {
@@ -1040,14 +1040,14 @@
                 throw new GeneralException("Unsupported OBJECT type [" + dataResourceTypeId + "]; cannot stream");
             }
 
-            return UtilMisc.toMap("stream", new ByteArrayInputStream(bytes), "length", new Long(bytes.length));
+            return UtilMisc.toMap("stream", new ByteArrayInputStream(bytes), "length", Long.valueOf(bytes.length));
 
         // file data
         } else if (dataResourceTypeId.endsWith("_FILE") || dataResourceTypeId.endsWith("_FILE_BIN")) {
             String objectInfo = dataResource.getString("objectInfo");
             if (UtilValidate.isNotEmpty(objectInfo)) {
                 File file = DataResourceWorker.getContentFile(dataResourceTypeId, objectInfo, contextRoot);
-                return UtilMisc.toMap("stream", new FileInputStream(file), "length", new Long(file.length()));                
+                return UtilMisc.toMap("stream", new FileInputStream(file), "length", Long.valueOf(file.length()));                
             } else {
                 throw new GeneralException("No objectInfo found for FILE type [" + dataResourceTypeId + "]; cannot stream");
             }
@@ -1067,7 +1067,7 @@
                 }
 
                 URLConnection con = url.openConnection();
-                return UtilMisc.toMap("stream", con.getInputStream(), "length", new Long(con.getContentLength()));                
+                return UtilMisc.toMap("stream", con.getInputStream(), "length", Long.valueOf(con.getContentLength()));                
             } else {
                 throw new GeneralException("No objectInfo found for URL_RESOURCE type; cannot stream");
             }

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeServices.java?rev=682253&r1=682252&r2=682253&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeServices.java Sun Aug  3 21:28:23 2008
@@ -310,7 +310,7 @@
             // Setting the flag for hidding the open document
             propertyvalue[ 0 ] = new PropertyValue();
             propertyvalue[ 0 ].Name = "Hidden";
-            propertyvalue[ 0 ].Value = new Boolean(true);
+            propertyvalue[ 0 ].Value = Boolean.valueOf(true);
             //TODO: Hardcoding opening word documents -- this will need to change.
             //propertyvalue[ 1 ] = new PropertyValue();
             //propertyvalue[ 1 ].Name = "FilterName";
@@ -344,7 +344,7 @@
             // Setting the flag for overwriting
             propertyvalue[ 0 ] = new PropertyValue();
             propertyvalue[ 0 ].Name = "Overwrite";
-            propertyvalue[ 0 ].Value = new Boolean(true);
+            propertyvalue[ 0 ].Value = Boolean.valueOf(true);
             // Setting the filter name
             //propertyvalue[ 1 ] = new PropertyValue();
             //propertyvalue[ 1 ].Name = "FilterName";

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeWorker.java?rev=682253&r1=682252&r2=682253&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeWorker.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeWorker.java Sun Aug  3 21:28:23 2008
@@ -187,7 +187,7 @@
         // Setting the flag for hidding the open document
         propertyvalue[ 0 ] = new PropertyValue();
         propertyvalue[ 0 ].Name = "Hidden";
-        propertyvalue[ 0 ].Value = new Boolean(false);
+        propertyvalue[ 0 ].Value = Boolean.valueOf(false);
 
         propertyvalue[ 1 ] = new PropertyValue();
         propertyvalue[ 1 ].Name = "UpdateDocMode";
@@ -206,7 +206,7 @@
         // Setting the flag for overwriting
         propertyvalue[ 0 ] = new PropertyValue();
         propertyvalue[ 0 ].Name = "Overwrite";
-        propertyvalue[ 0 ].Value = new Boolean(true);
+        propertyvalue[ 0 ].Value = Boolean.valueOf(true);
         // Setting the filter name
         // Preparing properties for converting the document
         String filterName = getFilterNameFromMimeType(outputMimeType);

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchServices.java?rev=682253&r1=682252&r2=682253&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchServices.java Sun Aug  3 21:28:23 2008
@@ -49,7 +49,7 @@
         if (Debug.infoOn()) Debug.logInfo("in indexTree, siteId:" + siteId, module);
         List badIndexList = FastList.newInstance();
         envContext.put("badIndexList", badIndexList);
-        envContext.put("goodIndexCount", new Integer(0));
+        envContext.put("goodIndexCount", Integer.valueOf(0));
 
         Map results;
         try {

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchWorker.java?rev=682253&r1=682252&r2=682253&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchWorker.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchWorker.java Sun Aug  3 21:28:23 2008
@@ -208,7 +208,7 @@
                 writer.addDocument(doc);
                 Integer goodIndexCount = (Integer)context.get("goodIndexCount");
                 int newCount = goodIndexCount.intValue() + 1;
-                Integer newIndexCount = new Integer(newCount);
+                Integer newIndexCount = Integer.valueOf(newCount);
                 context.put("goodIndexCount", newIndexCount);
             }
             /*

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java?rev=682253&r1=682252&r2=682253&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java Sun Aug  3 21:28:23 2008
@@ -153,10 +153,10 @@
 
                 Long sequenceNum = null;
                 if (tabPage != null && tabOrder != null) {
-                    sequenceNum = new Long(tabPage.intValue() * 1000 + tabOrder.intValue());
+                    sequenceNum = Long.valueOf(tabPage.intValue() * 1000 + tabOrder.intValue());
                     Debug.logInfo("tabPage=" + tabPage + ", tabOrder=" + tabOrder + ", sequenceNum=" + sequenceNum, module);
                 } else if (fieldPositions.length > 0) {
-                    sequenceNum = new Long((long) fieldPage * 10000 + (long) fieldLly * 1000 + (long) fieldLlx);
+                    sequenceNum = Long.valueOf((long) fieldPage * 10000 + (long) fieldLly * 1000 + (long) fieldLlx);
                     Debug.logInfo("fieldPage=" + fieldPage + ", fieldLlx=" + fieldLlx + ", fieldLly=" + fieldLly + ", fieldUrx=" + fieldUrx + ", fieldUry=" + fieldUry + ", sequenceNum=" + sequenceNum, module);
                 }
                 

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java?rev=682253&r1=682252&r2=682253&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java Sun Aug  3 21:28:23 2008
@@ -468,7 +468,7 @@
             Map thisResult = getOptionResult(question);
             if (thisResult != null) {
                 Long questionTotal = (Long) thisResult.remove("_total");
-                if (questionTotal == null) questionTotal = new Long(0);
+                if (questionTotal == null) questionTotal = Long.valueOf(0);
                 // set the total responses
                 resultMap.put("_total", questionTotal);
 
@@ -478,8 +478,8 @@
                     Map optMap = FastMap.newInstance();
                     String optId = (String) i.next();
                     Long optTotal = (Long) thisResult.get(optId);
-                    if (optTotal == null) optTotal = new Long(0);
-                    Long percent = new Long((long)(((double)optTotal.longValue() / (double)questionTotal.longValue()) * 100));
+                    if (optTotal == null) optTotal = Long.valueOf(0);
+                    Long percent = Long.valueOf((long)(((double)optTotal.longValue() / (double)questionTotal.longValue()) * 100));
                     optMap.put("_total", optTotal);
                     optMap.put("_percent", percent);
                     resultMap.put(optId, optMap);
@@ -491,36 +491,36 @@
             long yesPercent = thisResult[1] > 0 ? (long)(((double)thisResult[1] / (double)thisResult[0]) * 100) : 0;
             long noPercent = thisResult[2] > 0 ? (long)(((double)thisResult[2] / (double)thisResult[0]) * 100) : 0;
 
-            resultMap.put("_total", new Long(thisResult[0]));
-            resultMap.put("_yes_total", new Long(thisResult[1]));
-            resultMap.put("_no_total", new Long(thisResult[2]));
-            resultMap.put("_yes_percent", new Long(yesPercent));
-            resultMap.put("_no_percent", new Long(noPercent));
+            resultMap.put("_total", Long.valueOf(thisResult[0]));
+            resultMap.put("_yes_total", Long.valueOf(thisResult[1]));
+            resultMap.put("_no_total", Long.valueOf(thisResult[2]));
+            resultMap.put("_yes_percent", Long.valueOf(yesPercent));
+            resultMap.put("_no_percent", Long.valueOf(noPercent));
             resultMap.put("_a_type", "boolean");
         } else if ("NUMBER_LONG".equals(questionType)) {
             double[] thisResult = getNumberResult(question, 1);
-            resultMap.put("_total", new Long((long)thisResult[0]));
-            resultMap.put("_tally", new Long((long)thisResult[1]));
-            resultMap.put("_average", new Long((long)thisResult[2]));
+            resultMap.put("_total", Long.valueOf((long)thisResult[0]));
+            resultMap.put("_tally", Long.valueOf((long)thisResult[1]));
+            resultMap.put("_average", Long.valueOf((long)thisResult[2]));
             resultMap.put("_a_type", "long");
         } else if ("NUMBER_CURRENCY".equals(questionType)) {
             double[] thisResult = getNumberResult(question, 2);
-            resultMap.put("_total", new Long((long)thisResult[0]));
-            resultMap.put("_tally", new Double(thisResult[1]));
-            resultMap.put("_average", new Double(thisResult[2]));
+            resultMap.put("_total", Long.valueOf((long)thisResult[0]));
+            resultMap.put("_tally", Double.valueOf(thisResult[1]));
+            resultMap.put("_average", Double.valueOf(thisResult[2]));
             resultMap.put("_a_type", "double");
         } else if ("NUMBER_FLOAT".equals(questionType)) {
             double[] thisResult = getNumberResult(question, 3);
-            resultMap.put("_total", new Long((long)thisResult[0]));
-            resultMap.put("_tally", new Double(thisResult[1]));
-            resultMap.put("_average", new Double(thisResult[2]));
+            resultMap.put("_total", Long.valueOf((long)thisResult[0]));
+            resultMap.put("_tally", Double.valueOf(thisResult[1]));
+            resultMap.put("_average", Double.valueOf(thisResult[2]));
             resultMap.put("_a_type", "double");
         } else if ("SEPERATOR_LINE".equals(questionType) || "SEPERATOR_TEXT".equals(questionType)) {
             // not really a question; ingore completely
             return null;
         } else {
             // default is text
-            resultMap.put("_total", new Long(getTextResult(question)));
+            resultMap.put("_total", Long.valueOf(getTextResult(question)));
             resultMap.put("_a_type", "text");
         }
 
@@ -674,9 +674,9 @@
                     String optionId = value.getString("surveyOptionSeqId");
                     Long optCount = (Long) result.remove(optionId);
                     if (optCount == null) {
-                        optCount = new Long(1);
+                        optCount = Long.valueOf(1);
                     } else {
-                        optCount = new Long(1 + optCount.longValue());
+                        optCount = Long.valueOf(1 + optCount.longValue());
                     }
                     result.put(optionId, optCount);
                     total++; // increment the count
@@ -703,7 +703,7 @@
             }
         }
 
-        result.put("_total", new Long(total));
+        result.put("_total", Long.valueOf(total));
         return result;
     }
 

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java?rev=682253&r1=682252&r2=682253&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java Sun Aug  3 21:28:23 2008
@@ -261,7 +261,7 @@
                     ctx.put("nodeTrailCsv", csvTrail);
                     //if (Debug.infoOn()) Debug.logInfo("prepCtx, csvTrail(2):" + csvTrail, "");
                     int indentSz = globalNodeTrail.size();
-                    ctx.put("indent", new Integer(indentSz));
+                    ctx.put("indent", Integer.valueOf(indentSz));
 
                     ctx.put("subDataResourceTypeId", subDataResourceTypeId);
                     ctx.put("mimeTypeId", mimeTypeId);
@@ -269,7 +269,7 @@
                     ctx.put("content", view);
 
                     env.setVariable("subDataResourceTypeId", FreeMarkerWorker.autoWrap(subDataResourceTypeId, env));
-                    env.setVariable("indent", FreeMarkerWorker.autoWrap(new Integer(indentSz), env));
+                    env.setVariable("indent", FreeMarkerWorker.autoWrap(Integer.valueOf(indentSz), env));
                     env.setVariable("nodeTrailCsv", FreeMarkerWorker.autoWrap(csvTrail, env));
                     env.setVariable("globalNodeTrail", FreeMarkerWorker.autoWrap(globalNodeTrail, env));
                     env.setVariable("content", FreeMarkerWorker.autoWrap(view, env));

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LoopSubContentTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LoopSubContentTransform.java?rev=682253&r1=682252&r2=682253&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LoopSubContentTransform.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LoopSubContentTransform.java Sun Aug  3 21:28:23 2008
@@ -72,7 +72,7 @@
     public static boolean prepCtx(GenericDelegator delegator, Map ctx) {
         List lst = (List) ctx.get("entityList");
         Integer idx = (Integer) ctx.get("entityIndex");
-        if (idx == null) idx = new Integer(0);
+        if (idx == null) idx = Integer.valueOf(0);
         int i = idx.intValue();
         if (i >= lst.size()) {
             return false;
@@ -123,7 +123,7 @@
             ctx.put("textData", null);
         }
         ctx.put("content", subContentDataResourceView);
-        ctx.put("entityIndex", new Integer(i + 1));
+        ctx.put("entityIndex", Integer.valueOf(i + 1));
         ctx.put("subContentId", subContentIdSub);
         ctx.put("drDataResourceId", dataResourceId);
         ctx.put("mimeTypeId", mimeTypeId);
@@ -185,7 +185,7 @@
             }
 
             public int onStart() throws TemplateModelException, IOException {
-                templateCtx.put("entityIndex", new Integer(0));
+                templateCtx.put("entityIndex", Integer.valueOf(0));
                 boolean inProgress = prepCtx(delegator, templateCtx);
                 if (inProgress) {
                     return TransformControl.EVALUATE_BODY;

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java?rev=682253&r1=682252&r2=682253&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java Sun Aug  3 21:28:23 2008
@@ -271,7 +271,7 @@
                 }
     //if (Debug.infoOn()) Debug.logInfo("populateContext, globalNodeTrail(1b):" + FreeMarkerWorker.nodeTrailToCsv(globalNodeTrail), "");
                 int indentSz = globalNodeTrail.size();
-                envWrap("indent", new Integer(indentSz));
+                envWrap("indent", Integer.valueOf(indentSz));
                 String trailCsv = ContentWorker.nodeTrailToCsv(globalNodeTrail);
                 //if (Debug.infoOn()) Debug.logInfo("in TraverseSubContentCache, populateCtx, trailCsv(2):" + trailCsv , module);
                 envWrap("nodeTrailCsv", trailCsv);

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java?rev=682253&r1=682252&r2=682253&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java Sun Aug  3 21:28:23 2008
@@ -101,7 +101,7 @@
         final LocalDispatcher dispatcher = (LocalDispatcher) FreeMarkerWorker.getWrappedObject("dispatcher", env);
         //final GenericValue userLogin = (GenericValue) FreeMarkerWorker.getWrappedObject("userLogin", env);
         GenericValue view = (GenericValue) FreeMarkerWorker.getWrappedObject("subContentDataResourceView", env);
-        final Integer indent = (templateCtx.get("indent") == null) ? new Integer(0) : (Integer)templateCtx.get("indent");
+        final Integer indent = (templateCtx.get("indent") == null) ? Integer.valueOf(0) : (Integer)templateCtx.get("indent");
       
         String contentId = (String)templateCtx.get("contentId");
         String subContentId = (String)templateCtx.get("subContentId");
@@ -186,7 +186,7 @@
                 ContentWorker.traceNodeTrail("2",nodeTrail);
                 nodeTrail.add(rootNode);
                 boolean isPick = checkWhen(subContentDataResourceView, (String)traverseContext.get("contentAssocTypeId"));
-                rootNode.put("isPick", new Boolean(isPick));
+                rootNode.put("isPick", Boolean.valueOf(isPick));
                 if (!isPick) {
                     ContentWorker.traceNodeTrail("3",nodeTrail);
                     isPick = ContentWorker.traverseSubContent(traverseContext);
@@ -312,7 +312,7 @@
                 String pickWhen = (String)whenMap.get("pickWhen");
                 List nodeTrail = (List)traverseContext.get("nodeTrail");
                 int indentSz = indent.intValue() + nodeTrail.size();
-                assocContext.put("indentObj", new Integer(indentSz));
+                assocContext.put("indentObj", Integer.valueOf(indentSz));
                 isPick = ContentWorker.checkWhen(assocContext, (String)whenMap.get("pickWhen"));
                 return isPick;
            }
@@ -329,7 +329,7 @@
                 templateContext.put("subContentId", contentId);
                 templateContext.put("subContentDataResourceView", null);
                 int indentSz = indent.intValue() + nodeTrail.size();
-                templateContext.put("indent", new Integer(indentSz));
+                templateContext.put("indent", Integer.valueOf(indentSz));
                 if (sz >= 2) {
                     Map parentNode = (Map)nodeTrail.get(sz - 2);
                     GenericValue parentContent = (GenericValue)parentNode.get("value");