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:
Tom Page
2017-09-08 14:10:47 +01:00
parent b2ac4f89ee
commit d8f16a990c

View File

@@ -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)
{