Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0020659 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | minor | have not tried | 2012-06-01 10:05 | 2012-06-07 12:37 | |||
Reporter | mtaal | View Status | public | |||||
Assigned To | AugustoMauch | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0MP13 | |||
Status | closed | Fix in branch | Fixed in SCM revision | b9a5fed6dd96 | ||||
Projection | none | ETA | none | Target Version | 3.0MP13 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | ||||||||
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 | 0020659: OrganizationStructureProvider throws NPE if passed org id does not belong to the client | |||||||
Description | The OrganizationStructureProvider class throws an NPE in this line (271): return new HashSet<String>(childByOrganizationID.get(orgId)); this because childByOrganizationID.get(orgId) returns null and the HashSet constructor can't handle that. It is nicer to either throw a more meaningfull exception (organization not valid for client or something) or return an empty result. | |||||||
Steps To Reproduce | Get the organization structure provider from the context: Set<String> orgChildTree = OBContext.getOBContext().getOrganizationStructureProvider() .getChildTree(strOrg, true); the strOrg should be a non-existing id a NPE will be thrown it is nice to check this issue through a junit testcase | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|
![]() |
|
(0049619) hgbot (developer) 2012-06-05 15:09 |
Repository: erp/devel/pi Changeset: b9a5fed6dd96ef644fcf8c6e31260a4f93ccf340 Author: Augusto Mauch <augusto.mauch <at> openbravo.com> Date: Tue Jun 05 15:08:23 2012 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/b9a5fed6dd96ef644fcf8c6e31260a4f93ccf340 [^] Fixes issue 20659: An empty set is returned when an invalid orgid is provided The method getChildOrg of OrganizationStructureProvider now returns and empty set instead of null if an invalid orgid is provided. A test has been added to test this behaviour.: Enter commit message. Lines beginning with 'HG:' are removed. --- M src-test/org/openbravo/test/dal/IssuesTest.java M src/org/openbravo/dal/security/OrganizationStructureProvider.java --- |
(0049667) guilleaer (viewer) 2012-06-07 12:37 |
code reviewed and tested in pi@0bc61ab27f73 |
![]() |
|||
Date Modified | Username | Field | Change |
2012-06-01 10:05 | mtaal | New Issue | |
2012-06-01 10:05 | mtaal | Assigned To | => marvintm |
2012-06-01 10:05 | mtaal | Modules | => Core |
2012-06-01 10:05 | mtaal | OBNetwork customer | => No |
2012-06-04 12:13 | marvintm | Assigned To | marvintm => AugustoMauch |
2012-06-05 15:09 | hgbot | Checkin | |
2012-06-05 15:09 | hgbot | Note Added: 0049619 | |
2012-06-05 15:09 | hgbot | Status | new => resolved |
2012-06-05 15:09 | hgbot | Resolution | open => fixed |
2012-06-05 15:09 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/b9a5fed6dd96ef644fcf8c6e31260a4f93ccf340 [^] |
2012-06-07 12:37 | guilleaer | Note Added: 0049667 | |
2012-06-07 12:37 | guilleaer | Status | resolved => closed |
2012-06-07 12:37 | guilleaer | Fixed in Version | => 3.0MP13 |
Copyright © 2000 - 2009 MantisBT Group |