You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by se...@apache.org on 2015/08/28 13:27:44 UTC

svn commit: r1698309 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java

Author: sebb
Date: Fri Aug 28 11:27:43 2015
New Revision: 1698309

URL: http://svn.apache.org/r1698309
Log:
Inline; avoids resource leak warning (we don't want to close it here)

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java?rev=1698309&r1=1698308&r2=1698309&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java Fri Aug 28 11:27:43 2015
@@ -165,8 +165,7 @@ public class HTTPHC4Impl extends HTTPHCA
         @Override
         public void process(HttpResponse response, HttpContext context)
                 throws HttpException, IOException {
-            HttpConnection conn = (HttpConnection) context.getAttribute(ExecutionContext.HTTP_CONNECTION);
-            HttpConnectionMetrics metrics = conn.getMetrics();
+            HttpConnectionMetrics metrics = ((HttpConnection) context.getAttribute(ExecutionContext.HTTP_CONNECTION)).getMetrics();
             context.setAttribute(CONTEXT_METRICS, metrics);
         }
     };
@@ -174,8 +173,7 @@ public class HTTPHC4Impl extends HTTPHCA
         @Override
         public void process(HttpRequest request, HttpContext context)
                 throws HttpException, IOException {
-            HttpConnection conn = (HttpConnection) context.getAttribute(ExecutionContext.HTTP_CONNECTION);
-            HttpConnectionMetrics metrics = conn.getMetrics();
+            HttpConnectionMetrics metrics = ((HttpConnection) context.getAttribute(ExecutionContext.HTTP_CONNECTION)).getMetrics();
             metrics.reset();
         }
     };