svn commit: r812328 - in /ofbiz/trunk/applications: marketing/src/org/ofbiz/marketing/tracking/ party/src/org/ofbiz/party/party/ product/src/org/ofbiz/product/image/ product/src/org/ofbiz/product/product/ product/src/org/ofbiz/shipment/thirdparty/ups/ ...

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

svn commit: r812328 - in /ofbiz/trunk/applications: marketing/src/org/ofbiz/marketing/tracking/ party/src/org/ofbiz/party/party/ product/src/org/ofbiz/product/image/ product/src/org/ofbiz/product/product/ product/src/org/ofbiz/shipment/thirdparty/ups/ ...

doogie-3
Author: doogie
Date: Tue Sep  8 02:48:09 2009
New Revision: 812328

URL: http://svn.apache.org/viewvc?rev=812328&view=rev
Log:
More generics fixing.

Modified:
    ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java
    ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java

Modified: ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java?rev=812328&r1=812327&r2=812328&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java (original)
+++ ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java Tue Sep  8 02:48:09 2009
@@ -19,8 +19,6 @@
 package org.ofbiz.marketing.tracking;
 
 import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.LinkedList;
 import java.util.List;
 
 import javax.servlet.http.Cookie;
@@ -28,6 +26,8 @@
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
 
+import javolution.util.FastList;
+
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilDateTime;
 import org.ofbiz.base.util.UtilMisc;
@@ -287,7 +287,7 @@
         String prodCatalogId = trackingCode.getString("prodCatalogId");
         if (prodCatalogId != null && prodCatalogId.length() > 0) {
             session.setAttribute("CURRENT_CATALOG_ID", prodCatalogId);
-            CategoryWorker.setTrail(request, new ArrayList());
+            CategoryWorker.setTrail(request, FastList.<String>newInstance());
         }
 
         // if forward/redirect is needed, do a response.sendRedirect and return null to tell the control servlet to not do any other requests/views
@@ -435,10 +435,10 @@
     }
 
     /** Makes a list of TrackingCodeOrder entities to be attached to the current order; called by the createOrder event; the values in the returned List will not have the orderId set */
-    public static List makeTrackingCodeOrders(HttpServletRequest request) {
+    public static List<GenericValue> makeTrackingCodeOrders(HttpServletRequest request) {
         GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
         java.sql.Timestamp nowStamp = UtilDateTime.nowTimestamp();
-        List trackingCodeOrders = new LinkedList();
+        List<GenericValue> trackingCodeOrders = FastList.newInstance();
 
         Cookie[] cookies = request.getCookies();
         Timestamp affiliateReferredTimeStamp = null;

Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java?rev=812328&r1=812327&r2=812328&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java Tue Sep  8 02:48:09 2009
@@ -32,6 +32,7 @@
 
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilDateTime;
+import org.ofbiz.base.util.UtilGenerics;
 import org.ofbiz.base.util.UtilMisc;
 import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.base.util.UtilValidate;
@@ -1095,7 +1096,7 @@
                 dynamicView.addAlias("PRSHP", "partyIdTo");
                 dynamicView.addAlias("PRSHP", "partyRelationshipTypeId");
                 dynamicView.addViewLink("PT", "PRSHP", Boolean.FALSE, ModelKeyMap.makeKeyMapList("partyId", "partyIdTo"));
-                List<String> ownerPartyIds = (List) context.get("ownerPartyIds");
+                List<String> ownerPartyIds = UtilGenerics.cast(context.get("ownerPartyIds"));
                 EntityCondition relationshipCond = null;
                 if (UtilValidate.isEmpty(ownerPartyIds)) {
                     String partyIdFrom = userLogin.getString("partyId");

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java?rev=812328&r1=812327&r2=812328&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java Tue Sep  8 02:48:09 2009
@@ -34,6 +34,7 @@
 
 import org.jdom.JDOMException;
 import org.ofbiz.base.util.Debug;
+import org.ofbiz.base.util.UtilGenerics;
 import org.ofbiz.base.util.UtilMisc;
 import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.base.util.string.FlexibleStringExpander;
@@ -88,7 +89,7 @@
         String imgPropertyFullPath = System.getProperty("ofbiz.home") + "/applications/product/config/ImageProperties.xml";
         resultXMLMap.putAll((Map<String, Object>) ImageTransform.getXMLValue(imgPropertyFullPath, locale));
         if (resultXMLMap.containsKey("responseMessage") && resultXMLMap.get("responseMessage").equals("success")) {
-            imgPropertyMap.putAll((Map<String, Map<String, String>>) resultXMLMap.get("xml"));
+            imgPropertyMap.putAll(UtilGenerics.<Map<String, Map<String, String>>>cast(resultXMLMap.get("xml")));
         } else {
             String errMsg = UtilProperties.getMessage(resource, "ScaleImage.unable_to_parse", locale) + " : ImageProperties.xml";
             Debug.logError(errMsg, module);

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java?rev=812328&r1=812327&r2=812328&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java Tue Sep  8 02:48:09 2009
@@ -35,6 +35,7 @@
 
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilDateTime;
+import org.ofbiz.base.util.UtilGenerics;
 import org.ofbiz.base.util.UtilHttp;
 import org.ofbiz.base.util.UtilMisc;
 import org.ofbiz.base.util.UtilProperties;
@@ -1063,7 +1064,7 @@
             Debug.logWarning("Session attribute productCompareList contains something other than the expected product list, overwriting.", module);
             compareList = FastList.newInstance();
         } else {
-            compareList = (List) compareListObj;
+            compareList = UtilGenerics.cast(compareListObj);
         }
         return compareList;
     }

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java?rev=812328&r1=812327&r2=812328&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java Tue Sep  8 02:48:09 2009
@@ -2985,7 +2985,7 @@
                 return ServiceUtil.returnFailure(excErrMsg);
             }
             Map<String,Object> upsResponse = handleUpsAlternateRatesInquireResponse(rateResponseDocument);
-            Map<String,BigDecimal> upsRateCodeMap = (Map) upsResponse.get("upsRateCodeMap");
+            Map<String,BigDecimal> upsRateCodeMap = UtilGenerics.cast(upsResponse.get("upsRateCodeMap"));
             GenericValue carrierShipmentMethod = null;
             // Filtering out rates of shipping methods which are not configured in ProductStoreShipmentMeth entity.
             try {

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java?rev=812328&r1=812327&r2=812328&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java Tue Sep  8 02:48:09 2009
@@ -309,7 +309,7 @@
         this.updateProduct();
 
         // Update the shipment status to Picked, this will trigger createInvoicesFromShipment and finally a invoice will be created
-        Map updateShipmentCtx = FastMap.newInstance();
+        Map<String, Object> updateShipmentCtx = FastMap.newInstance();
         updateShipmentCtx.put("shipmentId", shipmentId);
         updateShipmentCtx.put("statusId", "SHIPMENT_PICKED");
         updateShipmentCtx.put("userLogin", this.getUserLogin());
@@ -429,7 +429,7 @@
     protected void updateProduct() throws GeneralException {
         for (VerifyPickSessionRow pickRow : this.getPickRows()) {
             if (UtilValidate.isNotEmpty(pickRow.getOriginGeoId())) {
-                Map updateProductCtx = FastMap.newInstance();
+                Map<String, Object> updateProductCtx = FastMap.newInstance();
                 updateProductCtx.put("originGeoId", pickRow.getOriginGeoId());
                 updateProductCtx.put("productId", pickRow.getProductId());
                 updateProductCtx.put("userLogin", this.getUserLogin());
@@ -440,4 +440,4 @@
             }
         }
     }
-}
\ No newline at end of file
+}