directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r481985 - in /directory/trunks/apacheds: core/src/main/java/org/apache/directory/server/core/configuration/ kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/ protocol-changepw/src/main/java/org/apa...
Date Sun, 03 Dec 2006 23:21:44 GMT
Author: elecharny
Date: Sun Dec  3 15:21:42 2006
New Revision: 481985

URL: http://svn.apache.org/viewvc?view=rev&rev=481985
Log:
Fixed around 50 warnings using generics

Modified:
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/Configuration.java
    directory/trunks/apacheds/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/EncryptionType.java
    directory/trunks/apacheds/protocol-changepw/src/main/java/org/apache/directory/server/changepw/ChangePasswordConfiguration.java
    directory/trunks/apacheds/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolHandler.java
    directory/trunks/apacheds/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/CheckPasswordPolicy.java
    directory/trunks/apacheds/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/OptionsField.java
    directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/DnsConfiguration.java
    directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/QuestionRecords.java
    directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ResourceRecordModifier.java
    directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ResourceRecords.java
    directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsEncoder.java
    directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/service/DnsContext.java
    directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/store/operations/GetRecords.java
    directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcConfiguration.java
    directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchHandler.java
    directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpConfiguration.java

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/Configuration.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/Configuration.java?view=diff&rev=481985&r1=481984&r2=481985
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/Configuration.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/Configuration.java
Sun Dec  3 15:21:42 2006
@@ -55,7 +55,7 @@
      * @throws ConfigurationException if the specified environment doesn't
      *                                contain the proper configuration instance.
      */
-    public static Configuration toConfiguration( Hashtable jndiEnvironment )
+    public static Configuration toConfiguration( Hashtable<String, Object> jndiEnvironment
)
     {
         Object value = jndiEnvironment.get( JNDI_KEY );
         
@@ -118,9 +118,9 @@
      * This method simple returns a {@link Hashtable} that contains an entry
      * whose key is {@link #JNDI_KEY} and whose value is <tt>this</tt>.
      */
-    public Hashtable toJndiEnvironment()
+    public Hashtable<String, Object> toJndiEnvironment()
     {
-        Hashtable env = new Hashtable();
+        Hashtable<String, Object> env = new Hashtable<String, Object>();
         env.put( JNDI_KEY, this );
         return env;
     }

Modified: directory/trunks/apacheds/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/EncryptionType.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/EncryptionType.java?view=diff&rev=481985&r1=481984&r2=481985
==============================================================================
--- directory/trunks/apacheds/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/EncryptionType.java
(original)
+++ directory/trunks/apacheds/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/EncryptionType.java
Sun Dec  3 15:21:42 2006
@@ -69,7 +69,7 @@
             AES256_CTS_HMAC_SHA1_96, RC4_HMAC, RC4_HMAC_EXP, SUBKEY_KEYMATERIAL, RC4_MD4,
RC4_HMAC_OLD,
             RC4_HMAC_OLD_EXP };
 
-    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values
) );
+    public static final List<EncryptionType> VALUES = Collections.unmodifiableList(
Arrays.asList( values ) );
 
     private final String name;
     private final int ordinal;

Modified: directory/trunks/apacheds/protocol-changepw/src/main/java/org/apache/directory/server/changepw/ChangePasswordConfiguration.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/protocol-changepw/src/main/java/org/apache/directory/server/changepw/ChangePasswordConfiguration.java?view=diff&rev=481985&r1=481984&r2=481985
==============================================================================
--- directory/trunks/apacheds/protocol-changepw/src/main/java/org/apache/directory/server/changepw/ChangePasswordConfiguration.java
(original)
+++ directory/trunks/apacheds/protocol-changepw/src/main/java/org/apache/directory/server/changepw/ChangePasswordConfiguration.java
Sun Dec  3 15:21:42 2006
@@ -23,7 +23,6 @@
 import java.util.ArrayList;
 import java.util.Dictionary;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -114,13 +113,13 @@
     }
 
 
-    public ChangePasswordConfiguration(Map properties)
+    public ChangePasswordConfiguration( Map<String, String> properties )
     {
         this( properties, LoadStrategy.LDAP );
     }
 
 
