hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1155303 - /httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalPoolingHttpGet.java
Date Tue, 09 Aug 2011 10:58:06 GMT
Author: olegk
Date: Tue Aug  9 10:58:05 2011
New Revision: 1155303

URL: http://svn.apache.org/viewvc?rev=1155303&view=rev
Log:
Minor example code enhancement

Modified:
    httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalPoolingHttpGet.java

Modified: httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalPoolingHttpGet.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalPoolingHttpGet.java?rev=1155303&r1=1155302&r2=1155303&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalPoolingHttpGet.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalPoolingHttpGet.java
Tue Aug  9 10:58:05 2011
@@ -109,7 +109,7 @@ public class ElementalPoolingHttpGet {
                 try {
                     Future<BasicPoolEntry> future = pool.lease(this.target, null);
 
-                    boolean reusable = true;
+                    boolean reusable = false;
                     BasicPoolEntry entry = future.get();
                     try {
                         HttpClientConnection conn = entry.getConnection();
@@ -132,10 +132,8 @@ public class ElementalPoolingHttpGet {
                         ConnectionReuseStrategy connStrategy = new DefaultConnectionReuseStrategy();
                         reusable = connStrategy.keepAlive(response, context);
                     } catch (IOException ex) {
-                        reusable = false;
                         throw ex;
                     } catch (HttpException ex) {
-                        reusable = false;
                         throw ex;
                     } finally {
                         if (reusable) {



Mime
View raw message