|
Author: jleroux
Date: Fri Sep 9 12:32:28 2011 New Revision: 1167132 URL: http://svn.apache.org/viewvc?rev=1167132&view=rev Log: A patch from Paul Foxworthy "Generic class instantiations with incorrect type parameters" https://issues.apache.org/jira/browse/OFBIZ-4387 Some variables are declared as Map<String, String> but assigned collections where not all values are strings. These statements will not compile with some Java compilers. Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java?rev=1167132&r1=1167131&r2=1167132&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java Fri Sep 9 12:32:28 2011 @@ -314,7 +314,7 @@ public class ProductSearchEvents { pfa.create(); numAdded++; } - Map<String, String> messageMap = UtilMisc.toMap("numAdded", Integer.valueOf(numAdded), "productFeatureId", productFeatureId); + Map<String, Object> messageMap = UtilMisc.toMap("numAdded", Integer.valueOf(numAdded), "productFeatureId", productFeatureId); String eventMsg = UtilProperties.getMessage(resource, "productSearchEvents.added_param_features", messageMap, locale) + "."; request.setAttribute("_EVENT_MESSAGE_", eventMsg); eli.close(); @@ -364,7 +364,7 @@ public class ProductSearchEvents { String productId = searchResultView.getString("mainProductId"); numRemoved += delegator.removeByAnd("ProductFeatureAppl", UtilMisc.toMap("productId", productId, "productFeatureId", productFeatureId)); } - Map<String, String> messageMap = UtilMisc.toMap("numRemoved", Integer.valueOf(numRemoved), "productFeatureId", productFeatureId); + Map<String, Object> messageMap = UtilMisc.toMap("numRemoved", Integer.valueOf(numRemoved), "productFeatureId", productFeatureId); String eventMsg = UtilProperties.getMessage(resource, "productSearchEvents.removed_param_features", messageMap, locale) + "."; request.setAttribute("_EVENT_MESSAGE_", eventMsg); eli.close(); Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java?rev=1167132&r1=1167131&r2=1167132&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java Fri Sep 9 12:32:28 2011 @@ -1030,7 +1030,7 @@ public class ShipmentServices { // TODO: This may not need to be done asynchronously. The reason it's done that way right now is that calling it synchronously means that // if we can't confirm a single shipment, then all shipment route segments in a multi-form are rolled back. try { - Map<String, String> input = UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId, "userLogin", userLogin); + Map<String, Object> input = UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId, "userLogin", userLogin); // for DHL, we just need to confirm the shipment to get the label. Other carriers may have more elaborate requirements. if (carrierPartyId.equals("DHL")) { dispatcher.runAsync("dhlShipmentConfirm", input); |
| Free forum by Nabble | Edit this page |
