svn commit: r1863488 - in /ofbiz/ofbiz-plugins/trunk: bi/src/main/java/org/apache/ofbiz/bi/util/DimensionServices.java ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java

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

svn commit: r1863488 - in /ofbiz/ofbiz-plugins/trunk: bi/src/main/java/org/apache/ofbiz/bi/util/DimensionServices.java ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java

mthl
Author: mthl
Date: Sat Jul 20 16:17:32 2019
New Revision: 1863488

URL: http://svn.apache.org/viewvc?rev=1863488&view=rev
Log:
Improved: Use ‘UtilGenerics#checkCollection’ when possible
(OFBIZ-11141)

Modified:
    ofbiz/ofbiz-plugins/trunk/bi/src/main/java/org/apache/ofbiz/bi/util/DimensionServices.java
    ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java
    ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java

Modified: ofbiz/ofbiz-plugins/trunk/bi/src/main/java/org/apache/ofbiz/bi/util/DimensionServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/bi/src/main/java/org/apache/ofbiz/bi/util/DimensionServices.java?rev=1863488&r1=1863487&r2=1863488&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/bi/src/main/java/org/apache/ofbiz/bi/util/DimensionServices.java (original)
+++ ofbiz/ofbiz-plugins/trunk/bi/src/main/java/org/apache/ofbiz/bi/util/DimensionServices.java Sat Jul 20 16:17:32 2019
@@ -65,7 +65,7 @@ public class DimensionServices {
     public static Map<String, Object> storeGenericDimension(DispatchContext ctx, Map<String, ? extends Object> context) {
         Delegator delegator = ctx.getDelegator();
         GenericValue dimensionValue = (GenericValue) context.get("dimensionValue");
-        List<String> naturalKeyFields = UtilGenerics.checkList(context.get("naturalKeyFields"), String.class);
+        List<String> naturalKeyFields = UtilGenerics.checkCollection(context.get("naturalKeyFields"), String.class);
         String updateMode = (String) context.get("updateMode");
         Locale locale = (Locale) context.get("locale");
 

Modified: ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java?rev=1863488&r1=1863487&r2=1863488&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java (original)
+++ ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java Sat Jul 20 16:17:32 2019
@@ -1214,7 +1214,7 @@ public class EbayOrderServices {
                 Map<?, ?> orderCreate = checkout.createOrder(userLogin);
 
                 if ("error".equals(orderCreate.get("responseMessage"))) {
-                    List<String> errorMessageList = UtilGenerics.checkList(orderCreate.get("errorMessageList"), String.class);
+                    List<String> errorMessageList = UtilGenerics.checkCollection(orderCreate.get("errorMessageList"), String.class);
                     return ServiceUtil.returnError(errorMessageList);
                 }
                 String orderId = (String) orderCreate.get("orderId");

Modified: ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java?rev=1863488&r1=1863487&r2=1863488&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java (original)
+++ ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java Sat Jul 20 16:17:32 2019
@@ -71,7 +71,7 @@ public class ProductsExportToEbay {
         Map<String, Object> result = new HashMap<>();
         Map<String, Object> response = null;
         try {
-            List<String> selectResult = UtilGenerics.checkList(context.get("selectResult"), String.class);
+            List<String> selectResult = UtilGenerics.checkCollection(context.get("selectResult"), String.class);
             List<GenericValue> productsList  = EntityQuery.use(delegator).from("Product").where(EntityCondition.makeCondition("productId", EntityOperator.IN, selectResult)).queryList();
             if (UtilValidate.isNotEmpty(productsList)) {
                 for (GenericValue product : productsList) {