You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2016/12/19 22:19:46 UTC

svn commit: r1775185 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/ConversionUtils.java

Author: pmouawad
Date: Mon Dec 19 22:19:46 2016
New Revision: 1775185

URL: http://svn.apache.org/viewvc?rev=1775185&view=rev
Log:
Fix sonar error

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/ConversionUtils.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/ConversionUtils.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/ConversionUtils.java?rev=1775185&r1=1775184&r2=1775185&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/ConversionUtils.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/ConversionUtils.java Mon Dec 19 22:19:46 2016
@@ -172,11 +172,15 @@ public class ConversionUtils {
      */
     public static String removeSlashDotDot(String url)
     {
-        if (url == null || (url = url.trim()).length() < 4 || !url.contains(SLASHDOTDOT))
-        {
+        if (url == null) {
             return url;
         }
-
+        
+        url = url.trim();
+        if(url.length() < 4 || !url.contains(SLASHDOTDOT)) {
+            return url;
+        }
+        
         /**
          * http://auth@host:port/path1/path2/path3/?query#anchor
          */