Author: jleroux
Date: Wed Mar 22 08:26:12 2017
New Revision: 1788065

URL: http://svn.apache.org/viewvc?rev=1788065&view=rev
Log:
No functional changes, use a multi exceptions catch I missed and format

Modified:
    
ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/payment/PaymentGatewayServices.java
    
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCart.java

Modified: 
ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/payment/PaymentGatewayServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/payment/PaymentGatewayServices.java?rev=1788065&r1=1788064&r2=1788065&view=diff
==============================================================================
--- 
ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/payment/PaymentGatewayServices.java
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/payment/PaymentGatewayServices.java
 Wed Mar 22 08:26:12 2017
@@ -2688,10 +2688,13 @@ public class PaymentGatewayServices {
         LocalDispatcher dispatcher = dctx.getDispatcher();
         GenericValue userLogin = (GenericValue) context.get("userLogin");
 
-        try (EntityListIterator eli = 
EntityQuery.use(delegator).from("OrderPaymentPreference")
-                    .where(EntityCondition.makeCondition("statusId", 
EntityOperator.EQUALS, "PAYMENT_NOT_AUTH"),
+        try (EntityListIterator eli = EntityQuery.use(delegator)
+                .from("OrderPaymentPreference")
+                .where(EntityCondition.makeCondition("statusId", 
EntityOperator.EQUALS, "PAYMENT_NOT_AUTH"),
                             EntityCondition.makeCondition("processAttempt", 
EntityOperator.GREATER_THAN, Long.valueOf(0)))
-                    .orderBy("orderId").queryIterator()) {
+                .orderBy("orderId")
+                .queryIterator()) {
+            
             List<String> processList = new LinkedList<String>();
             if (eli != null) {
                 Debug.logInfo("Processing failed order re-auth(s)", module);
@@ -2728,7 +2731,8 @@ public class PaymentGatewayServices {
         Timestamp oneWeekAgo = new Timestamp(calcCal.getTimeInMillis());
 
 
-        try (EntityListIterator eli = 
EntityQuery.use(delegator).from("OrderPaymentPreference")
+        try (EntityListIterator eli = EntityQuery.use(delegator)
+                .from("OrderPaymentPreference")
                 .where(EntityCondition.makeCondition("needsNsfRetry", 
EntityOperator.EQUALS, "Y"), 
                         EntityCondition.makeCondition(ModelEntity.STAMP_FIELD, 
EntityOperator.LESS_THAN_EQUAL_TO, oneWeekAgo))
                 .orderBy("orderId").queryIterator()) {

Modified: 
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCart.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCart.java?rev=1788065&r1=1788064&r2=1788065&view=diff
==============================================================================
--- 
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCart.java
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCart.java
 Wed Mar 22 08:26:12 2017
@@ -3529,18 +3529,12 @@ public class ShoppingCart implements Ite
                     return null;
                 }
             }
-
-        } catch (GenericEntityException gse) {
-            Debug.logError(gse, module);
-            return null;
-        } catch (GenericServiceException gse) {
-            Debug.logError(gse, module);
-            return null;
+        } catch (GenericEntityException | GenericServiceException e) {
+            Debug.logError(e, module);
         } catch (Exception e) {
             Debug.logError(e, module);
             return null;
         }
-
         return newProductId;
     }
 


Reply via email to