svn commit: r712932 - in /ofbiz/trunk/applications: accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaApi.java order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java

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

svn commit: r712932 - in /ofbiz/trunk/applications: accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaApi.java order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java

doogie-3
Author: doogie
Date: Mon Nov 10 19:59:11 2008
New Revision: 712932

URL: http://svn.apache.org/viewvc?rev=712932&view=rev
Log:
Switch from LinkedMap to LinkedHashMap.

Modified:
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaApi.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaApi.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaApi.java?rev=712932&r1=712931&r2=712932&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaApi.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaApi.java Mon Nov 10 19:59:11 2008
@@ -19,6 +19,8 @@
 package org.ofbiz.accounting.thirdparty.gosoftware;
 
 import java.io.IOException;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
 import java.util.Map;
 
 import org.ofbiz.base.util.Debug;
@@ -27,9 +29,6 @@
 import org.ofbiz.base.util.HttpClientException;
 import org.ofbiz.base.util.ObjectType;
 
-import org.apache.commons.collections.MapIterator;
-import org.apache.commons.collections.map.LinkedMap;
-
 
 public class RitaApi {
 
@@ -93,19 +92,19 @@
     protected static final int MODE_IN = 10;
 
     // instance variables
-    protected LinkedMap document = null;
+    protected LinkedHashMap document = null;
     protected String host = null;
     protected boolean ssl = false;
     protected int port = 0;
     protected int mode = 0;
 
     public RitaApi(Map document) {
-        this.document = new LinkedMap(document);
+        this.document = new LinkedHashMap(document);
         this.mode = MODE_OUT;
     }
 
     public RitaApi() {
-        this.document = new LinkedMap();
+        this.document = new LinkedHashMap();
         this.mode = MODE_IN;
     }
 
@@ -151,10 +150,11 @@
 
     public String toString() {
         StringBuffer buf = new StringBuffer();
-        MapIterator i = document.mapIterator();
+        Iterator i = document.entrySet().iterator();
         while (i.hasNext()) {
-            String name = (String) i.next();
-            String value = (String) i.getValue();
+            Map.Entry entry = (Map.Entry) i.next();
+            String name = (String) entry.getKey();
+            String value = (String) entry.getValue();
             buf.append(name);
             buf.append(" ");
             buf.append(value);
@@ -198,7 +198,7 @@
             ps.flush();
 
             // the output map
-            LinkedMap docMap = new LinkedMap();
+            LinkedHashMap docMap = new LinkedHashMap();
             String line;
 
             // read the response
@@ -226,7 +226,7 @@
             br.close();
             */
 
-            LinkedMap docMap = new LinkedMap();            
+            LinkedHashMap docMap = new LinkedHashMap();            
             String resp = null;
             try {
                 resp = http.post(stream);

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=712932&r1=712931&r2=712932&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Mon Nov 10 19:59:11 2008
@@ -20,7 +20,6 @@
 
 import javolution.util.FastList;
 import javolution.util.FastMap;
-import org.apache.commons.collections.map.LinkedMap;
 import org.ofbiz.base.util.*;
 import org.ofbiz.entity.GenericDelegator;
 import org.ofbiz.entity.GenericEntityException;
@@ -4195,7 +4194,7 @@
     }
 
     public static class CartShipInfo implements Serializable {
-        public LinkedMap shipItemInfo = new LinkedMap();
+        public LinkedHashMap shipItemInfo = new LinkedHashMap();
         public List shipTaxAdj = new LinkedList();
         public String orderTypeId = null;
         private String internalContactMechId = null;