From e0cbd1fba60913ba27fe247b9bf6d54991f6af02 Mon Sep 17 00:00:00 2001 From: evasques Date: Thu, 15 Jul 2021 14:13:43 +0100 Subject: [PATCH] MNT-22481 - Unable to Create Custom Metadata (#598) * Upgrading org.json:json from version 20090211 to 20201115 introduced the issue as getString method in the newer version does not allow for values other than strings * Replaced getString for the get method * Original PR in governance-services: https://github.com/Alfresco/governance-services/pull/1448 --- .../script/CustomPropertyDefinitionPost.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/amps/ags/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/CustomPropertyDefinitionPost.java b/amps/ags/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/CustomPropertyDefinitionPost.java index c3529a760c..5576012095 100644 --- a/amps/ags/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/CustomPropertyDefinitionPost.java +++ b/amps/ags/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/CustomPropertyDefinitionPost.java @@ -140,9 +140,8 @@ public class CustomPropertyDefinitionPost extends BaseCustomPropertyWebScript for (Iterator iter = json.keys(); iter.hasNext(); ) { String nextKeyString = (String)iter.next(); - String nextValueString = json.getString(nextKeyString); - - params.put(nextKeyString, nextValueString); + Serializable nextValue = (Serializable) json.get(nextKeyString); + params.put(nextKeyString, nextValue); } return params;