You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Dimitri Unruh (JIRA)" <ji...@apache.org> on 2011/09/15 17:42:09 UTC
[jira] [Updated] (OFBIZ-4422) Using equals() with different object
types
[ https://issues.apache.org/jira/browse/OFBIZ-4422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dimitri Unruh updated OFBIZ-4422:
---------------------------------
Attachment: OFBIZ-4422.patch
> Using equals() with different object types
> ------------------------------------------
>
> Key: OFBIZ-4422
> URL: https://issues.apache.org/jira/browse/OFBIZ-4422
> Project: OFBiz
> Issue Type: Bug
> Components: framework
> Reporter: Dimitri Unruh
> Attachments: OFBIZ-4422.patch
>
>
> In the RunningService.java the equals methods is "buggy":
> {code}
> 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())) {
> return true;
> }
> }
> return false;
> }
> {code}
> this.model.equals(x) compares to different classes.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira