Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0031479 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] 07. Sales management | minor | have not tried | 2015-11-14 13:21 | 2015-11-23 21:17 | |||
Reporter | shuehner | View Status | public | |||||
Assigned To | shuehner | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | dcb3471fa95d | ||||
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 | vmromanos | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0031479: NPE in CloneOrderActionHandler as result of logic error in code | |||||||
Description | This class has a logic error in its code leading to NPE always in case of bdPriceList being null Stopped by eclipse warning: NullPointerAccess - if (!"".equals(bdPriceList) || bdPriceList != null + if (!"".equals(bdPriceList) && bdPriceList != null || !bdPriceList.equals(BigDecimal.ZERO.setScale(bdPriceList.scale()))) { Problem is wrong use of || where apparently && was intended. Result if when unfixed and bdPriceList is null that the null check does not work in practice and the following check for ZERO triggers an NPE | |||||||
Steps To Reproduce | Check Eclipse warning about NullPointerAccess. Probably also reproducible by finding functional testing flow ensuring bdPriceList being null when accessing that part of the code. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||
|
Notes | |
(0081907) hgbot (developer) 2015-11-16 19:18 |
Repository: erp/devel/pi Changeset: dcb3471fa95d264c5ba7ca283976cd7abc3ffbd4 Author: Stefan Hühner <stefan.huehner <at> openbravo.com> Date: Sat Nov 14 13:22:20 2015 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/dcb3471fa95d264c5ba7ca283976cd7abc3ffbd4 [^] Fixed 31479: Fix NPE with bdPriceList being null. Fix logic error in if-condition to ensure the bdPriceList != null check works as intended. --- M modules/org.openbravo.client.application/src/org/openbravo/client/application/businesslogic/CloneOrderActionHandler.java --- |
(0081922) hgbot (developer) 2015-11-17 13:40 |
Repository: erp/devel/pi Changeset: daa748385c724d989214db8048708fb2f18a8606 Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com> Date: Tue Nov 17 13:39:07 2015 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/daa748385c724d989214db8048708fb2f18a8606 [^] Related to issue 31479: code review improvements List Price is only set when bdPriceList is not Zero (or null) --- M modules/org.openbravo.client.application/src/org/openbravo/client/application/businesslogic/CloneOrderActionHandler.java --- |
(0081924) vmromanos (manager) 2015-11-17 13:41 |
Code review and testing (Clone an order) done |
(0082248) hudsonbot (developer) 2015-11-23 21:17 |
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/7b56bebaaa88 [^] Maturity status: Test |
Issue History | |||
Date Modified | Username | Field | Change |
2015-11-14 13:21 | shuehner | New Issue | |
2015-11-14 13:21 | shuehner | Assigned To | => shuehner |
2015-11-14 13:21 | shuehner | Modules | => Core |
2015-11-14 13:21 | shuehner | Triggers an Emergency Pack | => No |
2015-11-14 13:21 | shuehner | Relationship added | blocks 0031477 |
2015-11-16 15:07 | shuehner | Review Assigned To | => vmromanos |
2015-11-16 19:18 | hgbot | Checkin | |
2015-11-16 19:18 | hgbot | Note Added: 0081907 | |
2015-11-16 19:18 | hgbot | Status | new => resolved |
2015-11-16 19:18 | hgbot | Resolution | open => fixed |
2015-11-16 19:18 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/dcb3471fa95d264c5ba7ca283976cd7abc3ffbd4 [^] |
2015-11-17 13:32 | vmromanos | Relationship added | caused by 0020706 |
2015-11-17 13:40 | hgbot | Checkin | |
2015-11-17 13:40 | hgbot | Note Added: 0081922 | |
2015-11-17 13:41 | vmromanos | Note Added: 0081924 | |
2015-11-17 13:41 | vmromanos | Status | resolved => closed |
2015-11-23 21:17 | hudsonbot | Checkin | |
2015-11-23 21:17 | hudsonbot | Note Added: 0082248 |
Copyright © 2000 - 2009 MantisBT Group |