hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1206736 - /httpcomponents/httpclient/trunk/httpclient-benchmark/src/main/java/org/apache/http/client/benchmark/TestHttpCore.java
Date Sun, 27 Nov 2011 15:29:33 GMT
Author: sebb
Date: Sun Nov 27 15:29:32 2011
New Revision: 1206736

URL: http://svn.apache.org/viewvc?rev=1206736&view=rev
Log:
Restore original logic - contentLen = 0 was outside null check

Modified:
    httpcomponents/httpclient/trunk/httpclient-benchmark/src/main/java/org/apache/http/client/benchmark/TestHttpCore.java

Modified: httpcomponents/httpclient/trunk/httpclient-benchmark/src/main/java/org/apache/http/client/benchmark/TestHttpCore.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-benchmark/src/main/java/org/apache/http/client/benchmark/TestHttpCore.java?rev=1206736&r1=1206735&r2=1206736&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-benchmark/src/main/java/org/apache/http/client/benchmark/TestHttpCore.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient-benchmark/src/main/java/org/apache/http/client/benchmark/TestHttpCore.java
Sun Nov 27 15:29:32 2011
@@ -182,8 +182,8 @@ public class TestHttpCore implements Tes
                         HttpEntity entity = response.getEntity();
                         if (entity != null) { // TODO can this be null?
                             InputStream instream = entity.getContent();
+                            contentLen = 0;
                             if (instream != null) {
-                                contentLen = 0;
                                 try {
                                         int l = 0;
                                         while ((l = instream.read(buffer)) != -1) {



Mime
View raw message