You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2009/12/24 02:02:15 UTC
svn commit: r893669 -
/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
Author: jleroux
Date: Thu Dec 24 01:02:15 2009
New Revision: 893669
URL: http://svn.apache.org/viewvc?rev=893669&view=rev
Log:
Correct NPE fix (amends r893656, thanks to Scott)
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=893669&r1=893668&r2=893669&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 Thu Dec 24 01:02:15 2009
@@ -716,16 +716,16 @@
if (parentProduct != null)
this.parentProductId = _parentProduct.getString("productId");
if (UtilValidate.isEmpty(itemType)) {
- if (UtilValidate.isNotEmpty(_product)) {
- if (_product.getString("productTypeId").equals("ASSET_USAGE")) {
+ if (UtilValidate.isNotEmpty(_product.getString("productTypeId"))) {
+ if ("ASSET_USAGE".equals(_product.getString("productTypeId"))) {
this.itemType = "RENTAL_ORDER_ITEM"; // will create additional workeffort/asset usage records
} else {
this.itemType = "PRODUCT_ORDER_ITEM";
}
} else {
- Debug.logError("Error calling ShoppingCartItem (trying to creates new ShoppingCartItem object)." +
- " Check that there is a type for this product ", module);
- return;
+ Debug.logError("Error calling ShoppingCartItem (trying to creates new ShoppingCartItem object)." +
+ " Check that there is a type for this product ", module);
+ return;
}
} else {
this.itemType = itemType;