Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0044022 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | minor | always | 2020-05-11 11:28 | 2020-05-29 08:44 | |||
Reporter | adrianromero | View Status | public | |||||
Assigned To | alostale | |||||||
Priority | low | Resolution | fixed | Fixed in Version | PR20Q3 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 45513b1727ec | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | caristu | |||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0044022: Not needed cast in BuildValidation java class | |||||||
Description | Build validations must implement the following method: public List<String> execute() {... But if the object returned is not an ArrayList, the execution fails. The reason is that there is a cast from List to ArrayList here: https://code.openbravo.com/erp/devel/pi/file/tip/src-core/src/org/openbravo/buildvalidation/BuildValidation.java#l51 [^] This cast is not needed. | |||||||
Steps To Reproduce | Create an execute a validation with the following implementation. public List<String> execute() { return Arrays.asList("This is an error message"); } | |||||||
Proposed Solution | Just remove the cast | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|
![]() |
|
(0119900) alostale (viewer) 2020-05-15 07:32 |
MR: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/72 [^] |
(0120032) hgbot (developer) 2020-05-19 13:26 |
Repository: erp/devel/pi Changeset: 45513b1727ec2958a601af5e6f356fa210504bce Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Fri May 15 07:24:19 2020 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/45513b1727ec2958a601af5e6f356fa210504bce [^] fixed BUG-44022: Not needed cast in BuildValidation java class The casting of the result of List<String> getErrors() method to ArrayList was too restricitive and innecessary, causing runtime errors in case the method returned any other List, which is allowed. This casting has been removed. --- M src-core/src/org/openbravo/buildvalidation/BuildValidation.java --- |
(0120442) caristu (viewer) 2020-05-29 08:44 |
Reviewed |
![]() |
|||
Date Modified | Username | Field | Change |
2020-05-11 11:28 | adrianromero | New Issue | |
2020-05-11 11:28 | adrianromero | Assigned To | => platform |
2020-05-11 11:28 | adrianromero | OBNetwork customer | => No |
2020-05-11 11:28 | adrianromero | Modules | => Core |
2020-05-11 11:28 | adrianromero | Triggers an Emergency Pack | => No |
2020-05-15 07:32 | alostale | Note Added: 0119900 | |
2020-05-15 07:32 | alostale | Assigned To | platform => alostale |
2020-05-15 07:32 | alostale | Status | new => acknowledged |
2020-05-19 10:00 | alostale | Review Assigned To | => caristu |
2020-05-19 13:26 | hgbot | Checkin | |
2020-05-19 13:26 | hgbot | Note Added: 0120032 | |
2020-05-19 13:26 | hgbot | Status | acknowledged => resolved |
2020-05-19 13:26 | hgbot | Resolution | open => fixed |
2020-05-19 13:26 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/45513b1727ec2958a601af5e6f356fa210504bce [^] |
2020-05-29 08:44 | caristu | Note Added: 0120442 | |
2020-05-29 08:44 | caristu | Status | resolved => closed |
2020-05-29 08:44 | caristu | Fixed in Version | => 3.0PR20Q3 |
Copyright © 2000 - 2009 MantisBT Group |