Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0035804 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] StoreServer | minor | have not tried | 2017-04-20 10:19 | 2017-05-18 10:49 | |||
Reporter | mtaal | View Status | public | |||||
Assigned To | mtaal | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | 8c56e46b0bd3 | ||||
Projection | none | ETA | none | Target Version | RR17Q3 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | AugustoMauch | |||||||
OBNetwork customer | No | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0035804: MobileServerUtils: Incorrectly comparing string values using != instead of equals method | |||||||
Description | See the code here [1] it does this: if (p.getClient().getId() != "0" || p.getOrganization().getId() != "0") { However comparing strings like this is wrong, equals should be used: if (!"0".equals(p.getClient().getId()) || !"0".equals(p.getOrganization().getId())) { Bug was introduced by this commit [2] [1] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/44e8f0f349dc/src/org/openbravo/mobile/core/servercontroller/MobileServerUtils.java#l116 [^] [2] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/44e8f0f349dc#l1.43 [^] | |||||||
Steps To Reproduce | Check the code | |||||||
Proposed Solution | use equals, as proposed in the description | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
||||||||||||||||||||||
|
![]() |
|
(0096228) hgbot (developer) 2017-04-27 13:04 |
Repository: erp/pmods/org.openbravo.mobile.core Changeset: 8c56e46b0bd3fac322bf9bc1e07a367f04bd88bd Author: Martin Taal <martin.taal <at> openbravo.com> Date: Thu Apr 27 13:04:08 2017 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/8c56e46b0bd3fac322bf9bc1e07a367f04bd88bd [^] fixes issue 35804: MobileServerUtils: Incorrectly comparing string values using != instead of equals method Check against "0" using equals --- M src/org/openbravo/mobile/core/servercontroller/MobileServerUtils.java --- |
(0096658) AugustoMauch (administrator) 2017-05-18 10:49 |
Code reviewed and verified |
![]() |
|||
Date Modified | Username | Field | Change |
2017-04-20 10:19 | mtaal | New Issue | |
2017-04-20 10:19 | mtaal | Assigned To | => mtaal |
2017-04-20 10:19 | mtaal | OBNetwork customer | => No |
2017-04-20 10:19 | mtaal | Triggers an Emergency Pack | => No |
2017-04-20 10:19 | mtaal | Relationship added | caused by 0035541 |
2017-04-24 17:30 | mtaal | Status | new => scheduled |
2017-04-27 13:04 | hgbot | Checkin | |
2017-04-27 13:04 | hgbot | Note Added: 0096228 | |
2017-04-27 13:04 | hgbot | Status | scheduled => resolved |
2017-04-27 13:04 | hgbot | Resolution | open => fixed |
2017-04-27 13:04 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/8c56e46b0bd3fac322bf9bc1e07a367f04bd88bd [^] |
2017-05-01 16:39 | mtaal | Review Assigned To | => AugustoMauch |
2017-05-18 10:49 | AugustoMauch | Note Added: 0096658 | |
2017-05-18 10:49 | AugustoMauch | Status | resolved => closed |
2017-07-12 11:15 | AugustoMauch | Relationship added | has duplicate 0036470 |
Copyright © 2000 - 2009 MantisBT Group |