svn commit: r1812259 - in /ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order: order/ shoppingcart/ shoppingcart/product/ thirdparty/taxware/

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

svn commit: r1812259 - in /ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order: order/ shoppingcart/ shoppingcart/product/ thirdparty/taxware/

Deepak Dixit-5
Author: deepak
Date: Mon Oct 16 08:35:06 2017
New Revision: 1812259

URL: http://svn.apache.org/viewvc?rev=1812259&view=rev
Log:
Inconsistent String Comparisons, Applied patch for Application order classes.
Thanks Devanshu Vyas for your contribution (OFBIZ-9254)

Modified:
    ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderContentWrapper.java
    ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderLookupServices.java
    ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReadHelper.java
    ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReturnServices.java
    ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
    ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/CheckOutEvents.java
    ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/CheckOutHelper.java
    ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCart.java
    ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartEvents.java
    ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartHelper.java
    ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartItem.java
    ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/product/ProductPromoWorker.java
    ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/thirdparty/taxware/TaxwareUTL.java

Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderContentWrapper.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderContentWrapper.java?rev=1812259&r1=1812258&r2=1812259&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderContentWrapper.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderContentWrapper.java Mon Oct 16 08:35:06 2017
@@ -96,7 +96,7 @@ public class OrderContentWrapper impleme
          */
         UtilCodec.SimpleEncoder encoder = UtilCodec.getEncoder(encoderType);
 
