jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1779805 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
Date Sun, 22 Jan 2017 12:52:06 GMT
Author: fschumacher
Date: Sun Jan 22 12:52:06 2017
New Revision: 1779805

URL: http://svn.apache.org/viewvc?rev=1779805&view=rev
Log:
Utilised Java 8 (and 7) features to tidy up code. Used removeIf. Contributed by Graham Russell
(graham at ham1.co.uk). Part 5/8 of github pr #255

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java?rev=1779805&r1=1779804&r2=1779805&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
Sun Jan 22 12:52:06 2017
@@ -1322,12 +1322,8 @@ public class ProxyControl extends Generi
         ValueReplacer replacer = new ValueReplacer();
         for (Arguments variable : variables) {
             final Map<String, String> map = variable.getArgumentsAsMap();
-            for (Iterator<String> vals = map.values().iterator(); vals.hasNext(); )
{
-                final Object next = vals.next();
-                if ("".equals(next)) {// Drop any empty values (Bug 45199)
-                    vals.remove();
-                }
-            }
+            // Drop any empty values (Bug 45199)
+            map.values().removeIf(""::equals);
             replacer.addVariables(map);
         }
 



Mime
View raw message