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 |
[ 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 |
In reply to this post by Nicolas Malin (Jira)
[ 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 |
In reply to this post by Nicolas Malin (Jira)
[ 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 |
Free forum by Nabble | Edit this page |