directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r487169 - /directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/MessageDecoder.java
Date Thu, 14 Dec 2006 10:53:36 GMT
Author: elecharny
Date: Thu Dec 14 02:53:35 2006
New Revision: 487169

URL: http://svn.apache.org/viewvc?view=rev&rev=487169
Log:
A few less warnings

Modified:
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/MessageDecoder.java

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/MessageDecoder.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/MessageDecoder.java?view=diff&rev=487169&r1=487168&r2=487169
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/MessageDecoder.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/MessageDecoder.java
Thu Dec 14 02:53:35 2006
@@ -88,7 +88,7 @@
         this.env.put( Provider.BERLIB_PROVIDER, providerEnv.get( Provider.BERLIB_PROVIDER
) );
         this.provider = Provider.getProvider( providerEnv );
 
-        Set binaries;
+        Set<String> binaries;
 
         if ( env.containsKey( BINARY_KEY ) )
         {
@@ -100,6 +100,7 @@
                 {
                     log.warn( "Null value for " + BINARY_KEY + " key in environment.  Using
empty set for binaries." );
                 }
+                
                 binaries = Collections.EMPTY_SET;
             }
             else if ( val instanceof String )
@@ -107,21 +108,21 @@
                 // parse out all words based on expected JNDI format of this
                 // attribute
                 String binaryIds = ( String ) val;
-                binaries = new HashSet();
+                binaries = new HashSet<String>();
 
                 if ( !StringTools.isEmpty( binaryIds ) )
                 {
                     String[] binaryArray = binaryIds.split( " " );
 
-                    for ( int i = 0; i < binaryArray.length; i++ )
+                    for ( String binary:binaryArray )
                     {
-                        binaries.add( StringTools.lowerCase( StringTools.trim( binaryArray[i]
) ) );
+                        binaries.add( StringTools.lowerCase( StringTools.trim( binary ) )
);
                     }
                 }
             } // if already parsed and set as a collection use it
             else if ( val instanceof Collection )
             {
-                binaries = new HashSet();
+                binaries = new HashSet<String>();
                 binaries.addAll( ( Set ) val );
             } // complain if it's something else
             else



Mime
View raw message