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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0040575
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 02. Master data managementminorhave not tried2019-04-10 11:482019-06-28 12:44
ReportershuehnerView Statuspublic 
Assigned Toshuehner 
PrioritynormalResolutionfixedFixed in Version3.0PR19Q3
StatusclosedFix in branchFixed in SCM revision3610767cf5ce
ProjectionnoneETAnoneTarget Version3.0PR19Q3
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToSandrahuguet
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0040575: SL_BPartnerLocation should be cleaned up to not run .toString() on a String variable

DescriptionProbably effect of copy'n'paste without good reason:
        String hql = "" + //
            "select count(distinct c.id) " + //
            "from BusinessPartnerLocation bpl " + //
            "inner join bpl.locationAddress as ad " + //
            "inner join ad.country as c " + //
            "where bpl.businessPartner.id = :bPartnerId " + //
            "and bpl.taxLocation = true " + //
            "and c.id <> :countryId "; //
        Query<Long> query = OBDal.getInstance()
            .getSession()
            .createQuery(hql.toString(), Long.class);

That extra toString is just useless. Probably confusing hql variable to be StringBuffer/StringBuilder.

All toString for 'hql' variable in that file (several) should be removed.
Steps To Reproduce-
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0113072)
hgbot (developer)
2019-06-27 17:58

Repository: erp/devel/pi
Changeset: 3610767cf5cefd4162e9da8407a846d93c47f0a6
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Thu Jun 27 17:54:04 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3610767cf5cefd4162e9da8407a846d93c47f0a6 [^]

Fixed 40575. Remove useless use of <String>.toString

Probably confusion with StringBuilder/String when writing that code.

---
M src/org/openbravo/erpCommon/ad_callouts/SL_BPartnerLocation.java
---
(0113104)
Sandrahuguet (developer)
2019-06-28 12:44

code review + testing ok

- Issue History
Date Modified Username Field Change
2019-04-10 11:48 shuehner New Issue
2019-04-10 11:48 shuehner Assigned To => Triage Finance
2019-04-10 11:48 shuehner Modules => Core
2019-04-10 11:48 shuehner Triggers an Emergency Pack => No
2019-05-13 12:38 shuehner Target Version => 3.0PR19Q3
2019-06-25 10:14 shuehner Assigned To Triage Finance => shuehner
2019-06-27 17:52 shuehner Summary SL_BParnterLocation should be cleaned up to not run .toString() on a String variable => SL_BPartnerLocation should be cleaned up to not run .toString() on a String variable
2019-06-27 17:58 hgbot Checkin
2019-06-27 17:58 hgbot Note Added: 0113072
2019-06-27 17:58 hgbot Status new => resolved
2019-06-27 17:58 hgbot Resolution open => fixed
2019-06-27 17:58 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/3610767cf5cefd4162e9da8407a846d93c47f0a6 [^]
2019-06-28 11:17 Sandrahuguet Review Assigned To => Sandrahuguet
2019-06-28 12:44 Sandrahuguet Note Added: 0113104
2019-06-28 12:44 Sandrahuguet Status resolved => closed
2019-06-28 12:44 Sandrahuguet Fixed in Version => 3.0PR19Q3


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker