Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||||||||||||||||
View Issue Details | ||||||||||||||||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||||||||||||||||
0037151 | Openbravo ERP | A. Platform | public | 2017-10-24 10:44 | 2022-02-01 08:08 | |||||||||||||||||||||
Reporter | alostale | |||||||||||||||||||||||||
Assigned To | Triage Platform Base | |||||||||||||||||||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | |||||||||||||||||||||
Status | acknowledged | Resolution | open | |||||||||||||||||||||||
Platform | OS | 5 | OS Version | |||||||||||||||||||||||
Product Version | ||||||||||||||||||||||||||
Target Version | Fixed in Version | |||||||||||||||||||||||||
Merge Request Status | ||||||||||||||||||||||||||
Review Assigned To | ||||||||||||||||||||||||||
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 | 0037151: upgrade/replace JSON library | |||||||||||||||||||||||||
Description | Jettison library is used to handle JSON <-> String transformations in Java. Current version is 1.3 (2011), with some patches to solve some critical issues. This is a very old version that should be upgraded. | |||||||||||||||||||||||||
Steps To Reproduce | - | |||||||||||||||||||||||||
Proposed Solution | This library is consumed not only by Openbravo platform but also any code manipulating JSON in Java. Reviewing changes since then to latest version, it turns out there are some that might cause changes in behavior [1]. One of this changes fixes the following issue, given a JSON like: {a:null} the following code: josonObject.getString("a") returns: "null" (java.lang.String) In newer versions, it returns a null pointer. Currently, there is code like: 1. if (josonObject.getString("a").equals("null")) {...} 2. if ("null".equals(josonObject.getString("a"))) {...} In first case new behavior would throw NPE, whereas in 2nd case it would silently misbehave. Therefore, this change must be carefully handled. Ideally, there should be an Openbravo Platform layer between functional code and JSON library, so that these API changes would be managed by it or even it would be possible to replace this library by any other one (note jettison project currently is not very active). --- [1] https://docs.google.com/spreadsheets/d/1ldZ2IL3s5f-BSHlqVSGxG1ecTSJK20jIxaQudgZIlX8/edit#gid=0 [^] | |||||||||||||||||||||||||
Additional Information | ||||||||||||||||||||||||||
Tags | No tags attached. | |||||||||||||||||||||||||
Relationships |
| |||||||||||||||||||||||||
Attached Files | ||||||||||||||||||||||||||
Issue History | ||||||||||||||||||||||||||
Date Modified | Username | Field | Change | |||||||||||||||||||||||
2017-10-24 10:44 | alostale | New Issue | ||||||||||||||||||||||||
2017-10-24 10:44 | alostale | Assigned To | => platform | |||||||||||||||||||||||
2017-10-24 10:44 | alostale | Modules | => Core | |||||||||||||||||||||||
2017-10-24 10:44 | alostale | Triggers an Emergency Pack | => No | |||||||||||||||||||||||
2017-10-24 10:44 | alostale | Type | defect => design defect | |||||||||||||||||||||||
2017-10-24 10:44 | alostale | Status | new => acknowledged | |||||||||||||||||||||||
2017-10-24 10:45 | alostale | Relationship added | related to 0037135 | |||||||||||||||||||||||
2017-10-24 10:53 | alostale | Summary | upgrade JSON library => upgrade/replace JSON library | |||||||||||||||||||||||
2022-02-01 08:08 | alostale | Assigned To | platform => Triage Platform Base | |||||||||||||||||||||||
2022-12-13 13:54 | shuehner | Relationship added | related to 0051132 | |||||||||||||||||||||||
2023-04-26 13:38 | kousalya_r | Relationship added | blocks 0052255 |
There are no notes attached to this issue. |