You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2007/10/17 22:37:39 UTC
svn commit: r585679 - in /ofbiz/trunk:
applications/accounting/webapp/accounting/WEB-INF/actions/invoice/
applications/content/src/org/ofbiz/content/
applications/order/src/org/ofbiz/order/order/
applications/order/src/org/ofbiz/order/shoppingcart/ app...
Author: doogie
Date: Wed Oct 17 13:37:37 2007
New Revision: 585679
URL: http://svn.apache.org/viewvc?rev=585679&view=rev
Log:
Used LinkedHashMap/LinkedHashSet, from collections 1.2, instead of
using local variants. Deprecated OrderedMap/OrderedSet. The filed
patch removed them, but that might break downstream code, so I'll
leave them in for now. Closes
https://issues.apache.org/jira/browse/OFBIZ-1324
Modified:
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/editInvoice.bsh
ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java
ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/collections/OrderedMap.java
ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/collections/OrderedSet.java
ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java
ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/xmldsdump.bsh
ofbiz/trunk/framework/webtools/webapp/webtools/entity/xmldsdump.jsp
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/editInvoice.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/editInvoice.bsh?rev=585679&r1=585678&r2=585679&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/editInvoice.bsh (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/editInvoice.bsh Wed Oct 17 13:37:37 2007
@@ -133,7 +133,7 @@
context.put("payments", paymentAppls);
orderItemBillings = delegator.findByAnd("OrderItemBilling", UtilMisc.toMap("invoiceId", invoiceId), UtilMisc.toList("orderId"));
- orders = new OrderedSet();
+ orders = new LinkedHashSet();
oibIter = orderItemBillings.iterator();
while (oibIter.hasNext()) {
orderIb = oibIter.next();
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=585679&r1=585678&r2=585679&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java Wed Oct 17 13:37:37 2007
@@ -169,7 +169,7 @@
currentEntityMap.put(entityName, ent);
}
- //public static String getFromSomewhere(String name, org.ofbiz.base.util.collections.OrderedMap paramMap, HttpServletRequest request, org.jpublish.JPublishContext context) {
+ //public static String getFromSomewhere(String name, LinkedHashMap paramMap, HttpServletRequest request, org.jpublish.JPublishContext context) {
public static String getFromSomewhere(String name, Map paramMap, HttpServletRequest request, Map context) {
String ret = null;
@@ -190,7 +190,7 @@
return ret;
}
- //public static String getFromSomewhere(String name, org.ofbiz.base.util.collections.OrderedMap paramMap, HttpServletRequest request, org.jpublish.JPublishContext context) {
+ //public static String getFromSomewhere(String name, LinkedHashMap paramMap, HttpServletRequest request, org.jpublish.JPublishContext context) {
/* This method should no longer be in use; the JPublish library was removed by default from OFBiz
public static String getFromSomewhere(String name, Map paramMap, HttpServletRequest request, org.jpublish.JPublishContext context) {
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java?rev=585679&r1=585678&r2=585679&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java Wed Oct 17 13:37:37 2007
@@ -26,6 +26,7 @@
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.LinkedHashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@@ -34,7 +35,6 @@
import javolution.util.FastList;
import javolution.util.FastMap;
-import org.apache.commons.collections.set.ListOrderedSet;
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilFormatOut;
import org.ofbiz.base.util.UtilMisc;
@@ -765,7 +765,7 @@
}
public Set getItemFeatureSet(GenericValue item) {
- Set featureSet = new ListOrderedSet();
+ Set featureSet = new LinkedHashSet();
List featureAppls = null;
if (item.get("productId") != null) {
try {
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java?rev=585679&r1=585678&r2=585679&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java Wed Oct 17 13:37:37 2007
@@ -24,6 +24,7 @@
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
@@ -32,7 +33,6 @@
import javolution.util.FastMap;
-import org.apache.commons.collections.set.ListOrderedSet;
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.GeneralException;
import org.ofbiz.base.util.UtilDateTime;
@@ -1622,7 +1622,7 @@
/** Returns a Set of the item's features */
public Set getFeatureSet() {
- Set featureSet = new ListOrderedSet();
+ Set featureSet = new LinkedHashSet();
GenericValue product = this.getProduct();
if (product != null) {
List featureAppls = null;
Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh?rev=585679&r1=585678&r2=585679&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh Wed Oct 17 13:37:37 2007
@@ -158,7 +158,7 @@
context.put("itemIssuancesPerItem", itemIssuancesPerItem);
// get a list of all invoices
- allInvoices = new OrderedSet();
+ allInvoices = new LinkedHashSet();
orderBilling = delegator.findByAnd("OrderItemBilling", UtilMisc.toMap("orderId", orderId), UtilMisc.toList("invoiceId"));
obIter = orderBilling.iterator();
while (obIter.hasNext()) {
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java?rev=585679&r1=585678&r2=585679&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java Wed Oct 17 13:37:37 2007
@@ -22,7 +22,6 @@
import java.util.*;
import org.apache.commons.collections.map.LinkedMap;
-import org.apache.commons.collections.set.ListOrderedSet;
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilDateTime;
@@ -141,7 +140,7 @@
String productId = (String) context.get("productId");
Locale locale = (Locale) context.get("locale");
String errMsg=null;
- Set featureSet = new ListOrderedSet();
+ Set featureSet = new LinkedHashSet();
try {
Map fields = UtilMisc.toMap("productId", productId, "productFeatureApplTypeId", "SELECTABLE_FEATURE");
Modified: ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/collections/OrderedMap.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/collections/OrderedMap.java?rev=585679&r1=585678&r2=585679&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/collections/OrderedMap.java (original)
+++ ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/collections/OrderedMap.java Wed Oct 17 13:37:37 2007
@@ -27,6 +27,7 @@
import java.util.Set;
/**
+ * @deprecated
* OrderedMap - HashMap backed by a linked list.
*
*/
Modified: ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/collections/OrderedSet.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/collections/OrderedSet.java?rev=585679&r1=585678&r2=585679&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/collections/OrderedSet.java (original)
+++ ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/collections/OrderedSet.java Wed Oct 17 13:37:37 2007
@@ -25,6 +25,7 @@
import java.util.List;
/**
+ * @deprecated
* OrderedSet - Set interface wrapper around a LinkedList
*
*/
Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java?rev=585679&r1=585678&r2=585679&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java Wed Oct 17 13:37:37 2007
@@ -45,12 +45,10 @@
import org.ofbiz.base.util.UtilProperties;
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.base.util.UtilMisc;
-import org.ofbiz.base.util.collections.OrderedSet;
import org.ofbiz.service.group.GroupModel;
import org.ofbiz.service.group.GroupServiceModel;
import org.ofbiz.service.group.ServiceGroupReader;
-import org.apache.commons.collections.set.ListOrderedSet;
import org.w3c.dom.Document;
/**
@@ -144,10 +142,10 @@
public int semaphoreSleep;
/** Set of services this service implements */
- public Set implServices = new ListOrderedSet();
+ public Set implServices = new LinkedHashSet();
/** Set of override parameters */
- public Set overrideParameters = new ListOrderedSet();
+ public Set overrideParameters = new LinkedHashSet();
/** List of permission groups for service invocation */
public List permissionGroups = FastList.newInstance();
@@ -305,7 +303,7 @@
}
public Set getAllParamNames() {
- Set nameList = new OrderedSet();
+ Set nameList = new LinkedHashSet();
Iterator i = this.contextParamList.iterator();
while (i.hasNext()) {
@@ -316,7 +314,7 @@
}
public Set getInParamNames() {
- Set nameList = new OrderedSet();
+ Set nameList = new LinkedHashSet();
Iterator i = this.contextParamList.iterator();
while (i.hasNext()) {
@@ -344,7 +342,7 @@
}
public Set getOutParamNames() {
- Set nameList = new OrderedSet();
+ Set nameList = new LinkedHashSet();
Iterator i = this.contextParamList.iterator();
while (i.hasNext()) {
Modified: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/xmldsdump.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/xmldsdump.bsh?rev=585679&r1=585678&r2=585679&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/xmldsdump.bsh (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/xmldsdump.bsh Wed Oct 17 13:37:37 2007
@@ -20,7 +20,6 @@
import java.util.*;
import java.io.*;
import java.net.*;
-import org.ofbiz.base.util.collections.OrderedSet;
import org.w3c.dom.*;
import org.ofbiz.security.*;
import org.ofbiz.entity.*;
@@ -58,7 +57,7 @@
String preConfiguredSetName = request.getParameter("preConfiguredSetName");
if ("Product1".equals(preConfiguredSetName)) {
- passedEntityNames = new OrderedSet();
+ passedEntityNames = new LinkedHashSet();
passedEntityNames.add("DataResource");
passedEntityNames.add("Facility");
passedEntityNames.add("ProdCatalog");
@@ -69,7 +68,7 @@
passedEntityNames.add("ProductPriceRule");
passedEntityNames.add("ProductPromo");
} else if ("Product2".equals(preConfiguredSetName)) {
- passedEntityNames = new OrderedSet();
+ passedEntityNames = new LinkedHashSet();
passedEntityNames.add("Content");
passedEntityNames.add("ElectronicText");
passedEntityNames.add("FacilityLocation");
@@ -91,7 +90,7 @@
passedEntityNames.add("ProductPromoProduct");
passedEntityNames.add("ProductPromoRule");
} else if ("Product3".equals(preConfiguredSetName)) {
- passedEntityNames = new OrderedSet();
+ passedEntityNames = new LinkedHashSet();
passedEntityNames.add("ProdCatalogInvFacility");
passedEntityNames.add("ProductContent");
passedEntityNames.add("ProductFacilityLocation");
@@ -104,12 +103,12 @@
passedEntityNames.add("ProductPromoCodeParty");
passedEntityNames.add("ProductPromoCond");
} else if ("Product4".equals(preConfiguredSetName)) {
- passedEntityNames = new OrderedSet();
+ passedEntityNames = new LinkedHashSet();
passedEntityNames.add("InventoryItem");
passedEntityNames.add("ProductFeatureCatGrpAppl");
passedEntityNames.add("ProductFeatureGroupAppl");
} else if ("CatalogExport".equals(preConfiguredSetName)) {
- passedEntityNames = new OrderedSet();
+ passedEntityNames = new LinkedHashSet();
passedEntityNames.add("ProdCatalogCategoryType");
passedEntityNames.add("ProdCatalog");
passedEntityNames.add("ProductCategoryType");
Modified: ofbiz/trunk/framework/webtools/webapp/webtools/entity/xmldsdump.jsp
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/entity/xmldsdump.jsp?rev=585679&r1=585678&r2=585679&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/entity/xmldsdump.jsp (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/entity/xmldsdump.jsp Wed Oct 17 13:37:37 2007
@@ -17,7 +17,7 @@
under the License.
--%>
-<%@ page import="java.util.*, java.io.*, java.net.*, org.ofbiz.base.util.collections.OrderedSet" %>
+<%@ page import="java.util.*, java.io.*, java.net.*" %>
<%@ page import="org.w3c.dom.*" %>
<%@ page import="org.ofbiz.security.*, org.ofbiz.entity.*, org.ofbiz.base.util.*, org.ofbiz.webapp.pseudotag.*" %>
<%@ page import="org.ofbiz.entity.model.*, org.ofbiz.entity.util.*, org.ofbiz.entity.transaction.*, org.ofbiz.entity.condition.*" %>
@@ -54,7 +54,7 @@
String preConfiguredSetName = request.getParameter("preConfiguredSetName");
if ("Product1".equals(preConfiguredSetName)) {
- passedEntityNames = new OrderedSet();
+ passedEntityNames = new LinkedHashSet();
passedEntityNames.add("DataResource");
passedEntityNames.add("Facility");
passedEntityNames.add("ProdCatalog");
@@ -65,7 +65,7 @@
passedEntityNames.add("ProductPriceRule");
passedEntityNames.add("ProductPromo");
} else if ("Product2".equals(preConfiguredSetName)) {
- passedEntityNames = new OrderedSet();
+ passedEntityNames = new LinkedHashSet();
passedEntityNames.add("Content");
passedEntityNames.add("ElectronicText");
passedEntityNames.add("FacilityLocation");
@@ -87,7 +87,7 @@
passedEntityNames.add("ProductPromoProduct");
passedEntityNames.add("ProductPromoRule");
} else if ("Product3".equals(preConfiguredSetName)) {
- passedEntityNames = new OrderedSet();
+ passedEntityNames = new LinkedHashSet();
passedEntityNames.add("ProdCatalogInvFacility");
passedEntityNames.add("ProductContent");
passedEntityNames.add("ProductFacilityLocation");
@@ -100,12 +100,12 @@
passedEntityNames.add("ProductPromoCodeParty");
passedEntityNames.add("ProductPromoCond");
} else if ("Product4".equals(preConfiguredSetName)) {
- passedEntityNames = new OrderedSet();
+ passedEntityNames = new LinkedHashSet();
passedEntityNames.add("InventoryItem");
passedEntityNames.add("ProductFeatureCatGrpAppl");
passedEntityNames.add("ProductFeatureGroupAppl");
} else if ("CatalogExport".equals(preConfiguredSetName)) {
- passedEntityNames = new OrderedSet();
+ passedEntityNames = new LinkedHashSet();
passedEntityNames.add("ProdCatalogCategoryType");
passedEntityNames.add("ProdCatalog");
passedEntityNames.add("ProductCategoryType");