jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1779809 - /jmeter/trunk/src/protocol/ldap/org/apache/jmeter/protocol/ldap/sampler/LDAPExtSampler.java
Date Sun, 22 Jan 2017 13:16:14 GMT
Author: fschumacher
Date: Sun Jan 22 13:16:14 2017
New Revision: 1779809

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

Modified:
    jmeter/trunk/src/protocol/ldap/org/apache/jmeter/protocol/ldap/sampler/LDAPExtSampler.java

Modified: jmeter/trunk/src/protocol/ldap/org/apache/jmeter/protocol/ldap/sampler/LDAPExtSampler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/ldap/org/apache/jmeter/protocol/ldap/sampler/LDAPExtSampler.java?rev=1779809&r1=1779808&r2=1779809&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/ldap/org/apache/jmeter/protocol/ldap/sampler/LDAPExtSampler.java
(original)
+++ jmeter/trunk/src/protocol/ldap/org/apache/jmeter/protocol/ldap/sampler/LDAPExtSampler.java
Sun Jan 22 13:16:14 2017
@@ -959,17 +959,14 @@ public class LDAPExtSampler extends Abst
     }
 
     private void sortResults(final List<SearchResult> sortedResults) {
-        Collections.sort(sortedResults, new Comparator<SearchResult>()
-        {
-            private int compareToReverse(final String s1, final String s2)
-            {
+        sortedResults.sort(new Comparator<SearchResult>() {
+            private int compareToReverse(final String s1, final String s2) {
                 int len1 = s1.length();
                 int len2 = s2.length();
                 int s1i = len1 - 1;
                 int s2i = len2 - 1;
 
-                for ( ; (s1i >= 0) && (s2i >= 0); s1i--, s2i--)
-                {
+                for (; (s1i >= 0) && (s2i >= 0); s1i--, s2i--) {
                     char c1 = s1.charAt(s1i);
                     char c2 = s2.charAt(s2i);
 



Mime
View raw message