jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1381734 - /jmeter/trunk/src/protocol/ldap/org/apache/jmeter/protocol/ldap/sampler/LDAPExtSampler.java
Date Thu, 06 Sep 2012 20:03:10 GMT
Author: pmouawad
Date: Thu Sep  6 20:03:10 2012
New Revision: 1381734

URL: http://svn.apache.org/viewvc?rev=1381734&view=rev
Log:
Remove unused var
Use interface when possible

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=1381734&r1=1381733&r2=1381734&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
Thu Sep  6 20:03:10 2012
@@ -25,6 +25,7 @@ import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashSet;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
@@ -592,8 +593,7 @@ public class LDAPExtSampler extends Abst
      * @return The BasicAttribute
      **************************************************************************/
     private BasicAttribute getBasicAttribute(String name, String value) {
-        BasicAttribute attr = new BasicAttribute(name, value);
-        return attr;
+        return new BasicAttribute(name, value);
     }
 
     /**
@@ -652,7 +652,7 @@ public class LDAPExtSampler extends Abst
      * the whole context
      *
      **************************************************************************/
-    private void bindOp(DirContext dirContext, SampleResult res) throws NamingException {
+    private void bindOp(SampleResult res) throws NamingException {
         DirContext ctx = ldapContexts.remove(getThreadName());
         if (ctx != null) {
             log.warn("Closing previous context for thread: " + getThreadName());
@@ -744,7 +744,7 @@ public class LDAPExtSampler extends Abst
                 xmlBuffer.tag("baseobj",getRootdn()); // $NON-NLS-1$
                 xmlBuffer.tag("binddn",getUserDN()); // $NON-NLS-1$
                 xmlBuffer.tag("connectionTO",getConnTimeOut()); // $NON-NLS-1$
-                bindOp(dirContext, res);
+                bindOp(res);
             } else if (testType.equals(SBIND)) {
                 res.setSamplerData("SingleBind as "+getUserDN());
                 xmlBuffer.tag("baseobj",getRootdn()); // $NON-NLS-1$
@@ -964,7 +964,7 @@ public class LDAPExtSampler extends Abst
         }
     }
 
-    private void sortAttributes(final ArrayList<Attribute> sortedAttrs) {
+    private void sortAttributes(final List<Attribute> sortedAttrs) {
         Collections.sort(sortedAttrs, new Comparator<Attribute>()
         {
             public int compare(Attribute o1, Attribute o2)
@@ -977,7 +977,7 @@ public class LDAPExtSampler extends Abst
         });
     }
 
-    private void sortResults(final ArrayList<SearchResult> sortedResults) {
+    private void sortResults(final List<SearchResult> sortedResults) {
         Collections.sort(sortedResults, new Comparator<SearchResult>()
         {
             private int compareToReverse(final String s1, final String s2)



Mime
View raw message