Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0037329 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
feature request | [Openbravo ERP] A. Platform | trivial | have not tried | 2017-11-20 14:38 | 2018-01-03 12:39 | |||
Reporter | alostale | View Status | public | |||||
Assigned To | alostale | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR18Q1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 1930cd6e5756 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | caristu | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0037329: make a more generic Utility.arrayListToString | |||||||
Description | Currently, there is a Utility.arrayListToString which generates a String representing all the elements in an ArrayList separated by commas and optionally quoted. This is useful to generate SQL queries with IN clauses. The API is unnecessarily limited to ArrayList. It would be useful, in for some cases, to be more generic allowing any Collection instance instead of just ArrayList. | |||||||
Steps To Reproduce | See, for example, UpdateActuals [1] where a new ArrayList needs to be created from a Set to perform this operation. --- [1] https://code.openbravo.com/erp/devel/pi/file/e9a105538e89/src/org/openbravo/erpCommon/ad_process/UpdateActuals.java#l100 [^] | |||||||
Proposed Solution | Create a more generic API that allows to create this String for Collections instead of just ArrayList. Additionally implement it in a more performant manner. See metrics taken for new method compared with old one: elements 1 commaSeparated: 0 ms arrayListToString: 0 ms elements 10 commaSeparated: 0 ms arrayListToString: 1 ms elements 100 commaSeparated: 0 ms arrayListToString: 0 ms elements 1000 commaSeparated: 2 ms arrayListToString: 76 ms elements 10000 commaSeparated: 2 ms arrayListToString: 2936 ms elements 100000 commaSeparated: 31 ms arrayListToString: 135858 ms | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0100639) hgbot (developer) 2017-11-21 09:58 |
Repository: erp/devel/pi Changeset: 4399ee25ce29f9bfae0280dfedda54e875abeee9 Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Mon Nov 20 14:48:56 2017 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/4399ee25ce29f9bfae0280dfedda54e875abeee9 [^] fixes 37329: implemented a more generic Utility.arrayListToString Implemented a more generic alternative to Utility.arrayListToString: * Receives as parameter a generic Collections instead of limiting it to ArrayList instances * Implemented it in a more performant manner based on OpenJDK AbstractCollection.toString --- M src/org/openbravo/erpCommon/utility/Utility.java --- |
(0100640) alostale (manager) 2017-11-21 10:06 |
Changesets related to this issue that were not automatically detected: changeset: 33027:f2e2f4826906 user: Asier Lostalé <asier.lostale@openbravo.com> date: Mon Nov 20 14:49:56 2017 +0100 summary: related to 37329: implemented a more generic Utility.arrayListToString changeset: 33028:d7b72a4dec05 user: Asier Lostalé <asier.lostale@openbravo.com> date: Mon Nov 20 14:58:19 2017 +0100 summary: related to 37329: use new method where old was used |
(0100642) hgbot (developer) 2017-11-21 10:12 |
Repository: erp/devel/pi Changeset: 7da257d966c7e114da2f2880833ed0e12272d8ef Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Tue Nov 21 10:11:54 2017 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/7da257d966c7e114da2f2880833ed0e12272d8ef [^] related to issue 37329: fixes javadoc --- M src/org/openbravo/erpCommon/utility/Utility.java --- |
(0100643) hgbot (developer) 2017-11-21 10:14 |
Repository: erp/devel/pi Changeset: fb3d55cb33309c69c7fc944289f3ef0df2e80222 Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Tue Nov 21 10:14:28 2017 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/fb3d55cb33309c69c7fc944289f3ef0df2e80222 [^] related to issue 37329: fixes typos --- M src/org/openbravo/erpCommon/utility/Utility.java --- |
(0100702) caristu (developer) 2017-11-24 12:52 |
Code reviewed + tested OK. |
(0100911) hgbot (developer) 2017-12-04 10:20 |
Repository: erp/devel/pi Changeset: 1930cd6e575642a6e47ca9d8e5552615cae41821 Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Mon Dec 04 10:11:14 2017 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/1930cd6e575642a6e47ca9d8e5552615cae41821 [^] fixes 37329: implemented a more generic Utility.arrayListToString Moved new commaSeparated API from generic Utility to a more specific new class StringCollectionUtils. This also removes Utility class dependencies allowing to use new API from central components with limited compilation dependencies. --- M modules/org.openbravo.client.application/src/org/openbravo/client/application/ADAlertDatasourceService.java M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServlet.java M src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java M src/org/openbravo/erpCommon/ad_process/UpdateActuals.java M src/org/openbravo/erpCommon/businessUtility/Preferences.java M src/org/openbravo/erpCommon/obps/ActivationKey.java M src/org/openbravo/erpCommon/utility/Utility.java A src/org/openbravo/erpCommon/utility/StringCollectionUtils.java --- |
(0100912) hgbot (developer) 2017-12-04 10:21 |
Repository: erp/devel/api-checks Changeset: d0c3d7dc51cfbc68dcc23720833c3718f43c2697 Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Mon Dec 04 10:20:24 2017 +0100 URL: http://code.openbravo.com/erp/devel/api-checks/rev/d0c3d7dc51cfbc68dcc23720833c3718f43c2697 [^] related to issue 37329: API change false positive Utiliy.commaSeparated was already included in Java API although it was not yet published. This method has been now moved to another class, just accepting this change as false positive. --- M java/reference/java.japi.gz --- |
(0101054) caristu (developer) 2017-12-15 11:04 |
Reviewed |
(0101294) hgbot (developer) 2017-12-29 14:38 |
Repository: erp/devel/api-checks Changeset: 275dc8d2a7ed41a9ed1527e297da07f704f6ccdc Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Mon Dec 04 10:20:24 2017 +0100 URL: http://code.openbravo.com/erp/devel/api-checks/rev/275dc8d2a7ed41a9ed1527e297da07f704f6ccdc [^] related to issue 37329: API change false positive Utiliy.commaSeparated was already included in Java API although it was not yet published. This method has been now moved to another class, just accepting this change as false positive. --- M java/reference/java.japi.gz --- |
(0101446) hudsonbot (developer) 2018-01-03 12:39 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/c81e0d3cbab5 [^] Maturity status: Test |
(0101447) hudsonbot (developer) 2018-01-03 12:39 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/c81e0d3cbab5 [^] Maturity status: Test |
Issue History | |||
Date Modified | Username | Field | Change |
2017-11-20 14:38 | alostale | New Issue | |
2017-11-20 14:38 | alostale | Assigned To | => platform |
2017-11-20 14:38 | alostale | Modules | => Core |
2017-11-20 14:38 | alostale | Triggers an Emergency Pack | => No |
2017-11-20 14:42 | alostale | Steps to Reproduce Updated | View Revisions |
2017-11-20 14:42 | alostale | Proposed Solution updated | |
2017-11-20 14:42 | alostale | Relationship added | related to 0037324 |
2017-11-20 14:42 | alostale | Assigned To | platform => alostale |
2017-11-20 14:42 | alostale | Review Assigned To | => caristu |
2017-11-21 09:58 | hgbot | Checkin | |
2017-11-21 09:58 | hgbot | Note Added: 0100639 | |
2017-11-21 09:58 | hgbot | Status | new => resolved |
2017-11-21 09:58 | hgbot | Resolution | open => fixed |
2017-11-21 09:58 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/4399ee25ce29f9bfae0280dfedda54e875abeee9 [^] |
2017-11-21 10:06 | alostale | Note Added: 0100640 | |
2017-11-21 10:12 | hgbot | Checkin | |
2017-11-21 10:12 | hgbot | Note Added: 0100642 | |
2017-11-21 10:14 | hgbot | Checkin | |
2017-11-21 10:14 | hgbot | Note Added: 0100643 | |
2017-11-24 12:52 | caristu | Note Added: 0100702 | |
2017-11-24 12:52 | caristu | Status | resolved => closed |
2017-11-24 12:52 | caristu | Fixed in Version | => 3.0PR18Q1 |
2017-12-04 10:20 | hgbot | Checkin | |
2017-12-04 10:20 | hgbot | Note Added: 0100911 | |
2017-12-04 10:20 | hgbot | Status | closed => resolved |
2017-12-04 10:20 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/4399ee25ce29f9bfae0280dfedda54e875abeee9 [^] => http://code.openbravo.com/erp/devel/pi/rev/1930cd6e575642a6e47ca9d8e5552615cae41821 [^] |
2017-12-04 10:21 | hgbot | Checkin | |
2017-12-04 10:21 | hgbot | Note Added: 0100912 | |
2017-12-15 11:04 | caristu | Note Added: 0101054 | |
2017-12-15 11:04 | caristu | Status | resolved => closed |
2017-12-29 14:38 | hgbot | Checkin | |
2017-12-29 14:38 | hgbot | Note Added: 0101294 | |
2018-01-03 12:39 | hudsonbot | Checkin | |
2018-01-03 12:39 | hudsonbot | Note Added: 0101446 | |
2018-01-03 12:39 | hudsonbot | Checkin | |
2018-01-03 12:39 | hudsonbot | Note Added: 0101447 |
Copyright © 2000 - 2009 MantisBT Group |