final Object obj = JSON_MAPPER.treeToValue(node, Object.class);
final String json = JSON_MAPPER.writeValueAsString(obj);
return json;
- } catch (JsonParseException jpe) {
- LOGGER.debug("Error converting json to string " + jpe.getMessage(), jpe);
} catch (Exception e) {
LOGGER.debug("Error converting json to string " + e.getMessage(), e);
}
final Object obj = JSON_MAPPER.treeToValue(node, Object.class);
final String json = JSON_MAPPER.writeValueAsString(obj);
return json;
- } catch (JsonParseException jpe) {
- LOGGER.debug("Error converting json to string " + jpe.getMessage(), jpe);
} catch (Exception e) {
LOGGER.debug("Error converting json to string " + e.getMessage(), e);
}
LOGGER.info(MessageEnum.RA_RESPONSE_FROM_SDNC, responseContent, "SDNC", "");
return createResponseFromContent(statusCode, statusMessage, responseContent, rt);
- } catch (SocketTimeoutException e) {
- String errMsg = "Request to SDNC timed out";
- logError(errMsg, e);
- return createErrorResponse(HttpURLConnection.HTTP_CLIENT_TIMEOUT, errMsg, rt);
-
- } catch (ConnectTimeoutException e) {
+ } catch (SocketTimeoutException | ConnectTimeoutException e) {
String errMsg = "Request to SDNC timed out";
logError(errMsg, e);
return createErrorResponse(HttpURLConnection.HTTP_CLIENT_TIMEOUT, errMsg, rt);
method = null;
return createResponse(statusCode, responseContent);
- } catch(SocketTimeoutException e) {
- String errMsg = "Request to VFC timed out";
- logError(errMsg, e);
- return createResponse(HttpURLConnection.HTTP_CLIENT_TIMEOUT, errMsg);
-
- } catch(ConnectTimeoutException e) {
+ } catch(SocketTimeoutException | ConnectTimeoutException e) {
String errMsg = "Request to VFC timed out";
logError(errMsg, e);
return createResponse(HttpURLConnection.HTTP_CLIENT_TIMEOUT, errMsg);
final Object obj = JSON_MAPPER.treeToValue(node, Object.class);
final String json = JSON_MAPPER.writeValueAsString(obj);
return json;
- } catch (JsonParseException jpe) {
- LOGGER.debug("Error converting json to string " + jpe.getMessage(),jpe);
} catch (Exception e) {
LOGGER.debug("Error converting json to string " + e.getMessage(),e);
}
JSONObject json = new JSONObject();\r
try {\r
json = new JSONObject(mapper.writeValueAsString(this));\r
- } catch (JsonGenerationException e) {\r
- LOGGER.debug("Exception :",e);\r
- } catch (JsonMappingException e) {\r
- LOGGER.debug("Exception :",e);\r
} catch (JSONException e) {\r
LOGGER.debug("Exception :",e);\r
} catch (IOException e) {\r
jsonString = mapper.writeValueAsString(list);\r
} catch (JsonGenerationException e) {\r
LOGGER.debug("Exception :",e);\r
- } catch (JsonMappingException e) {\r
- LOGGER.debug("Exception :",e);\r
} catch (IOException e) {\r
LOGGER.debug("Exception :",e);\r
}\r
JSONObject json = new JSONObject();\r
try {\r
json = new JSONObject(mapper.writeValueAsString(this));\r
- } catch (JsonGenerationException e) {\r
- LOGGER.debug("Exception :",e);\r
- } catch (JsonMappingException e) {\r
- LOGGER.debug("Exception :",e);\r
} catch (JSONException e) {\r
LOGGER.debug("Exception :",e);\r
} catch (IOException e) {\r
jsonString = mapper.writeValueAsString(list);\r
} catch (JsonGenerationException e) {\r
LOGGER.debug("Exception :",e);\r
- } catch (JsonMappingException e) {\r
- LOGGER.debug("Exception :",e);\r
} catch (IOException e) {\r
LOGGER.debug("Exception :",e);\r
}\r