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:08 UTC
[jira] [Created] (OFBIZ-4422) Using equals() with different object
types
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
[jira] [Updated] (OFBIZ-4422) Using equals() with different object
types
Posted by "Dimitri Unruh (JIRA)" <ji...@apache.org>.
[ 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
[jira] [Assigned] (OFBIZ-4422) Using equals() with different object
types
Posted by "Sascha Rodekamp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OFBIZ-4422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sascha Rodekamp reassigned OFBIZ-4422:
--------------------------------------
Assignee: Sascha Rodekamp
> 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
> Assignee: Sascha Rodekamp
> 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
[jira] [Closed] (OFBIZ-4422) Using equals() with different object
types
Posted by "Sascha Rodekamp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OFBIZ-4422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sascha Rodekamp closed OFBIZ-4422.
----------------------------------
Resolution: Fixed
Fix Version/s: SVN trunk
Release Branch 11.04
Release Branch 10.04
Thanks Dimitri,
your Patch is in
Trunk @Rev1173592
10.04 @Rev1173594
11.04 @Rev1173593
> 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
> Assignee: Sascha Rodekamp
> Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk
>
> 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