Author: fschumacher
Date: Sun Mar 20 12:57:25 2016
New Revision: 1735871

URL: http://svn.apache.org/viewvc?rev=1735871&view=rev
Log:
Combine if clauses, to make it clear, that there are no alternative paths.

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

Modified: 
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
URL: 
http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java?rev=1735871&r1=1735870&r2=1735871&view=diff
==============================================================================
--- 
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
 (original)
+++ 
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
 Sun Mar 20 12:57:25 2016
@@ -1355,11 +1355,9 @@ public abstract class HTTPSamplerBase ex
         }
         try {
             String escapedUrl = 
ConversionUtils.escapeIllegalURLCharacters(url);
-            if (!escapedUrl.equals(url)) {
-                if (log.isDebugEnabled()) {
-                    log.debug("Url '" + url + "' has been escaped to '" + 
escapedUrl
-                            + "'. Please correct your webpage.");
-                }
+            if (!escapedUrl.equals(url) && log.isDebugEnabled()) {
+                log.debug("Url '" + url + "' has been escaped to '"
+                        + escapedUrl + "'. Please correct your webpage.");
             }
             return escapedUrl;
         } catch (Exception e1) {
@@ -1600,15 +1598,13 @@ public abstract class HTTPSamplerBase ex
      */
     protected HTTPSampleResult resultProcessing(boolean areFollowingRedirect, 
int frameDepth, HTTPSampleResult res) {
         boolean wasRedirected = false;
-        if (!areFollowingRedirect) {
-            if (res.isRedirect()) {
-                log.debug("Location set to - " + res.getRedirectLocation());
-
-                if (getFollowRedirects()) {
-                    res = followRedirects(res, frameDepth);
-                    areFollowingRedirect = true;
-                    wasRedirected = true;
-                }
+        if (!areFollowingRedirect && res.isRedirect()) {
+            log.debug("Location set to - " + res.getRedirectLocation());
+
+            if (getFollowRedirects()) {
+                res = followRedirects(res, frameDepth);
+                areFollowingRedirect = true;
+                wasRedirected = true;
             }
         }
         if (isImageParser() && (SampleResult.TEXT).equals(res.getDataType()) 
&& res.isSuccessful()) {


Reply via email to