Issue-ID: HOLMES-104
Change-Id: Ia2b37ffde95de4d5ea8f99340e1c9fc5b0063c07
Signed-off-by: Shiwei Tian <tian.shiwei@zte.com.cn>
try {
httpResponse = httpClient.execute(httpRequest);
} catch (Exception e) {
try {
httpResponse = httpClient.execute(httpRequest);
} catch (Exception e) {
throw new CorrelationException("Failed to get data from server" ,e);
throw new CorrelationException("Failed to get data from server" ,e);
- } finally {
- if (httpRequest != null) {
- httpRequest.releaseConnection();
- }
- if (httpClient != null) {
- httpClient.close();
- }
HttpEntity responseEntity = new StringEntity("Test");
EasyMock.expect(response.getEntity()).andReturn(responseEntity);
HttpEntity responseEntity = new StringEntity("Test");
EasyMock.expect(response.getEntity()).andReturn(responseEntity);
- httpClient.close();
- EasyMock.expectLastCall();
-
HttpEntity responseEntity = new StringEntity("Test");
EasyMock.expect(response.getEntity()).andReturn(responseEntity);
HttpEntity responseEntity = new StringEntity("Test");
EasyMock.expect(response.getEntity()).andReturn(responseEntity);
- httpClient.close();
- EasyMock.expectLastCall();
-
HttpEntity responseEntity = new StringEntity("Test");
EasyMock.expect(response.getEntity()).andReturn(responseEntity);
HttpEntity responseEntity = new StringEntity("Test");
EasyMock.expect(response.getEntity()).andReturn(responseEntity);
- httpClient.close();
- EasyMock.expectLastCall();
-
HttpEntity responseEntity = new StringEntity("Test");
EasyMock.expect(response.getEntity()).andReturn(responseEntity);
HttpEntity responseEntity = new StringEntity("Test");
EasyMock.expect(response.getEntity()).andReturn(responseEntity);
- httpClient.close();
- EasyMock.expectLastCall();
-