Author: sascharodekamp
Date: Wed Sep 21 12:39:22 2011
New Revision: 1173600

URL: http://svn.apache.org/viewvc?rev=1173600&view=rev
Log:
FIX: Impossible ClassCast (https://issues.apache.org/jira/browse/OFBIZ-4421) A 
fix from Dimitri Unruh: The FeatureSetConstraint cast will always throw a 
ClassCastException. The patch fixes the instanceof if condition.  

Modified:
    
ofbiz/branches/release10.04/applications/product/src/org/ofbiz/product/product/ProductSearch.java

Modified: 
ofbiz/branches/release10.04/applications/product/src/org/ofbiz/product/product/ProductSearch.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/product/src/org/ofbiz/product/product/ProductSearch.java?rev=1173600&r1=1173599&r2=1173600&view=diff
==============================================================================
--- 
ofbiz/branches/release10.04/applications/product/src/org/ofbiz/product/product/ProductSearch.java
 (original)
+++ 
ofbiz/branches/release10.04/applications/product/src/org/ofbiz/product/product/ProductSearch.java
 Wed Sep 21 12:39:22 2011
@@ -1310,7 +1310,7 @@ public class ProductSearch {
         @Override
         public boolean equals(Object obj) {
             ProductSearchConstraint psc = (ProductSearchConstraint) obj;
-            if (psc instanceof FeatureConstraint) {
+            if (psc instanceof FeatureSetConstraint) {
                 FeatureSetConstraint that = (FeatureSetConstraint) psc;
                 if (this.productFeatureIdSet == null) {
                     if (that.productFeatureIdSet != null) {


Reply via email to