Author: jacopoc
Date: Fri Sep 28 03:09:16 2007
New Revision: 580282
URL:
http://svn.apache.org/viewvc?rev=580282&view=revLog:
Fix to prevent NPE if a BOM substitute node is not available.
Modified:
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java
Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java?rev=580282&r1=580281&r2=580282&view=diff==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java Fri Sep 28 03:09:16 2007
@@ -616,7 +616,9 @@
if (UtilValidate.isNotEmpty(pfs)) {
isWarehouseManaged = true;
} else {
- pfs = getSubstitutedNode().getProduct().getRelatedCache("ProductFacility");
+ if (getSubstitutedNode() != null && getSubstitutedNode().getProduct() != null) {
+ pfs = getSubstitutedNode().getProduct().getRelatedCache("ProductFacility");
+ }
if (UtilValidate.isNotEmpty(pfs)) {
isWarehouseManaged = true;
}