Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0031479 | Openbravo ERP | 07. Sales management | public | 2015-11-14 13:21 | 2015-11-23 21:17 |
|
Reporter | shuehner | |
Assigned To | shuehner | |
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | | |
Merge Request Status | |
Review Assigned To | vmromanos |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
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. |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | caused by | defect | 0020706 | 3.0MP14 | closed | jecharri | To clone sales order is missing the list price value | blocks | feature request | 0031477 | | new | shuehner | Tracking issue to reduce the huge number of eclipse warnings in pi |
|
Attached Files | |
|
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 | |
Notes |
|
(0081907)
|
hgbot
|
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
|
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
---
|
|
|
|
Code review and testing (Clone an order) done |
|
|
|
|