jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1775185 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/ConversionUtils.java
Date Mon, 19 Dec 2016 22:19:46 GMT
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
          */



Mime
View raw message