Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0035821
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Retail Modules] StoreServerminorhave not tried2017-04-20 10:192017-06-09 21:09
ReportermtaalView Statuspublic 
Assigned Tomtaal 
PrioritynormalResolutionno change requiredFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget VersionRR17Q2.1
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0035821: MobileServerUtils: Incorrectly comparing string values using != instead of equals method

DescriptionSee 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 ReproduceCheck the code
Proposed Solutionuse equals, as proposed in the description
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0035804RR17Q3 closedmtaal MobileServerUtils: Incorrectly comparing string values using != instead of equals method 

-  Notes
(0097295)
mtaal (manager)
2017-06-09 21:09

No change, individual backport to BUT

- Issue History
Date Modified Username Field Change
2017-04-24 17:30 mtaal Type defect => backport
2017-04-24 17:30 mtaal Target Version RR17Q3 => RR17Q2.1
2017-06-09 21:09 mtaal Note Added: 0097295
2017-06-09 21:09 mtaal Status scheduled => closed
2017-06-09 21:09 mtaal Resolution open => no change required


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker