svn commit: r810404 - /ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java

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

svn commit: r810404 - /ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java

jacopoc
Author: jacopoc
Date: Wed Sep  2 08:06:41 2009
New Revision: 810404

URL: http://svn.apache.org/viewvc?rev=810404&view=rev
Log:
Fixes to prevent NPE.

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=810404&r1=810403&r2=810404&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 Wed Sep  2 08:06:41 2009
@@ -775,7 +775,9 @@
      *
      */
     public void setQuantityMultiplier(BigDecimal quantityMultiplier) {
-        this.quantityMultiplier = quantityMultiplier;
+        if (quantityMultiplier != null) {
+            this.quantityMultiplier = quantityMultiplier;
+        }
     }
 
     /** Getter for property ruleApplied.
@@ -807,7 +809,9 @@
      *
      */
     public void setScrapFactor(BigDecimal scrapFactor) {
-        this.scrapFactor = scrapFactor;
+        if (scrapFactor != null) {
+            this.scrapFactor = scrapFactor;
+        }
     }
 
     /** Getter for property childrenNodes.