From 0044284403a3ca5fe47023ad9f1e9f2830098ea5 Mon Sep 17 00:00:00 2001 From: rodicasutu Date: Thu, 3 Dec 2020 21:45:49 +0200 Subject: [PATCH] Revert "APPS-581: Fix Classification UnitTests that were failing due to org.json library version upgrade" This reverts commit a87b00c0156eff1f41c35c17eefd1f0065ac4fd6. --- .../source/java/org/alfresco/util/WebScriptUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/util/WebScriptUtils.java b/rm-community/rm-community-repo/source/java/org/alfresco/util/WebScriptUtils.java index 56914f300e..cb2cda7981 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/util/WebScriptUtils.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/util/WebScriptUtils.java @@ -238,7 +238,7 @@ public final class WebScriptUtils try { - value = jsonObject.getString(key); + value = jsonObject.get(key).toString(); if (checkValue && isBlank(value)) { throw new WebScriptException(Status.STATUS_BAD_REQUEST, "The value is missing for the key '" + key + "'."); @@ -413,7 +413,7 @@ public final class WebScriptUtils mandatory("jsonObject", jsonObject); mandatoryString("key", key); - JSONObject value; + JSONObject value = null; try {