Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0037151
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Openbravo ERP] A. Platformminorhave not tried2017-10-24 10:442022-02-01 08:08
ReporteralostaleView Statuspublic 
Assigned ToTriage Platform Base 
PrioritynormalResolutionopenFixed in Version
StatusacknowledgedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0037151: upgrade/replace JSON library

DescriptionJettison 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 SolutionThis 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 [^]

TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0037135 closedalostale OOM parsing corrupted JSON 
related to design defect 0051132 scheduledgdagnesses Update jettison library to the latest version 
blocks defect 0052255 closedkousalya_r Request to provide valid version for jettison-1.3-patched.jar 

-  Notes
There are no notes attached to this issue.

- 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
Powered by Mantis Bugtracker