Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
ID | |||||||||||
0037151 | |||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||||
design defect | [Openbravo ERP] A. Platform | minor | have not tried | 2017-10-24 10:44 | 2022-02-01 08:08 | ||||||
Reporter | alostale | View Status | public | ||||||||
Assigned To | Triage Platform Base | ||||||||||
Priority | normal | Resolution | open | Fixed in Version | |||||||
Status | acknowledged | Fix in branch | Fixed in SCM revision | ||||||||
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 | |||||||||||
Web browser | |||||||||||
Modules | Core | ||||||||||
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 [^] | ||||||||||
Tags | No tags attached. | ||||||||||
Attached Files | |||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||||||||||||||||
|
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 |
Copyright © 2000 - 2009 MantisBT Group |