You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by sa...@apache.org on 2011/09/21 14:30:58 UTC

svn commit: r1173593 - /ofbiz/branches/release11.04/framework/service/src/org/ofbiz/service/RunningService.java

Author: sascharodekamp
Date: Wed Sep 21 12:30:58 2011
New Revision: 1173593

URL: http://svn.apache.org/viewvc?rev=1173593&view=rev
Log:
FIX: Using equals() with different object types (https://issues.apache.org/jira/browse/OFBIZ-4422). A patch from Dimitri Unruh which fixes the equals method of the RunningService class. 

Modified:
    ofbiz/branches/release11.04/framework/service/src/org/ofbiz/service/RunningService.java

Modified: ofbiz/branches/release11.04/framework/service/src/org/ofbiz/service/RunningService.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/framework/service/src/org/ofbiz/service/RunningService.java?rev=1173593&r1=1173592&r2=1173593&view=diff
==============================================================================
--- ofbiz/branches/release11.04/framework/service/src/org/ofbiz/service/RunningService.java (original)
+++ ofbiz/branches/release11.04/framework/service/src/org/ofbiz/service/RunningService.java Wed Sep 21 12:30:58 2011
@@ -71,7 +71,7 @@ public class RunningService {
     public boolean equals(Object o) {
         if (o != null && o instanceof RunningService) {
             RunningService x = (RunningService) o;
-            if (this.model.equals(x) && this.mode == x.getMode() && this.startStamp.equals(x.getStartStamp())) {
+            if (this.model.equals(x.getModelService()) && this.mode == x.getMode() && this.startStamp.equals(x.getStartStamp())) {
                 return true;
             }
         }