Issue-ID: VFC-1389
Change-Id: Ie00bff738c48ea600e5a3deda08fc96583860a38
Signed-off-by: arind.mondal <arind.mondal@samsung.com>
ConnectInfo info = new ConnectInfo(vnfmObj.getString("url"), vnfmObj.getString(Constant.USERNAME),
vnfmObj.getString(Constant.PASSWORD), authModel);
- CloseableHttpClient httpClient = HttpClients.createDefault();
-
- try {
+ try (CloseableHttpClient httpClient = HttpClients.createDefault()) {
HttpPost httpPost = new HttpPost(info.getUrl());
} catch (Exception e) {
- e.printStackTrace();
+ LOG.error("Exception while creating connection: {}", e.getMessage());
}
return 1;