Closed jlittle-tsg closed 3 years ago
Closed with OC commit #26713
JSON COMPATIBILITY - updating version of JSON jar brought in by core build.gradle.
As a result of this, some changes needed to be made to the way we pull string values from JSON objects. In JSON 2009, JSONObject#getString() will return a stringified version of an object regardless of type. In JSON 2020, JSONObject#getString() is type safe meaning we will encounter an error if the key does not map to a string value. This is causing OC to break in multiple spots, most notable when creating ActiveWizard forms.
This commit will change every occurrence of JSONObject#getString() to JSONObject#get().toString()
CRs: nwoodbine, dgrumieaux
Overview
json-20090211.jar
. Alfresco 7 uses a a later version of JSON (json-20200518.jar
) that beats out OC.JSONObject#getString()
will return a stringified version of an object regardless of type. In JSON 2020,JSONObject#getString()
is type safe meaning we will encounter an error if the key does not map to a string value. This is causing OC to break in multiple spots, most notable when creating ActiveWizard forms.Solution
JSONObject#getString()
in OC toJSONObject#get().toString()