Project

General

Profile

Revision 6f9a92e5

ID6f9a92e54ac411f0c1612940cf47c4d665152b43
Parent bba916c9
Child 5d47cf79

Added by Patrick Plitzner over 1 year ago

ref #7844 Close http client after getting info

View differences:

eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmServerInfo.java
24 24
import org.apache.http.HttpEntity;
25 25
import org.apache.http.HttpResponse;
26 26
import org.apache.http.client.ClientProtocolException;
27
import org.apache.http.client.HttpClient;
28 27
import org.apache.http.client.ResponseHandler;
29 28
import org.apache.http.client.methods.HttpGet;
30 29
import org.apache.http.impl.client.DefaultHttpClient;
......
198 197
    }
199 198

  
200 199
    private String getResponse(String url) throws CDMServerException {
201
        HttpClient client = new DefaultHttpClient();
200
        DefaultHttpClient client = new DefaultHttpClient();
202 201
       // client = HttpClientBuilder.create().build();
203 202
       // client.getParams();
204 203
        HttpParams params = client.getParams();
......
233 232
            throw new CDMServerException(e);
234 233
        } catch (IOException e) {
235 234
            throw new CDMServerException(e);
235
        } finally{
236
            client.close();
236 237
        }
237 238
        return responseBody;
238 239
    }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)