mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-5611 Code review fixes.
Remove nested try catch. Add additional check that we don't have duplicate topics selected.
This commit is contained in:
@@ -404,15 +404,11 @@ public abstract class BaseAPI
|
||||
|
||||
try
|
||||
{
|
||||
String bodyString = EntityUtils.toString(response.getEntity());
|
||||
try
|
||||
{
|
||||
responseBody = new JSONObject(bodyString);
|
||||
}
|
||||
catch (JSONException error)
|
||||
{
|
||||
LOGGER.error("Converting message body to JSON failed. Body: {}", responseBody, error);
|
||||
}
|
||||
responseBody = new JSONObject(EntityUtils.toString(response.getEntity()));
|
||||
}
|
||||
catch (JSONException error)
|
||||
{
|
||||
LOGGER.error("Converting message body to JSON failed. Body: {}", responseBody, error);
|
||||
}
|
||||
catch (ParseException | IOException error)
|
||||
{
|
||||
|
Reference in New Issue
Block a user