directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r546154 - in /directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap: LdapConfiguration.java SessionRegistry.java
Date Mon, 11 Jun 2007 14:12:00 GMT
Author: elecharny
Date: Mon Jun 11 07:12:00 2007
New Revision: 546154

URL: http://svn.apache.org/viewvc?view=rev&rev=546154
Log:
Small improvement : using a Set instead of a List
Removing some warning susing generics

Modified:
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapConfiguration.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/SessionRegistry.java

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapConfiguration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapConfiguration.java?view=diff&rev=546154&r1=546153&r2=546154
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapConfiguration.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapConfiguration.java
Mon Jun 11 07:12:00 2007
@@ -23,8 +23,10 @@
 import java.io.File;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Set;
 
 import org.apache.directory.server.protocol.shared.ServiceConfiguration;
 import org.apache.directory.server.protocol.shared.ServiceConfigurationException;
@@ -72,7 +74,7 @@
     private final Collection<ExtendedOperationHandler> extendedOperationHandlers =
new ArrayList<ExtendedOperationHandler>();
 
     /** The supported authentication mechanisms. */
-    private List<String> supportedMechanisms;
+    private Set<String> supportedMechanisms;
 
     /** The name of this host, validated during SASL negotiation. */
     private String saslHost = "ldap.example.com";
@@ -95,7 +97,7 @@
         super.setIpPort( IP_PORT_DEFAULT );
         super.setEnabled( true );
 
-        supportedMechanisms = new ArrayList<String>();
+        supportedMechanisms = new HashSet<String>();
         supportedMechanisms.add( "SIMPLE" );
         supportedMechanisms.add( "CRAM-MD5" );
         supportedMechanisms.add( "DIGEST-MD5" );
@@ -382,7 +384,7 @@
      * 
      * @return The list of supported authentication mechanisms.
      */
-    public List getSupportedMechanisms()
+    public Set<String> getSupportedMechanisms()
     {
         return supportedMechanisms;
     }
@@ -393,7 +395,7 @@
      * 
      * @param supportedMechanisms The list of supported authentication mechanisms.
      */
-    public void setSupportedMechanisms( List<String> supportedMechanisms )
+    public void setSupportedMechanisms( Set<String> supportedMechanisms )
     {
         this.supportedMechanisms = supportedMechanisms;
     }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/SessionRegistry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/SessionRegistry.java?view=diff&rev=546154&r1=546153&r2=546154
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/SessionRegistry.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/SessionRegistry.java
Mon Jun 11 07:12:00 2007
@@ -131,9 +131,10 @@
      *
      * @return the registry environment
      */
-    public Hashtable getEnvironmentByCopy()
+    @SuppressWarnings( "unchecked" )
+    public Hashtable<String, Object> getEnvironmentByCopy()
     {
-        return ( Hashtable ) env.clone();
+        return ( Hashtable<String, Object> ) env.clone();
     }
 
 



Mime
View raw message