jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1698309 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
Date Fri, 28 Aug 2015 11:27:44 GMT
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();
         }
     };



Mime
View raw message