Is there actually a reason to have a null key for this hash map?
Usually part of the reason we want to use the FastMap is because it
doesn't allow null keys, as generally null keys mean something is
messed up...
-David
On Jan 29, 2009, at 3:06 AM, [email protected] wrote:
Author: bibryam
Date: Thu Jan 29 10:06:13 2009
New Revision: 738810
URL: http://svn.apache.org/viewvc?rev=738810&view=rev
Log:
FastMap doesn't permit null keys, so replaced it with HashMap
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/
ShoppingCartServices.java
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/
shoppingcart/ShoppingCartServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java?rev=738810&r1=738809&r2=738810&view=diff
=
=
=
=
=
=
=
=
======================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/
ShoppingCartServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/
ShoppingCartServices.java Thu Jan 29 10:06:13 2009
@@ -21,6 +21,7 @@
import java.math.BigDecimal;
import java.math.MathContext;
import java.sql.Timestamp;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
@@ -611,7 +612,7 @@
// Convert the quote adjustment to order header adjustments
and
// put them in a map: the key/values pairs are
quoteItemSeqId/List of adjs
- Map<String, List<GenericValue>> orderAdjsMap =
FastMap.newInstance() ;
+ Map<String, List<GenericValue>> orderAdjsMap = new
HashMap(); // HashMap supports null key
for (GenericValue quoteAdj : quoteAdjs) {
List<GenericValue> orderAdjs =
(List<GenericValue>)orderAdjsMap.get(quoteAdj.get("quoteItemSeqId"));
if (orderAdjs == null) {