-    public ChangePasswordConfiguration(Map properties, int strategy)
+    public ChangePasswordConfiguration( Map<String, String> properties, int strategy
)
     {
         if ( properties == null )
         {
@@ -142,9 +141,9 @@
     }
 
 
-    public static Map getDefaultConfig()
+    public static Map<String, String> getDefaultConfig()
     {
-        Map defaults = new HashMap();
+        Map<String, String> defaults = new HashMap<String, String>();
 
         defaults.put( SERVICE_PID, DEFAULT_PID );
         defaults.put( IP_PORT_KEY, DEFAULT_IP_PORT );
@@ -204,7 +203,7 @@
     }
 
 
-    public Map getProperties()
+    public Map<String, String> getProperties()
     {
         // Request that the krb5key value be returned as binary
         configuration.put( "java.naming.ldap.attributes.binary", "krb5Key" );
@@ -332,18 +331,12 @@
             encryptionTypeStrings = DEFAULT_ENCRYPTION_TYPES;
         }
 
-        List encTypes = new ArrayList();
+        List<EncryptionType> encTypes = new ArrayList<EncryptionType>();
 
-        for ( int ii = 0; ii < encryptionTypeStrings.length; ii++ )
+        for ( String enc:encryptionTypeStrings )
         {
-            String enc = encryptionTypeStrings[ii];
-
-            Iterator it = EncryptionType.VALUES.iterator();
-
-            while ( it.hasNext() )
+            for ( EncryptionType type:EncryptionType.VALUES )
             {
-                EncryptionType type = ( EncryptionType ) it.next();
-
                 if ( type.toString().equalsIgnoreCase( enc ) )
                 {
                     encTypes.add( type );

Modified: directory/trunks/apacheds/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolHandler.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolHandler.java?view=diff&rev=481985&r1=481984&r2=481985
==============================================================================
--- directory/trunks/apacheds/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolHandler.java
(original)
+++ directory/trunks/apacheds/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolHandler.java
Sun Dec  3 15:21:42 2006
@@ -29,8 +29,6 @@
 import javax.security.auth.kerberos.KerberosPrincipal;
 
 import org.apache.directory.server.changepw.ChangePasswordConfiguration;
-import org.apache.directory.server.changepw.exceptions.ChangePasswordException;
-import org.apache.directory.server.changepw.exceptions.ErrorType;
 import org.apache.directory.server.changepw.messages.ChangePasswordErrorModifier;
 import org.apache.directory.server.changepw.messages.ChangePasswordRequest;
 import org.apache.directory.server.changepw.service.ChangePasswordChain;

Modified: directory/trunks/apacheds/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/CheckPasswordPolicy.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/CheckPasswordPolicy.java?view=diff&rev=481985&r1=481984&r2=481985
==============================================================================
--- directory/trunks/apacheds/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/CheckPasswordPolicy.java
(original)
+++ directory/trunks/apacheds/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/CheckPasswordPolicy.java
Sun Dec  3 15:21:42 2006
@@ -21,7 +21,6 @@
 
 
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 
 import javax.security.auth.kerberos.KerberosPrincipal;
@@ -183,7 +182,7 @@
     private String buildErrorMessage( String username, String password, int passwordLength,
int categoryCount,
         int tokenSize )
     {
-        List violations = new ArrayList();
+        List<String> violations = new ArrayList<String>();
 
         if ( !isValidPasswordLength( password, passwordLength ) )
         {
@@ -202,16 +201,20 @@
 
         StringBuffer sb = new StringBuffer( "Password violates policy:  " );
 
-        Iterator it = violations.iterator();
-
-        while ( it.hasNext() )
+        boolean isFirst = true;
+        
+        for ( String violation:violations )
         {
-            sb.append( ( String ) it.next() );
-
-            if ( it.hasNext() )
+            if ( isFirst )
+            {
+                isFirst = false;
+            }
+            else
             {
                 sb.append( ", " );
             }
+            
+            sb.append( violation );
         }
 
         return sb.toString();

Modified: directory/trunks/apacheds/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/OptionsField.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/OptionsField.java?view=diff&rev=481985&r1=481984&r2=481985
==============================================================================
--- directory/trunks/apacheds/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/OptionsField.java
(original)
+++ directory/trunks/apacheds/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/OptionsField.java
Sun Dec  3 15:21:42 2006
@@ -34,7 +34,7 @@
  */
 public class OptionsField
 {
-    private Set options = new HashSet();
+    private Set<DhcpOption> options = new HashSet<DhcpOption>();
 
 
     public void add( DhcpOption option )

Modified: directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/DnsConfiguration.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/DnsConfiguration.java?view=diff&rev=481985&r1=481984&r2=481985
==============================================================================
--- directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/DnsConfiguration.java
(original)
+++ directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/DnsConfiguration.java
Sun Dec  3 15:21:42 2006
@@ -67,13 +67,13 @@
     }
 
 
-    public DnsConfiguration(Map properties)
+    public DnsConfiguration( Map<String, String> properties )
     {
         this( properties, LoadStrategy.LDAP );
     }
 
 
-    public DnsConfiguration(Map properties, int strategy)
+    public DnsConfiguration( Map<String, String> properties, int strategy )
     {
         if ( properties == null )
         {
@@ -93,9 +93,9 @@
     }
 
 
-    public static Map getDefaultConfig()
+    public static Map<String, String> getDefaultConfig()
     {
-        Map defaults = new HashMap();
+        Map<String, String> defaults = new HashMap<String, String>();
 
         defaults.put( SERVICE_PID, DEFAULT_PID );
         defaults.put( IP_PORT_KEY, DEFAULT_IP_PORT );

Modified: directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/QuestionRecords.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/QuestionRecords.java?view=diff&rev=481985&r1=481984&r2=481985
==============================================================================
--- directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/QuestionRecords.java
(original)
+++ directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/QuestionRecords.java
Sun Dec  3 15:21:42 2006
@@ -28,18 +28,18 @@
 
 public class QuestionRecords
 {
-    private List questionRecords;
+    private List<QuestionRecord> questionRecords;
 
 
     public QuestionRecords()
     {
-        this.questionRecords = new ArrayList();
+        this.questionRecords = new ArrayList<QuestionRecord>();
     }
 
 
-    public QuestionRecords(int initialCapacity)
+    public QuestionRecords( int initialCapacity )
     {
-        this.questionRecords = new ArrayList( initialCapacity );
+        this.questionRecords = new ArrayList<QuestionRecord>( initialCapacity );
     }
 
 
@@ -55,7 +55,7 @@
     }
 
 
-    public Iterator iterator()
+    public Iterator<QuestionRecord> iterator()
     {
         return questionRecords.iterator();
     }
@@ -65,11 +65,8 @@
     {
         StringBuffer sb = new StringBuffer();
 
-        Iterator it = iterator();
-
-        while ( it.hasNext() )
+        for ( QuestionRecord question:questionRecords )
         {
-            QuestionRecord question = ( QuestionRecord ) it.next();
             sb.append( "\n\t" + "dnsName                    " + question.getDomainName()
);
             sb.append( "\n\t" + "dnsType                    " + question.getRecordType()
);
             sb.append( "\n\t" + "dnsClass                   " + question.getRecordClass()
);

Modified: directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ResourceRecordModifier.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ResourceRecordModifier.java?view=diff&rev=481985&r1=481984&r2=481985
==============================================================================
--- directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ResourceRecordModifier.java
(original)
+++ directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ResourceRecordModifier.java
Sun Dec  3 15:21:42 2006
@@ -35,7 +35,11 @@
     private RecordType dnsType;
     private RecordClass dnsClass;
     private int dnsTtl;
-    private Map attributes = new HashMap();
+    
+    /**
+     * TODO : Is this object really used? I don't think so...
+     */
+    private Map<String, String> attributes = new HashMap<String, String>();
 
 
     public ResourceRecord getEntry()

Modified: directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ResourceRecords.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ResourceRecords.java?view=diff&rev=481985&r1=481984&r2=481985
==============================================================================
--- directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ResourceRecords.java
(original)
+++ directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/messages/ResourceRecords.java
Sun Dec  3 15:21:42 2006
@@ -29,18 +29,18 @@
 
 public class ResourceRecords
 {
-    private List resourceRecords;
+    private List<ResourceRecord> resourceRecords;
 
 
     public ResourceRecords()
     {
-        this.resourceRecords = new ArrayList();
+        this.resourceRecords = new ArrayList<ResourceRecord>();
     }
 
 
-    public ResourceRecords(int initialCapacity)
+    public ResourceRecords( int initialCapacity )
     {
-        this.resourceRecords = new ArrayList( initialCapacity );
+        this.resourceRecords = new ArrayList<ResourceRecord>( initialCapacity );
     }
 
 
@@ -50,7 +50,7 @@
     }
 
 
-    public void addAll( Collection records )
+    public void addAll( Collection<ResourceRecord> records )
     {
         resourceRecords.addAll( records );
     }
@@ -62,7 +62,7 @@
     }
 
 
-    public Iterator iterator()
+    public Iterator<ResourceRecord> iterator()
     {
         return resourceRecords.iterator();
     }
@@ -72,11 +72,8 @@
     {
         StringBuffer sb = new StringBuffer();
 
-        Iterator it = iterator();
-
-        while ( it.hasNext() )
+        for ( ResourceRecord record: resourceRecords )
         {
-            ResourceRecord record = ( ResourceRecord ) it.next();
             sb.append( "\n\t" + "dnsName                    " + record.getDomainName() );
             sb.append( "\n\t" + "dnsType                    " + record.getRecordType() );
             sb.append( "\n\t" + "dnsClass                   " + record.getRecordClass() );

Modified: directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsEncoder.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsEncoder.java?view=diff&rev=481985&r1=481984&r2=481985
==============================================================================
--- directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsEncoder.java
(original)
+++ directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsEncoder.java
Sun Dec  3 15:21:42 2006
@@ -66,7 +66,7 @@
 
     static
     {
-        Map map = new HashMap();
+        Map<RecordType, RecordEncoder> map = new HashMap<RecordType, RecordEncoder>();
 
         map.put( RecordType.SOA, new StartOfAuthorityRecordEncoder() );
         map.put( RecordType.A, new AddressRecordEncoder() );

Modified: directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/service/DnsContext.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/service/DnsContext.java?view=diff&rev=481985&r1=481984&r2=481985
==============================================================================
--- directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/service/DnsContext.java
(original)
+++ directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/service/DnsContext.java
Sun Dec  3 15:21:42 2006
@@ -60,7 +60,7 @@
     /**
      * @param resourceRecords The resourceRecords to add.
      */
-    public void addResourceRecords( Collection resourceRecords )
+    public void addResourceRecords( Collection<ResourceRecord> resourceRecords )
     {
         this.records.addAll( resourceRecords );
     }

Modified: directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/store/operations/GetRecords.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/store/operations/GetRecords.java?view=diff&rev=481985&r1=481984&r2=481985
==============================================================================
--- directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/store/operations/GetRecords.java
(original)
+++ directory/trunks/apacheds/protocol-dns/src/main/java/org/apache/directory/server/dns/store/operations/GetRecords.java
Sun Dec  3 15:21:42 2006
@@ -72,11 +72,11 @@
     /**
      * Mappings of type to objectClass.
      */
-    private static final Map TYPE_TO_OBJECTCLASS;
+    private static final Map<RecordType, String> TYPE_TO_OBJECTCLASS;
 
     static
     {
-        Map typeToObjectClass = new HashMap();
+        Map<RecordType, String> typeToObjectClass = new HashMap<RecordType, String>();
         typeToObjectClass.put( RecordType.SOA, "apacheDnsStartOfAuthorityRecord" );
         typeToObjectClass.put( RecordType.A, "apacheDnsAddressRecord" );
         typeToObjectClass.put( RecordType.NS, "apacheDnsNameServerRecord" );
@@ -92,11 +92,11 @@
     /**
      * Mappings of type to objectClass.
      */
-    private static final Map OBJECTCLASS_TO_TYPE;
+    private static final Map<String, RecordType> OBJECTCLASS_TO_TYPE;
 
     static
     {
-        Map objectClassToType = new HashMap();
+        Map<String, RecordType> objectClassToType = new HashMap<String, RecordType>();
         objectClassToType.put( "apacheDnsStartOfAuthorityRecord", RecordType.SOA );
         objectClassToType.put( "apacheDnsAddressRecord", RecordType.A );
         objectClassToType.put( "apacheDnsNameServerRecord", RecordType.NS );

Modified: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcConfiguration.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcConfiguration.java?view=diff&rev=481985&r1=481984&r2=481985
==============================================================================
--- directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcConfiguration.java
(original)
+++ directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcConfiguration.java
Sun Dec  3 15:21:42 2006
@@ -24,7 +24,6 @@
 import java.util.ArrayList;
 import java.util.Dictionary;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -147,13 +146,13 @@
     }
 
 
-    public KdcConfiguration(Map properties)
+    public KdcConfiguration( Map<String, String> properties )
     {
         this( properties, LoadStrategy.LDAP );
     }
 
 
-    public KdcConfiguration(Map properties, int strategy)
+    public KdcConfiguration( Map<String, String> properties, int strategy )
     {
         if ( properties == null )
         {
@@ -175,9 +174,9 @@
     }
 
 
-    public static Map getDefaultConfig()
+    public static Map<String, String> getDefaultConfig()
     {
-        Map defaults = new HashMap();
+        Map<String, String> defaults = new HashMap<String, String>();
 
         defaults.put( SERVICE_PID, DEFAULT_PID );
         defaults.put( IP_PORT_KEY, DEFAULT_IP_PORT );
@@ -250,7 +249,7 @@
     }
 
 
-    public Map getProperties()
+    public Map<String, String> getProperties()
     {
         // Request that the krb5key value be returned as binary
         configuration.put( "java.naming.ldap.attributes.binary", "krb5Key" );
@@ -417,18 +416,12 @@
             encryptionTypeStrings = DEFAULT_ENCRYPTION_TYPES;
         }
 
-        List encTypes = new ArrayList();
+        List<EncryptionType> encTypes = new ArrayList<EncryptionType>();
 
-        for ( int i = 0; i < encryptionTypeStrings.length; i++ )
+        for ( String enc:encryptionTypeStrings )
         {
-            String enc = encryptionTypeStrings[i];
-
-            Iterator it = EncryptionType.VALUES.iterator();
-
-            while ( it.hasNext() )
+            for ( EncryptionType type:EncryptionType.VALUES )
             {
-                EncryptionType type = ( EncryptionType ) it.next();
-
                 if ( type.toString().equalsIgnoreCase( enc ) )
                 {
                     encTypes.add( type );

Modified: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchHandler.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchHandler.java?view=diff&rev=481985&r1=481984&r2=481985
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchHandler.java
(original)
+++ directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchHandler.java
Sun Dec  3 15:21:42 2006
@@ -37,7 +37,6 @@
 import org.apache.directory.server.core.jndi.ServerLdapContext;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.ldap.SessionRegistry;
-import org.apache.directory.shared.ldap.codec.util.LdapResultEnum;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.OperationAbandonedException;
 import org.apache.directory.shared.ldap.filter.PresenceNode;

Modified: directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpConfiguration.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpConfiguration.java?view=diff&rev=481985&r1=481984&r2=481985
==============================================================================
--- directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpConfiguration.java
(original)
+++ directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpConfiguration.java
Sun Dec  3 15:21:42 2006
@@ -68,13 +68,13 @@
     }
 
 
-    public NtpConfiguration(Map properties)
+    public NtpConfiguration( Map<String, String> properties )
     {
         this( properties, LoadStrategy.LDAP );
     }
 
 
-    public NtpConfiguration(Map properties, int strategy)
+    public NtpConfiguration( Map<String, String> properties, int strategy )
     {
         if ( properties == null )
         {
@@ -94,9 +94,9 @@
     }
 
 
-    public static Map getDefaultConfig()
+    public static Map<String, String> getDefaultConfig()
     {
-        Map defaults = new HashMap();
+        Map<String, String> defaults = new HashMap<String, String>();
 
         defaults.put( SERVICE_PID, DEFAULT_PID );
         defaults.put( IP_PORT_KEY, DEFAULT_IP_PORT );



Mime
View raw message