-        String orderItemSeqId = (order.getEntityName().equals("OrderItem")? order.getString("orderItemSeqId"): "_NA_");
+        String orderItemSeqId = ("OrderItem".equals(order.getEntityName())? order.getString("orderItemSeqId"): "_NA_");
 
         String cacheKey = orderContentTypeId + SEPARATOR + locale + SEPARATOR + mimeTypeId + SEPARATOR + order.get("orderId") + SEPARATOR + orderItemSeqId + SEPARATOR + encoderType + SEPARATOR + delegator;
         try {
@@ -135,7 +135,7 @@ public class OrderContentWrapper impleme
             orderId = order.getString("orderId");
         }
         if (orderItemSeqId == null && order != null) {
-            orderItemSeqId = (order.getEntityName().equals("OrderItem")? order.getString("orderItemSeqId"): "_NA_");
+            orderItemSeqId = ("OrderItem".equals(order.getEntityName())? order.getString("orderItemSeqId"): "_NA_");
         }
 
         if (delegator == null && order != null) {

Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderLookupServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderLookupServices.java?rev=1812259&r1=1812258&r2=1812259&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderLookupServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderLookupServices.java Mon Oct 16 08:35:06 2017
@@ -570,7 +570,7 @@ public class OrderLookupServices {
 
         // create the main condition
         EntityCondition cond = null;
-        if (conditions.size() > 0 || showAll.equalsIgnoreCase("Y")) {
+        if (conditions.size() > 0 || "Y".equalsIgnoreCase(showAll)) {
             cond = EntityCondition.makeCondition(conditions, EntityOperator.AND);
         }
 

Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReadHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReadHelper.java?rev=1812259&r1=1812258&r2=1812259&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReadHelper.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReadHelper.java Mon Oct 16 08:35:06 2017
@@ -91,7 +91,7 @@ public class OrderReadHelper {
         this.orderHeader = orderHeader;
         this.adjustments = adjustments;
         this.orderItems = orderItems;
-        if (this.orderHeader != null && !this.orderHeader.getEntityName().equals("OrderHeader")) {
+        if (this.orderHeader != null && !"OrderHeader".equals(this.orderHeader.getEntityName())) {
             try {
                 this.orderHeader = orderHeader.getDelegator().findOne("OrderHeader", UtilMisc.toMap("orderId",
                         orderHeader.getString("orderId")), false);

Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReturnServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReturnServices.java?rev=1812259&r1=1812258&r2=1812259&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReturnServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReturnServices.java Mon Oct 16 08:35:06 2017
@@ -414,7 +414,7 @@ public class OrderReturnServices {
 
         // get the returnable quantity
         BigDecimal returnableQuantity = BigDecimal.ZERO;
-        if (returnable && (itemStatus.equals("ITEM_APPROVED") || itemStatus.equals("ITEM_COMPLETED"))) {
+        if (returnable && ("ITEM_APPROVED".equals(itemStatus) || "ITEM_COMPLETED".equals(itemStatus))) {
             List<GenericValue> returnedItems = null;
             try {
                 returnedItems = orderItem.getRelated("ReturnItem", null, null, false);
@@ -437,7 +437,7 @@ public class OrderReturnServices {
                                 "OrderErrorUnableToGetReturnHeaderFromItem", locale));
                     }
                     String returnStatus = returnHeader.getString("statusId");
-                    if (!returnStatus.equals("RETURN_CANCELLED")) {
+                    if (!"RETURN_CANCELLED".equals(returnStatus)) {
                         if(UtilValidate.isNotEmpty(returnItem.getBigDecimal("returnQuantity"))){
                             returnedQty = returnedQty.add(returnItem.getBigDecimal("returnQuantity"));  
                         }
@@ -1378,7 +1378,7 @@ public class OrderReturnServices {
                                 } catch (GenericServiceException e) {
                                     return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,"OrderProblemsWithTheRefundSeeLogs", locale));
                                 }
-                            } else if (paymentMethodTypeId.equals("EXT_BILLACT")) {
+                            } else if ("EXT_BILLACT".equals(paymentMethodTypeId)) {
                                 try {
                                     // for Billing Account refunds
                                     serviceResult = dispatcher.runSync("refundBillingAccountPayment",
@@ -1429,7 +1429,7 @@ public class OrderReturnServices {
                             response.put("responseDate", now);
                             response.put("userLogin", userLogin);
                             response.put("paymentId", paymentId);
-                            if (paymentMethodTypeId.equals("EXT_BILLACT")) {
+                            if ("EXT_BILLACT".equals(paymentMethodTypeId)) {
                                 response.put("billingAccountId", orderReadHelper.getBillingAccount().getString("billingAccountId"));
                             }
                             Map<String, Object> serviceResults = null;

Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java?rev=1812259&r1=1812258&r2=1812259&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java Mon Oct 16 08:35:06 2017
@@ -145,7 +145,7 @@ public class OrderServices {
     private static boolean hasPermission(String orderTypeId, String partyId, GenericValue userLogin, String action, Security security) {
         boolean hasPermission = security.hasEntityPermission("ORDERMGR", "_" + action, userLogin);
         if (!hasPermission) {
-            if (orderTypeId.equals("SALES_ORDER")) {
+            if ("SALES_ORDER".equals(orderTypeId)) {
                 if (security.hasEntityPermission("ORDERMGR", "_SALES_" + action, userLogin)) {
                     hasPermission = true;
                 } else {
@@ -171,7 +171,7 @@ public class OrderServices {
                         }
                     }
                 }
-            } else if ((orderTypeId.equals("PURCHASE_ORDER") && (security.hasEntityPermission("ORDERMGR", "_PURCHASE_" + action, userLogin)))) {
+            } else if (("PURCHASE_ORDER".equals(orderTypeId) && (security.hasEntityPermission("ORDERMGR", "_PURCHASE_" + action, userLogin)))) {
                 hasPermission = true;
             }
         }
@@ -210,7 +210,7 @@ public class OrderServices {
         // get the product store for the order, but it is required only for sales orders
         String productStoreId = (String) context.get("productStoreId");
         GenericValue productStore = null;
-        if ((orderTypeId.equals("SALES_ORDER")) && (UtilValidate.isNotEmpty(productStoreId))) {
+        if (("SALES_ORDER".equals(orderTypeId)) && (UtilValidate.isNotEmpty(productStoreId))) {
             try {
                 productStore = EntityQuery.use(delegator).from("ProductStore").where("productStoreId", productStoreId).cache().queryOne();
             } catch (GenericEntityException e) {
@@ -438,7 +438,7 @@ public class OrderServices {
             getNextOrderIdContext.put("partyId", orgPartyId);
             getNextOrderIdContext.put("userLogin", userLogin);
 
-            if ((orderTypeId.equals("SALES_ORDER")) || (productStoreId != null)) {
+            if (("SALES_ORDER".equals(orderTypeId)) || (productStoreId != null)) {
                 getNextOrderIdContext.put("productStoreId", productStoreId);
             }
             if (UtilValidate.isEmpty(orderId)) {
@@ -482,9 +482,9 @@ public class OrderServices {
 
         // determine the sales channel
         String salesChannelEnumId = (String) context.get("salesChannelEnumId");
-        if ((salesChannelEnumId == null) || salesChannelEnumId.equals("UNKNWN_SALES_CHANNEL")) {
+        if ((salesChannelEnumId == null) || "UNKNWN_SALES_CHANNEL".equals(salesChannelEnumId)) {
             // try the default store sales channel
-            if (orderTypeId.equals("SALES_ORDER") && (productStore != null)) {
+            if ("SALES_ORDER".equals(orderTypeId) && (productStore != null)) {
                 salesChannelEnumId = productStore.getString("defaultSalesChannelEnumId");
             }
             // if there's still no channel, set to unknown channel
@@ -3016,7 +3016,7 @@ public class OrderServices {
             String orderId = orderHeader.getString("orderId");
             String orderStatus = orderHeader.getString("statusId");
 
-            if (orderStatus.equals("ORDER_CREATED")) {
+            if ("ORDER_CREATED".equals(orderStatus)) {
                 // first check for un-paid orders
                 Timestamp orderDate = orderHeader.getTimestamp("entryDate");
 
@@ -5057,7 +5057,7 @@ public class OrderServices {
             }
 
             Map<String, Object> results = ServiceUtil.returnSuccess();
-            if (UtilValidate.isNotEmpty(statusId) && statusId.equalsIgnoreCase("PAYMENT_CANCELLED")) {
+            if (UtilValidate.isNotEmpty(statusId) && "PAYMENT_CANCELLED".equalsIgnoreCase(statusId)) {
                 opp.set("statusId", "PAYMENT_CANCELLED");
                 opp.store();
                 results.put("orderPaymentPreferenceId", opp.get("orderPaymentPreferenceId"));

Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/CheckOutEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/CheckOutEvents.java?rev=1812259&r1=1812258&r2=1812259&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/CheckOutEvents.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/CheckOutEvents.java Mon Oct 16 08:35:06 2017
@@ -736,17 +736,17 @@ public class CheckOutEvents {
         }
 
         // set the customer info
-        if (mode.equals("default")) {
+        if ("default".equals(mode)) {
             cart.setDefaultCheckoutOptions(dispatcher);
         }
 
         // remove the empty ship groups
-        if (mode.equals("removeEmptyShipGroups")) {
+        if ("removeEmptyShipGroups".equals(mode)) {
             cart.cleanUpShipGroups();
         }
 
         // set the customer info
-        if (mode.equals("cust")) {
+        if ("cust".equals(mode)) {
             String partyId = (String) request.getAttribute("partyId");
             if (partyId != null) {
                 cart.setOrderPartyId(partyId);
@@ -771,29 +771,29 @@ public class CheckOutEvents {
             }
         }
 
-        if (mode.equals("addpty")) {
+        if ("addpty".equals(mode)) {
             cart.setAttribute("addpty", "Y");
         }
 
-        if (mode.equals("term")) {
+        if ("term".equals(mode)) {
            cart.setOrderTermSet(true);
         }
 
         CheckOutHelper checkOutHelper = new CheckOutHelper(dispatcher, delegator, cart);
 
         // ====================================================================================
-        if (mode.equals("ship") || mode.equals("options")) {
+        if ("ship".equals(mode) || "options".equals(mode)) {
             Map<String, Object> callResult = ServiceUtil.returnSuccess();
             List<String> errorMessages = new ArrayList<String>();
             Map<String, Object> errorMaps = new HashMap<String, Object>();
             for (int shipGroupIndex = 0; shipGroupIndex < cart.getShipGroupSize(); shipGroupIndex++) {
                 // set the shipping method
-                if (mode.equals("ship")) {
+                if ("ship".equals(mode)) {
                     shippingContactMechId = request.getParameter(shipGroupIndex + "_shipping_contact_mech_id");
                     String facilityId = request.getParameter(shipGroupIndex + "_shipGroupFacilityId");
                     if (shippingContactMechId == null) {
                         shippingContactMechId = (String) request.getAttribute("contactMechId");
-                    } else if(cart.getOrderType().equals("PURCHASE_ORDER")){
+                    } else if("PURCHASE_ORDER".equals(cart.getOrderType())){
                         String[] shipInfo = shippingContactMechId.split("_@_");
                         if(shipInfo.length > 1){
                             shippingContactMechId = shipInfo[0];
@@ -815,7 +815,7 @@ public class CheckOutEvents {
                     ServiceUtil.addErrors(errorMessages, errorMaps, callResult);
                 }
                 // set the options
-                if (mode.equals("options")) {
+                if ("options".equals(mode)) {
                     shippingMethod = request.getParameter(shipGroupIndex + "_shipping_method");
                     if (UtilValidate.isEmpty(shippingMethod)) {
                         shippingMethod = request.getParameter("shipping_method");
@@ -860,8 +860,8 @@ public class CheckOutEvents {
             ServiceUtil.getMessages(request, callResult, null);
             // determine whether it was a success or not
             if (callResult.get(ModelService.RESPONSE_MESSAGE).equals(ModelService.RESPOND_ERROR)) {
-                if (mode.equals("ship")) return "shipping";
-                if (mode.equals("options")) return "options";
+                if ("ship".equals(mode)) return "shipping";
+                if ("options".equals(mode)) return "options";
                 return "error";
             }
         }
@@ -875,7 +875,7 @@ public class CheckOutEvents {
             mode = "payment";
         }
 
-        if (mode.equals("payment")) {
+        if ("payment".equals(mode)) {
             Map<String, Object> callResult = ServiceUtil.returnSuccess();
             List<String> errorMessages = new ArrayList<String>();
             Map<String, Object> errorMaps = new HashMap<String, Object>();
@@ -954,7 +954,7 @@ public class CheckOutEvents {
         boolean requireShipping = true;
         boolean requireOptions = true;
         boolean requireShipGroups = false;
-        boolean requirePayment = !cart.getOrderType().equals("PURCHASE_ORDER");
+        boolean requirePayment = !"PURCHASE_ORDER".equals(cart.getOrderType());
         boolean requireTerm = true;
         boolean requireAdditionalParty = isAnonymousCheckout;
         boolean isSingleUsePayment = true;
@@ -969,18 +969,18 @@ public class CheckOutEvents {
             String requireAdditionalPartyStr = request.getParameter("finalizeReqAdditionalParty");
             String requireShipGroupsStr = request.getParameter("finalizeReqShipGroups");
             String singleUsePaymentStr = request.getParameter("singleUsePayment");
-            requireCustomer = requireCustomerStr == null || requireCustomerStr.equalsIgnoreCase("true");
-            requireNewShippingAddress = requireNewShippingAddressStr != null && requireNewShippingAddressStr.equalsIgnoreCase("true");
-            requireShipping = requireShippingStr == null || requireShippingStr.equalsIgnoreCase("true");
-            requireOptions = requireOptionsStr == null || requireOptionsStr.equalsIgnoreCase("true");
-            requireShipGroups = requireShipGroupsStr != null && requireShipGroupsStr.equalsIgnoreCase("true");
+            requireCustomer = requireCustomerStr == null || "true".equalsIgnoreCase(requireCustomerStr);
+            requireNewShippingAddress = requireNewShippingAddressStr != null && "true".equalsIgnoreCase(requireNewShippingAddressStr);
+            requireShipping = requireShippingStr == null || "true".equalsIgnoreCase(requireShippingStr);
+            requireOptions = requireOptionsStr == null || "true".equalsIgnoreCase(requireOptionsStr);
+            requireShipGroups = requireShipGroupsStr != null && "true".equalsIgnoreCase(requireShipGroupsStr);
             if (requirePayment) {
-                requirePayment = requirePaymentStr == null || requirePaymentStr.equalsIgnoreCase("true");
+                requirePayment = requirePaymentStr == null || "true".equalsIgnoreCase(requirePaymentStr);
             }
             if (requireTerm) {
-                requireTerm = requireTermStr == null || requireTermStr.equalsIgnoreCase("true");
+                requireTerm = requireTermStr == null || "true".equalsIgnoreCase(requireTermStr);
             }
-            requireAdditionalParty = requireAdditionalPartyStr == null || requireAdditionalPartyStr.equalsIgnoreCase("true");
+            requireAdditionalParty = requireAdditionalPartyStr == null || "true".equalsIgnoreCase(requireAdditionalPartyStr);
             isSingleUsePayment = singleUsePaymentStr != null && "Y".equalsIgnoreCase(singleUsePaymentStr) ? true : false;
         }
 
@@ -1002,7 +1002,7 @@ public class CheckOutEvents {
         String[] processOrder = {"customer", "shipping", "shipGroups", "options", "term", "payment",
                                  "addparty", "paysplit"};
 
-        if (cart.getOrderType().equals("PURCHASE_ORDER")) {
+        if ("PURCHASE_ORDER".equals(cart.getOrderType())) {
             // Force checks for the following
             requireCustomer = true; requireShipping = true; requireOptions = true;
             processOrder = new String[] {"customer", "term", "shipping", "shipGroups", "options", "payment",
@@ -1011,11 +1011,11 @@ public class CheckOutEvents {
 
         for (int i = 0; i < processOrder.length; i++) {
             String currProcess = processOrder[i];
-            if (currProcess.equals("customer")) {
-                if (requireCustomer && (customerPartyId == null || customerPartyId.equals("_NA_"))) {
+            if ("customer".equals(currProcess)) {
+                if (requireCustomer && (customerPartyId == null || "_NA_".equals(customerPartyId))) {
                     return "customer";
                 }
-            } else if (currProcess.equals("shipping")) {
+            } else if ("shipping".equals(currProcess)) {
                 if (requireShipping) {
                     if (requireNewShippingAddress) {
                         return "shippingAddress";
@@ -1023,29 +1023,29 @@ public class CheckOutEvents {
                         return "shipping";
                     }
                 }
-            } else if (currProcess.equals("shipGroups")) {
+            } else if ("shipGroups".equals(currProcess)) {
                 if (requireShipGroups) {
                     return "shipGroups";
                 }
-            } else if (currProcess.equals("options")) {
+            } else if ("options".equals(currProcess)) {
                 if (requireOptions && !shippingOptionsSet) {
                     return "options";
                 }
-            } else if (currProcess.equals("term")) {
+            } else if ("term".equals(currProcess)) {
                 if (requireTerm && !cart.isOrderTermSet()) {
                     return "term";
                 }
-            } else if (currProcess.equals("payment")) {
+            } else if ("payment".equals(currProcess)) {
                 List<String> paymentMethodIds = cart.getPaymentMethodIds();
                 List<String> paymentMethodTypeIds = cart.getPaymentMethodTypeIds();
                 if (requirePayment && UtilValidate.isEmpty(paymentMethodIds) && UtilValidate.isEmpty(paymentMethodTypeIds)) {
                     return "payment";
                 }
-            } else if (currProcess.equals("addparty")) {
+            } else if ("addparty".equals(currProcess)) {
                 if (requireAdditionalParty && cart.getAttribute("addpty") == null) {
                     return "addparty";
                 }
-            } else if (currProcess.equals("paysplit")) {
+            } else if ("paysplit".equals(currProcess)) {
                 if (isSingleUsePayment) {
                     return "paysplit";
                 }

Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/CheckOutHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/CheckOutHelper.java?rev=1812259&r1=1812258&r2=1812259&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/CheckOutHelper.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/CheckOutHelper.java Mon Oct 16 08:35:06 2017
@@ -1045,7 +1045,7 @@ public class CheckOutHelper {
 
                 String authResp = (String) paymentResult.get("processResult");
 
-                if (authResp.equals("FAILED")) {
+                if ("FAILED".equals(authResp)) {
                     // order was NOT approved
                     if (Debug.verboseOn()) Debug.logVerbose("Payment auth was NOT a success!", module);
 
@@ -1058,7 +1058,7 @@ public class CheckOutHelper {
                     } else {
                         return ServiceUtil.returnError(messages);
                     }
-                } else if (authResp.equals("APPROVED")) {
+                } else if ("APPROVED".equals(authResp)) {
                     // order WAS approved
                     if (Debug.verboseOn()) Debug.logVerbose("Payment auth was a success!", module);
 
@@ -1089,7 +1089,7 @@ public class CheckOutHelper {
                             }
                         }
                     }
-                } else if (authResp.equals("ERROR")) {
+                } else if ("ERROR".equals(authResp)) {
                     // service failed
                     if (Debug.verboseOn()) Debug.logVerbose("Payment auth failed due to processor trouble.", module);
                     if (!faceToFace && "Y".equalsIgnoreCase(RETRY_ON_ERROR)) {
@@ -1329,7 +1329,7 @@ public class CheckOutHelper {
                 String paymentMethodTypeId = paymentPreference.getString("paymentMethodTypeId");
                 if (paymentMethodTypeId.startsWith("EXT_")) {
                     // PayPal with a PaymentMethod is not an external payment method
-                    if (!(paymentMethodTypeId.equals("EXT_PAYPAL") && UtilValidate.isNotEmpty(paymentPreference.getString("paymentMethodId")))) {
+                    if (!("EXT_PAYPAL".equals(paymentMethodTypeId) && UtilValidate.isNotEmpty(paymentPreference.getString("paymentMethodId")))) {
                         String type = paymentMethodTypeId.substring(4);
                         result = ServiceUtil.returnSuccess();
                         result.put("type", type.toLowerCase());

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=1812259&r1=1812258&r2=1812259&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 Mon Oct 16 08:35:06 2017
@@ -541,7 +541,7 @@ public class ShoppingCart implements Ite
                 } catch (GenericEntityException e) {
                     Debug.logError(e, module);
                 }
-                if (sci.getItemType().equals("RENTAL_ORDER_ITEM")) {
+                if ("RENTAL_ORDER_ITEM".equals(sci.getItemType())) {
                     // check to see if the related fixed asset is available for the new quantity
                     String isAvailable = ShoppingCartItem.checkAvailability(productId, newQuantity, reservStart, reservLength, this);
                     if (isAvailable.compareTo("OK") != 0) {
@@ -555,7 +555,7 @@ public class ShoppingCart implements Ite
                 if (Debug.verboseOn()) Debug.logVerbose("Found a match for id " + productId + " on line " + i + ", updating quantity to " + newQuantity, module);
                 sci.setQuantity(newQuantity, dispatcher, this);
 
-                if (getOrderType().equals("PURCHASE_ORDER")) {
+                if ("PURCHASE_ORDER".equals(getOrderType())) {
                     supplierProduct = getSupplierProduct(productId, newQuantity, dispatcher);
                     if (supplierProduct != null && supplierProduct.getBigDecimal("lastPrice") != null) {
                         sci.setSupplierProductId(supplierProduct.getString("supplierProductId"));
@@ -570,7 +570,7 @@ public class ShoppingCart implements Ite
         }
         // Add the new item to the shopping cart if it wasn't found.
         ShoppingCartItem item = null;
-        if (getOrderType().equals("PURCHASE_ORDER")) {
+        if ("PURCHASE_ORDER".equals(getOrderType())) {
             supplierProduct = getSupplierProduct(productId, quantity, dispatcher);
             if (supplierProduct != null || "_NA_".equals(this.getPartyId())) {
                  item = ShoppingCartItem.makePurchaseOrderItem(Integer.valueOf(0), productId, selectedAmount, quantity, features, attributes, prodCatalogId, configWrapper, itemType, itemGroup, dispatcher, this, supplierProduct, shipBeforeDate, shipAfterDate, cancelBackOrderDate);
@@ -830,7 +830,7 @@ public class ShoppingCart implements Ite
     public boolean containAnyWorkEffortCartItems() {
         // Check for existing cart item.
         for (ShoppingCartItem cartItem : this.cartLines) {
-            if (cartItem.getItemType().equals("RENTAL_ORDER_ITEM")) {  // create workeffort items?
+            if ("RENTAL_ORDER_ITEM".equals(cartItem.getItemType())) {  // create workeffort items?
                 return true;
             }
         }
@@ -840,7 +840,7 @@ public class ShoppingCart implements Ite
     public boolean containAllWorkEffortCartItems() {
         // Check for existing cart item.
         for (ShoppingCartItem cartItem : this.cartLines) {
-            if (!cartItem.getItemType().equals("RENTAL_ORDER_ITEM")) { // not a item to create workefforts?
+            if (!"RENTAL_ORDER_ITEM".equals(cartItem.getItemType())) { // not a item to create workefforts?
                 return false;
             }
         }
@@ -1246,7 +1246,7 @@ public class ShoppingCart implements Ite
 
     public void setBillToCustomerPartyId(String billToCustomerPartyId) {
         this.billToCustomerPartyId = billToCustomerPartyId;
-        if ((UtilValidate.isEmpty(this.orderPartyId)) && !(orderType.equals("PURCHASE_ORDER"))) {
+        if ((UtilValidate.isEmpty(this.orderPartyId)) && !("PURCHASE_ORDER".equals(orderType))) {
             this.orderPartyId = billToCustomerPartyId;  // orderPartyId should be bill-to-customer when it is not a purchase order
         }
     }
@@ -1275,7 +1275,7 @@ public class ShoppingCart implements Ite
 
     public void setBillFromVendorPartyId(String billFromVendorPartyId) {
         this.billFromVendorPartyId = billFromVendorPartyId;
-        if ((UtilValidate.isEmpty(this.orderPartyId)) && (orderType.equals("PURCHASE_ORDER"))) {
+        if ((UtilValidate.isEmpty(this.orderPartyId)) && ("PURCHASE_ORDER".equals(orderType))) {
             this.orderPartyId = billFromVendorPartyId;  // orderPartyId should be bill-from-vendor when it is a purchase order
         }
 
@@ -2592,10 +2592,10 @@ public class ShoppingCart implements Ite
     public void setDefaultCheckoutOptions(LocalDispatcher dispatcher) {
         // skip the add party screen
         this.setAttribute("addpty", "Y");
-        if (getOrderType().equals("SALES_ORDER")) {
+        if ("SALES_ORDER".equals(getOrderType())) {
             // checkout options for sales orders
             // set as the default shipping location the first from the list of available shipping locations
-            if (this.getPartyId() != null && !this.getPartyId().equals("_NA_")) {
+            if (this.getPartyId() != null && !"_NA_".equals(this.getPartyId())) {
                 try {
                     GenericValue orderParty = this.getDelegator().findOne("Party", UtilMisc.toMap("partyId", this.getPartyId()), false);
                     Collection<GenericValue> shippingContactMechList = ContactHelper.getContactMech(orderParty, "SHIPPING_LOCATION", "POSTAL_ADDRESS", false);

Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartEvents.java?rev=1812259&r1=1812258&r2=1812259&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartEvents.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartEvents.java Mon Oct 16 08:35:06 2017
@@ -1111,7 +1111,7 @@ public class ShoppingCartEvents {
                         UtilValidate.isNotEmpty(checkOrderAdjustment.getString("productPromoActionSeqId"))) {
                     GenericPK productPromoActionPk = delegator.makeValidValue("ProductPromoAction", checkOrderAdjustment).getPrimaryKey();
                     cart.setDesiredAlternateGiftByAction(productPromoActionPk, alternateGwpProductId);
-                    if (cart.getOrderType().equals("SALES_ORDER")) {
+                    if ("SALES_ORDER".equals(cart.getOrderType())) {
                         org.apache.ofbiz.order.shoppingcart.product.ProductPromoWorker.doPromotions(cart, dispatcher);
                     }
                     return "success";
@@ -1540,7 +1540,7 @@ public class ShoppingCartEvents {
            return "error";
         }
         request.setAttribute("quoteId", quoteId);
-        if (destroyCart != null && destroyCart.equals("Y")) {
+        if (destroyCart != null && "Y".equals(destroyCart)) {
             ShoppingCartEvents.destroyCart(request, response);
         }
 
@@ -1570,7 +1570,7 @@ public class ShoppingCartEvents {
            return "error";
         }
         request.setAttribute("custRequestId", custRequestId);
-        if (destroyCart != null && destroyCart.equals("Y")) {
+        if (destroyCart != null && "Y".equals(destroyCart)) {
             ShoppingCartEvents.destroyCart(request, response);
         }
 
@@ -1610,9 +1610,9 @@ public class ShoppingCartEvents {
 
                 // check permission for taking the order
                 boolean hasPermission = false;
-                if ((cart.getOrderType().equals("PURCHASE_ORDER")) && (security.hasEntityPermission("ORDERMGR", "_PURCHASE_CREATE", session))) {
+                if (("PURCHASE_ORDER".equals(cart.getOrderType())) && (security.hasEntityPermission("ORDERMGR", "_PURCHASE_CREATE", session))) {
                     hasPermission = true;
-                } else if (cart.getOrderType().equals("SALES_ORDER")) {
+                } else if ("SALES_ORDER".equals(cart.getOrderType())) {
                     if (security.hasEntityPermission("ORDERMGR", "_SALES_CREATE", session)) {
                         hasPermission = true;
                     } else {
@@ -1707,7 +1707,7 @@ public class ShoppingCartEvents {
             }
         } else {
             partyId = cart.getPartyId();
-            if (partyId != null && partyId.equals("_NA_")) partyId = null;
+            if (partyId != null && "_NA_".equals(partyId)) partyId = null;
         }
 
         return "success";

Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartHelper.java?rev=1812259&r1=1812258&r2=1812259&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartHelper.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartHelper.java Mon Oct 16 08:35:06 2017
@@ -253,7 +253,7 @@ public class ShoppingCartHelper {
                 item.setShoppingList(shoppingListId, shoppingListItemSeqId);
             }
         } catch (CartItemModifyException e) {
-            if (cart.getOrderType().equals("PURCHASE_ORDER")) {
+            if ("PURCHASE_ORDER".equals(cart.getOrderType())) {
                 String errMsg = UtilProperties.getMessage(resource_error, "cart.product_not_valid_for_supplier", this.cart.getLocale());
                 errMsg = errMsg + " (" + e.getMessage() + ")";
                 result = ServiceUtil.returnError(errMsg);
@@ -319,7 +319,7 @@ public class ShoppingCartHelper {
                 orderItemTypeId = orderItem.getString("orderItemTypeId");
                 productId = orderItem.getString("productId");
                 // do not store rental items
-                if (orderItemTypeId.equals("RENTAL_ORDER_ITEM"))
+                if ("RENTAL_ORDER_ITEM".equals(orderItemTypeId))
                     continue;
                 if (UtilValidate.isNotEmpty(productId) && orderItem.get("quantity") != null) {
                     BigDecimal amount = orderItem.getBigDecimal("selectedAmount");
@@ -800,7 +800,7 @@ public class ShoppingCartHelper {
                                 try {
                                     oldItemComment = item.getItemComment();
                                     // if, on a purchase order, the quantity has changed, get the new SupplierProduct entity for this quantity level.
-                                    if (cart.getOrderType().equals("PURCHASE_ORDER")) {
+                                    if ("PURCHASE_ORDER".equals(cart.getOrderType())) {
                                         oldQuantity = item.getQuantity();
                                         if (oldQuantity.compareTo(quantity) != 0) {
                                             // save the old description and price, in case the user wants to change those as well

Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartItem.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartItem.java?rev=1812259&r1=1812258&r2=1812259&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartItem.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartItem.java Mon Oct 16 08:35:06 2017
@@ -1079,7 +1079,7 @@ public class ShoppingCartItem implements
                 priceContext.put("quantity", this.getQuantity());
                 priceContext.put("amount", this.getSelectedAmount());
                 
-                if (cart.getOrderType().equals("PURCHASE_ORDER")) {
+                if ("PURCHASE_ORDER".equals(cart.getOrderType())) {
                     priceContext.put("currencyUomId", cart.getCurrency());
                     Map<String, Object> priceResult = dispatcher.runSync("calculatePurchasePrice", priceContext);
                     if (ServiceUtil.isError(priceResult)) {
@@ -1882,7 +1882,7 @@ public class ShoppingCartItem implements
         GenericValue product = getProduct();
         if (product != null) {
             itemInfo.put("inShippingBox", product.getString("inShippingBox"));
-            if (product.getString("inShippingBox") != null && product.getString("inShippingBox").equals("Y")) {
+            if (product.getString("inShippingBox") != null && "Y".equals(product.getString("inShippingBox"))) {
                 itemInfo.put("shippingHeight", product.getBigDecimal("shippingHeight"));
                 itemInfo.put("shippingWidth", product.getBigDecimal("shippingWidth"));
                 itemInfo.put("shippingDepth", product.getBigDecimal("shippingDepth"));

Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/product/ProductPromoWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/product/ProductPromoWorker.java?rev=1812259&r1=1812258&r2=1812259&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/product/ProductPromoWorker.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/product/ProductPromoWorker.java Mon Oct 16 08:35:06 2017
@@ -312,7 +312,7 @@ public final class ProductPromoWorker {
         // there will be a ton of db access, so just do a big catch entity exception block
         try {
             if (productPromoList == null) {
-                if (cart.getOrderType().equals("SALES_ORDER")) {
+                if ("SALES_ORDER".equals(cart.getOrderType())) {
                     productPromoList = ProductPromoWorker.getProductStorePromotions(cart, nowTimestamp, dispatcher);
                 } else {
                     productPromoList = ProductPromoWorker.getAgreementPromotions(cart, nowTimestamp, dispatcher);

Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/thirdparty/taxware/TaxwareUTL.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/thirdparty/taxware/TaxwareUTL.java?rev=1812259&r1=1812258&r2=1812259&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/thirdparty/taxware/TaxwareUTL.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/thirdparty/taxware/TaxwareUTL.java Mon Oct 16 08:35:06 2017
@@ -203,7 +203,7 @@ public class TaxwareUTL {
             // set the ship to address
             if (shipToAddress.get("countryGeoId") == null) {
                 record.set("ST_COUNTRY_CODE", "US");
-            } else if (shipToAddress.getString("countryGeoId").equals("USA")) {
+            } else if ("USA".equals(shipToAddress.getString("countryGeoId"))) {
                 record.set("ST_COUNTRY_CODE", "US");
             } else {
                 record.set("ST_COUNTRY_CODE", shipToAddress.get("countryGeoId"));
@@ -295,7 +295,7 @@ public class TaxwareUTL {
                 if (rec.getBigDecimal("TAX_AMT_COUNTRY").compareTo(BigDecimal.ZERO) > 0) {
                     if (Debug.verboseOn()) Debug.logVerbose("Country Tax Amount: " + rec.getBigDecimal("TAX_AMT_COUNTRY"), module);
                     BigDecimal rate = rec.getBigDecimal("TAX_RATE_COUNTRY").movePointRight(2);
-                    String type = rec.getString("TAX_TYPE_COUNTRY").equals("S") ? "SALES TAX" : "USE TAX";
+                    String type = "S".equals(rec.getString("TAX_TYPE_COUNTRY")) ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_COUNTRY") != null ? rec.getString("JUR_COUNTRY").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
@@ -306,7 +306,7 @@ public class TaxwareUTL {
 
                 if (rec.getBigDecimal("TAX_AMT_STATE").compareTo(BigDecimal.ZERO) > 0) {
                     BigDecimal rate = rec.getBigDecimal("TAX_RATE_STATE").movePointRight(2);
-                    String type = rec.getString("TAX_TYPE_STATE").equals("S") ? "SALES TAX" : "USE TAX";
+                    String type = "S".equals(rec.getString("TAX_TYPE_STATE")) ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_STATE") != null ? rec.getString("JUR_STATE").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
@@ -317,7 +317,7 @@ public class TaxwareUTL {
 
                 if (rec.getBigDecimal("TAX_AMT_COUNTY").compareTo(BigDecimal.ZERO) > 0) {
                     BigDecimal rate = rec.getBigDecimal("TAX_RATE_COUNTY").movePointRight(2);
-                    String type = rec.getString("TAX_TYPE_COUNTY").equals("S") ? "SALES TAX" : "USE TAX";
+                    String type = "S".equals(rec.getString("TAX_TYPE_COUNTY")) ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_COUNTY_CODE") != null ? rec.getString("JUR_COUNTY_CODE").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
@@ -328,7 +328,7 @@ public class TaxwareUTL {
 
                 if (rec.getBigDecimal("TAX_AMT_CITY").compareTo(BigDecimal.ZERO) > 0) {
                     BigDecimal rate = rec.getBigDecimal("TAX_RATE_CITY").movePointRight(2);
-                    String type = rec.getString("TAX_TYPE_CITY").equals("S") ? "SALES TAX" : "USE TAX";
+                    String type = "S".equals(rec.getString("TAX_TYPE_CITY")) ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_CITY") != null ? rec.getString("JUR_CITY").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
@@ -339,7 +339,7 @@ public class TaxwareUTL {
 
                 if (rec.getBigDecimal("TAX_AMT_SEC_STATE").compareTo(BigDecimal.ZERO) > 0) {
                     BigDecimal rate = rec.getBigDecimal("TAX_RATE_SEC_STATE").movePointRight(2);
-                    String type = rec.getString("TAX_TYPE_SEC_STATE").equals("S") ? "SALES TAX" : "USE TAX";
+                    String type = "S".equals(rec.getString("TAX_TYPE_SEC_STATE")) ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_SEC_STATE") != null ? rec.getString("JUR_SEC_STATE").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
@@ -350,7 +350,7 @@ public class TaxwareUTL {
 
                 if (rec.getBigDecimal("TAX_AMT_SEC_COUNTY").compareTo(BigDecimal.ZERO) > 0) {
                     BigDecimal rate = rec.getBigDecimal("TAX_RATE_SEC_COUNTY").movePointRight(2);
-                    String type = rec.getString("TAX_TYPE_SEC_COUNTY").equals("S") ? "SALES TAX" : "USE TAX";
+                    String type = "S".equals(rec.getString("TAX_TYPE_SEC_COUNTY")) ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_SEC_COUNTY_CODE") != null ? rec.getString("JUR_SEC_COUNTY_CODE").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
@@ -361,7 +361,7 @@ public class TaxwareUTL {
 
                 if (rec.getBigDecimal("TAX_AMT_SEC_CITY").compareTo(BigDecimal.ZERO) > 0) {
                     BigDecimal rate = rec.getBigDecimal("TAX_RATE_SEC_CITY").movePointRight(2);
-                    String type = rec.getString("TAX_TYPE_SEC_CITY").equals("S") ? "SALES TAX" : "USE TAX";
+                    String type = "S".equals(rec.getString("TAX_TYPE_SEC_CITY")) ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_SEC_CITY") != null ? rec.getString("JUR_SEC_CITY").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
@@ -376,7 +376,7 @@ public class TaxwareUTL {
             } else if (orderAdjustments.size() == 0) {
                 if (rec.getBigDecimal("TAX_AMT_COUNTRY").compareTo(BigDecimal.ZERO) > 0) {
                     BigDecimal rate = rec.getBigDecimal("TAX_RATE_COUNTRY").movePointRight(2);
-                    String type = rec.getString("TAX_TYPE_COUNTRY").equals("S") ? "SALES TAX" : "USE TAX";
+                    String type = "S".equals(rec.getString("TAX_TYPE_COUNTRY")) ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_COUNTRY") != null ? rec.getString("JUR_COUNTRY").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
@@ -387,7 +387,7 @@ public class TaxwareUTL {
 
                 if (rec.getBigDecimal("TAX_AMT_STATE").compareTo(BigDecimal.ZERO) > 0) {
                     BigDecimal rate = rec.getBigDecimal("TAX_RATE_STATE").movePointRight(2);
-                    String type = rec.getString("TAX_TYPE_STATE").equals("S") ? "SALES TAX" : "USE TAX";
+                    String type = "S".equals(rec.getString("TAX_TYPE_STATE")) ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_STATE") != null ? rec.getString("JUR_STATE").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
@@ -398,7 +398,7 @@ public class TaxwareUTL {
 
                 if (rec.getBigDecimal("TAX_AMT_COUNTY").compareTo(BigDecimal.ZERO) > 0) {
                     BigDecimal rate = rec.getBigDecimal("TAX_RATE_COUNTY").movePointRight(2);
-                    String type = rec.getString("TAX_TYPE_COUNTY").equals("S") ? "SALES TAX" : "USE TAX";
+                    String type = "S".equals(rec.getString("TAX_TYPE_COUNTY")) ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_COUNTY_CODE") != null ? rec.getString("JUR_COUNTY_CODE").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
@@ -409,7 +409,7 @@ public class TaxwareUTL {
 
                 if (rec.getBigDecimal("TAX_AMT_CITY").compareTo(BigDecimal.ZERO) > 0) {
                     BigDecimal rate = rec.getBigDecimal("TAX_RATE_CITY").movePointRight(2);
-                    String type = rec.getString("TAX_TYPE_CITY").equals("S") ? "SALES TAX" : "USE TAX";
+                    String type = "S".equals(rec.getString("TAX_TYPE_CITY")) ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_CITY") != null ? rec.getString("JUR_CITY").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
@@ -420,7 +420,7 @@ public class TaxwareUTL {
 
                 if (rec.getBigDecimal("TAX_AMT_SEC_STATE").compareTo(BigDecimal.ZERO) > 0) {
                     BigDecimal rate = rec.getBigDecimal("TAX_RATE_SEC_STATE").movePointRight(2);
-                    String type = rec.getString("TAX_TYPE_SEC_STATE").equals("S") ? "SALES TAX" : "USE TAX";
+                    String type = "S".equals(rec.getString("TAX_TYPE_SEC_STATE")) ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_SEC_STATE") != null ? rec.getString("JUR_SEC_STATE").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
@@ -431,7 +431,7 @@ public class TaxwareUTL {
 
                 if (rec.getBigDecimal("TAX_AMT_SEC_COUNTY").compareTo(BigDecimal.ZERO) > 0) {
                     BigDecimal rate = rec.getBigDecimal("TAX_RATE_SEC_COUNTY").movePointRight(2);
-                    String type = rec.getString("TAX_TYPE_SEC_COUNTY").equals("S") ? "SALES TAX" : "USE TAX";
+                    String type = "S".equals(rec.getString("TAX_TYPE_SEC_COUNTY")) ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_SEC_COUNTY_CODE") != null ? rec.getString("JUR_SEC_COUNTY_CODE").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();
 
@@ -442,7 +442,7 @@ public class TaxwareUTL {
 
                 if (rec.getBigDecimal("TAX_AMT_SEC_CITY").compareTo(BigDecimal.ZERO) > 0) {
                     BigDecimal rate = rec.getBigDecimal("TAX_RATE_SEC_CITY").movePointRight(2);
-                    String type = rec.getString("TAX_TYPE_SEC_CITY").equals("S") ? "SALES TAX" : "USE TAX";
+                    String type = "S".equals(rec.getString("TAX_TYPE_SEC_CITY")) ? "SALES TAX" : "USE TAX";
                     String jur = rec.get("JUR_SEC_CITY") != null ? rec.getString("JUR_SEC_CITY").trim() : "";
                     String comments = jur + "|" + type + "|" + rate.toString();