You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2012/06/27 11:33:38 UTC
svn commit: r1354387 -
/httpcomponents/httpclient/trunk/src/site/apt/quickstart.apt
Author: olegk
Date: Wed Jun 27 09:33:37 2012
New Revision: 1354387
URL: http://svn.apache.org/viewvc?rev=1354387&view=rev
Log:
HTTPCLIENT-1201: removed catch clauses for brevity
Modified:
httpcomponents/httpclient/trunk/src/site/apt/quickstart.apt
Modified: httpcomponents/httpclient/trunk/src/site/apt/quickstart.apt
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/src/site/apt/quickstart.apt?rev=1354387&r1=1354386&r2=1354387&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/src/site/apt/quickstart.apt (original)
+++ httpcomponents/httpclient/trunk/src/site/apt/quickstart.apt Wed Jun 27 09:33:37 2012
@@ -73,11 +73,7 @@ try {
// do something useful with the response body
// and ensure it is fully consumed
EntityUtils.consume(entity1);
-}
-catch (IOException ex) {
- // Handle exception
-}
-finally {
+} finally {
httpGet.releaseConnection();
}
@@ -94,10 +90,7 @@ try {
// do something useful with the response body
// and ensure it is fully consumed
EntityUtils.consume(entity2);
-}
-catch (IOException ex) {
- // Handle exception
-finally {
+} finally {
httpPost.releaseConnection();
}