CloseableHttpResponseresponse=null;try{//dosomething....HttpPostrequest=newHttpPost("someurl");response=getHttpClient().execute(request);//dosomeotherthing....}catch(Exceptione){//dealwithexception}finally{if(response!=null){try{response.close();//(1)}catch(Exceptione){}request.releaseConnection