Author: lektran
Date: Sat Apr 28 10:51:04 2012
New Revision: 1331747
URL: http://svn.apache.org/viewvc?rev=1331747&view=rev
Log:
Remove two redundant null assignments and fix a comment typo
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
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=1331747&r1=1331746&r2=1331747&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
Sat Apr 28 10:51:04 2012
@@ -185,7 +185,6 @@ public class ShoppingCartItem implements
product = delegator.findByPrimaryKeyCache("Product",
UtilMisc.toMap("productId", productId));
} catch (GenericEntityException e) {
Debug.logWarning(e.toString(), module);
- product = null;
}
if (product == null) {
@@ -355,7 +354,6 @@ public class ShoppingCartItem implements
parentProduct = delegator.findByPrimaryKeyCache("Product",
UtilMisc.toMap("productId", parentProductId));
} catch (GenericEntityException e) {
Debug.logWarning(e.toString(), module);
- parentProduct = null;
}
}
return makeItem(cartLocation, product, selectedAmount, quantity,
unitPrice,
@@ -2524,7 +2522,7 @@ public class ShoppingCartItem implements
GenericValue newAdjustment =
GenericValue.create(adjustment);
BigDecimal adjAmount =
newAdjustment.getBigDecimal("amount");
- // we use != becuase adjustments can be +/-
+ // we use != because adjustments can be +/-
if (adjAmount != null &&
adjAmount.compareTo(BigDecimal.ZERO) != 0)
newAdjustment.set("amount",
adjAmount.divide(baseQuantity, generalRounding));
Debug.logInfo("Cloned adj: " + newAdjustment,
module);