svn commit: r1173601 - /ofbiz/branches/release11.04/applications/product/src/org/ofbiz/product/product/ProductSearch.java

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

svn commit: r1173601 - /ofbiz/branches/release11.04/applications/product/src/org/ofbiz/product/product/ProductSearch.java

sascharodekamp
Author: sascharodekamp
Date: Wed Sep 21 12:39:51 2011
New Revision: 1173601

URL: http://svn.apache.org/viewvc?rev=1173601&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/release11.04/applications/product/src/org/ofbiz/product/product/ProductSearch.java

Modified: ofbiz/branches/release11.04/applications/product/src/org/ofbiz/product/product/ProductSearch.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/product/src/org/ofbiz/product/product/ProductSearch.java?rev=1173601&r1=1173600&r2=1173601&view=diff
==============================================================================
--- ofbiz/branches/release11.04/applications/product/src/org/ofbiz/product/product/ProductSearch.java (original)
+++ ofbiz/branches/release11.04/applications/product/src/org/ofbiz/product/product/ProductSearch.java Wed Sep 21 12:39:51 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) {