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
|
try
|
||||||
{
|
{
|
||||||
String bodyString = EntityUtils.toString(response.getEntity());
|
responseBody = new JSONObject(EntityUtils.toString(response.getEntity()));
|
||||||
try
|
}
|
||||||
{
|
catch (JSONException error)
|
||||||
responseBody = new JSONObject(bodyString);
|
{
|
||||||
}
|
LOGGER.error("Converting message body to JSON failed. Body: {}", responseBody, error);
|
||||||
catch (JSONException error)
|
|
||||||
{
|
|
||||||
LOGGER.error("Converting message body to JSON failed. Body: {}", responseBody, error);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (ParseException | IOException error)
|
catch (ParseException | IOException error)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user