svn commit: r814139 - /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: r814139 - /ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java

lektran
Author: lektran
Date: Sat Sep 12 10:48:09 2009
New Revision: 814139

URL: http://svn.apache.org/viewvc?rev=814139&view=rev
Log:
Some more incorrect object comparisons

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=814139&r1=814138&r2=814139&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 Sat Sep 12 10:48:09 2009
@@ -237,7 +237,7 @@
             }
             productPartRules = EntityUtil.filterByDate(productPartRules, inDate);
             newNode = substituteNode(oneChildNode, productFeatures, productPartRules);
-            if (newNode == oneChildNode) {
+            if (newNode.equals(oneChildNode)) {
                 // If no substitution has been done (no valid rule applied),
                 // we try to search for a generic link-rule
                 List genericLinkRules = delegator.findByAnd("ProductManufacturingRule",
@@ -249,9 +249,8 @@
                                                         "productIdIn", node.get("productIdTo"))));
                 }
                 genericLinkRules = EntityUtil.filterByDate(genericLinkRules, inDate);
-                newNode = null;
                 newNode = substituteNode(oneChildNode, productFeatures, genericLinkRules);
-                if (newNode == oneChildNode) {
+                if (newNode.equals(oneChildNode)) {
                     // If no substitution has been done (no valid rule applied),
                     // we try to search for a generic node-rule
                     List genericNodeRules = delegator.findByAnd("ProductManufacturingRule",
@@ -260,7 +259,7 @@
                     genericNodeRules = EntityUtil.filterByDate(genericNodeRules, inDate);
                     newNode = null;
                     newNode = substituteNode(oneChildNode, productFeatures, genericNodeRules);
-                    if (newNode == oneChildNode) {
+                    if (newNode.equals(oneChildNode)) {
                         // If no substitution has been done (no valid rule applied),
                         // we try to set the default (first) node-substitution
                         if (UtilValidate.isNotEmpty(genericNodeRules)) {
@@ -269,7 +268,7 @@
                         }
                         // -----------------------------------------------------------
                         // We try to apply directly the selected features
-                        if (newNode == oneChildNode) {
+                        if (newNode.equals(oneChildNode)) {
                             Map selectedFeatures = new HashMap();
                             if (productFeatures != null) {
                                 GenericValue feature = null;