directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r494544 [1/2] - in /directory/trunks/apacheds: core-unit/src/test/java/org/apache/directory/server/core/authn/ core-unit/src/test/java/org/apache/directory/server/core/authz/ core-unit/src/test/java/org/apache/directory/server/core/collecti...
Date Tue, 09 Jan 2007 19:58:37 GMT
Author: akarasulu
Date: Tue Jan  9 11:58:34 2007
New Revision: 494544

URL: http://svn.apache.org/viewvc?view=rev&rev=494544
Log:
fixing generic type complaints

Modified:
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AbstractAuthorizationITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/event/EventServiceITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783ITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791ITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ListAsAdminITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ListAsNonAdminITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/RFC2713ITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ReferralITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/RootDSEITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/BadSubentryServiceITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceObjectClassChangeHandlingITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/trigger/AbstractTriggerServiceTest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/trigger/LoggingUtilities.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersITest.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
    directory/trunks/apacheds/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationITest.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationITest.java Tue Jan  9 11:58:34 2007
@@ -138,7 +138,7 @@
 
     public void test3UseAkarasulu() throws NamingException
     {
-        Hashtable env = new Hashtable( configuration.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>( configuration.toJndiEnvironment() );
         env.put( Context.PROVIDER_URL, "ou=system" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=akarasulu,ou=users,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "test" );
@@ -179,7 +179,7 @@
     {
         // clean out the database
         tearDown();
-        Hashtable env = new Hashtable( configuration.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>( configuration.toJndiEnvironment() );
         env.put( Context.SECURITY_AUTHENTICATION, "none" );
 
         configuration.setAllowAnonymousAccess( false );
@@ -194,7 +194,7 @@
         tearDown();
 
         // ok this should start up the system now as admin
-        env = new Hashtable( configuration.toJndiEnvironment() );
+        env = new Hashtable<String,Object>( configuration.toJndiEnvironment() );
         env.put( Context.SECURITY_AUTHENTICATION, "none" );
         configuration.setAllowAnonymousAccess( true );
 
@@ -236,7 +236,7 @@
         // clean out the database
         tearDown();
         doDelete( new File( "target" + File.separator + "eve" ) );
-        Hashtable env = new Hashtable( configuration.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>( configuration.toJndiEnvironment() );
         env.put( Context.SECURITY_AUTHENTICATION, "none" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
 
@@ -265,7 +265,7 @@
         // clean out the database
         tearDown();
         doDelete( new File( "target" + File.separator + "eve" ) );
-        Hashtable env = new Hashtable( configuration.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>( configuration.toJndiEnvironment() );
         env.put( Context.SECURITY_AUTHENTICATION, "simple" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=akarasulu,ou=users,ou=system" );
 
@@ -288,7 +288,7 @@
      */
     public void test8PassPrincAuthTypeSimple() throws Exception
     {
-        Hashtable env = new Hashtable( configuration.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>( configuration.toJndiEnvironment() );
         env.put( Context.PROVIDER_URL, "ou=system" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "secret" );
@@ -306,7 +306,7 @@
      */
     public void test10TestNonAdminUser() throws Exception
     {
-        Hashtable env = new Hashtable( configuration.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>( configuration.toJndiEnvironment() );
         env.put( Context.PROVIDER_URL, "ou=system" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=akarasulu,ou=users,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "test" );
@@ -318,7 +318,7 @@
 
     public void test11InvalidateCredentialCache() throws NamingException
     {
-        Hashtable env = new Hashtable( configuration.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>( configuration.toJndiEnvironment() );
         env.put( Context.PROVIDER_URL, "ou=system" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=akarasulu,ou=users,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "test" );

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AbstractAuthorizationITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AbstractAuthorizationITest.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AbstractAuthorizationITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AbstractAuthorizationITest.java Tue Jan  9 11:58:34 2007
@@ -86,9 +86,10 @@
      * @return the context for the DN as the admin user
      * @throws NamingException if is a problem initializing or getting the context
      */
+    @SuppressWarnings("unchecked")
     public DirContext getContextAsAdmin( String dn ) throws NamingException
     {
-        Hashtable env = ( Hashtable ) sysRoot.getEnvironment().clone();
+        Hashtable<String,Object> env = ( Hashtable<String,Object> ) sysRoot.getEnvironment().clone();
         env.put( DirContext.PROVIDER_URL, dn );
         env.put( DirContext.SECURITY_AUTHENTICATION, "simple" );
         env.put( DirContext.SECURITY_PRINCIPAL, PartitionNexus.ADMIN_PRINCIPAL );
@@ -236,9 +237,10 @@
      * @return the context representing the entry at the dn as a specific user
      * @throws NamingException if the does not exist or authx fails
      */
+    @SuppressWarnings("unchecked")
     public DirContext getContextAs( Name user, String password, String dn ) throws NamingException
     {
-        Hashtable env = ( Hashtable ) sysRoot.getEnvironment().clone();
+        Hashtable<String,Object> env = ( Hashtable<String,Object> ) sysRoot.getEnvironment().clone();
         env.put( DirContext.PROVIDER_URL, dn );
         env.put( DirContext.SECURITY_AUTHENTICATION, "simple" );
         env.put( DirContext.SECURITY_PRINCIPAL, user.toString() );

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminITest.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminITest.java Tue Jan  9 11:58:34 2007
@@ -106,7 +106,7 @@
     {
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
-        HashSet set = new HashSet();
+        HashSet<String> set = new HashSet<String>();
         NamingEnumeration list = sysRoot.search( "", "(objectClass=*)", controls );
 
         while ( list.hasMore() )

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminITest.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminITest.java Tue Jan  9 11:58:34 2007
@@ -110,7 +110,7 @@
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
 
-        HashSet set = new HashSet();
+        HashSet<String> set = new HashSet<String>();
         NamingEnumeration list = sysRoot.search( "", "(objectClass=*)", controls );
         while ( list.hasMore() )
         {

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationITest.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationITest.java Tue Jan  9 11:58:34 2007
@@ -225,7 +225,7 @@
      */
     private ModificationItemImpl[] toItems( int modOp, Attributes changes ) throws NamingException
     {
-        List mods = new ArrayList();
+        List<ModificationItemImpl> mods = new ArrayList<ModificationItemImpl>();
         NamingEnumeration list = changes.getAll();
         while ( list.hasMore() )
         {

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationITest.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationITest.java Tue Jan  9 11:58:34 2007
@@ -54,7 +54,7 @@
      * the map is also cleared before each search test.  This allows further inspections
      * of the results for more specific test cases.
      */
-    private Map results = new HashMap();
+    private Map<String, SearchResult> results = new HashMap<String, SearchResult>();
 
 
     /**
@@ -529,10 +529,10 @@
         assertTrue( checkCanSearchAs( "billyd", "billyd", cons, 4 ) );
 
         // check to make sure the telephoneNumber attribute is not present in results
-        Iterator list = results.values().iterator();
+        Iterator<SearchResult> list = results.values().iterator();
         while ( list.hasNext() )
         {
-            SearchResult result = ( SearchResult ) list.next();
+            SearchResult result = list.next();
             assertNull( result.getAttributes().get( "telephoneNumber" ) );
         }
 
@@ -555,7 +555,7 @@
         list = results.values().iterator();
         while ( list.hasNext() )
         {
-            SearchResult result = ( SearchResult ) list.next();
+            SearchResult result = list.next();
             assertNotNull( result.getAttributes().get( "telephoneNumber" ) );
         }
     }
@@ -595,10 +595,10 @@
         assertTrue( checkCanSearchAs( "billyd", "billyd", 3 ) );
 
         // check to make sure the ou attribute value "testEntry" is not present in results
-        Iterator list = results.values().iterator();
+        Iterator<SearchResult> list = results.values().iterator();
         while ( list.hasNext() )
         {
-            SearchResult result = ( SearchResult ) list.next();
+            SearchResult result = list.next();
             assertFalse( result.getAttributes().get( "ou" ).contains( "testEntry" ) );
         }
 
@@ -621,7 +621,7 @@
         list = results.values().iterator();
         while ( list.hasNext() )
         {
-            SearchResult result = ( SearchResult ) list.next();
+            SearchResult result = list.next();
             assertTrue( result.getAttributes().get( "ou" ).contains( "testEntry" ) );
         }
     }

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceITest.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceITest.java Tue Jan  9 11:58:34 2007
@@ -113,9 +113,9 @@
     }
 
 
-    public Map getAllEntries() throws NamingException
+    public Map<String, Attributes> getAllEntries() throws NamingException
     {
-        Map resultMap = new HashMap();
+        Map<String, Attributes> resultMap = new HashMap<String, Attributes>();
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
         controls.setReturningAttributes( new String[]
@@ -130,9 +130,9 @@
     }
 
 
-    public Map getAllEntriesRestrictAttributes() throws NamingException
+    public Map<String, Attributes> getAllEntriesRestrictAttributes() throws NamingException
     {
-        Map resultMap = new HashMap();
+        Map<String, Attributes> resultMap = new HashMap<String, Attributes>();
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
         controls.setReturningAttributes( new String[]
@@ -284,8 +284,8 @@
         // test an entry that should show the collective attribute c-ou
         // -------------------------------------------------------------------
 
-        Map entries = getAllEntries();
-        Attributes attributes = ( Attributes ) entries.get( "ou=services,ou=configuration,ou=system" );
+        Map<String, Attributes> entries = getAllEntries();
+        Attributes attributes = entries.get( "ou=services,ou=configuration,ou=system" );
         Attribute c_ou = attributes.get( "c-ou" );
         assertNotNull( "a collective c-ou attribute should be present", c_ou );
         assertEquals( "configuration", c_ou.get() );
@@ -308,7 +308,7 @@
         // test an entry that should not show the collective attribute
         // -------------------------------------------------------------------
 
-        attributes = ( Attributes ) entries.get( "ou=users,ou=system" );
+        attributes = entries.get( "ou=users,ou=system" );
         c_ou = attributes.get( "c-ou" );
         assertNull( "the c-ou collective attribute should not be present", c_ou );
 
@@ -323,7 +323,7 @@
         entries = getAllEntries();
 
         // entry should not show the c-ou collective attribute anymore
-        attributes = ( Attributes ) entries.get( "ou=services,ou=configuration,ou=system" );
+        attributes = entries.get( "ou=services,ou=configuration,ou=system" );
         c_ou = attributes.get( "c-ou" );
         if ( c_ou != null )
         {
@@ -334,7 +334,7 @@
         super.sysRoot.createSubcontext( "cn=testsubentry2", getTestSubentry2() );
         entries = getAllEntries();
 
-        attributes = ( Attributes ) entries.get( "ou=services,ou=configuration,ou=system" );
+        attributes = entries.get( "ou=services,ou=configuration,ou=system" );
         c_ou = attributes.get( "c-ou" );
         if ( c_ou != null )
         {
@@ -342,7 +342,7 @@
         }
 
         // entries without the collectiveExclusion should still show both values of c-ou
-        attributes = ( Attributes ) entries.get( "ou=interceptors,ou=configuration,ou=system" );
+        attributes = entries.get( "ou=interceptors,ou=configuration,ou=system" );
         c_ou = attributes.get( "c-ou" );
         assertNotNull( "a collective c-ou attribute should be present", c_ou );
         assertTrue( c_ou.contains( "configuration" ) );
@@ -356,13 +356,13 @@
         entries = getAllEntries();
 
         // the new attribute c-st should appear in the node with the c-ou exclusion
-        attributes = ( Attributes ) entries.get( "ou=services,ou=configuration,ou=system" );
+        attributes = entries.get( "ou=services,ou=configuration,ou=system" );
         Attribute c_st = attributes.get( "c-st" );
         assertNotNull( "a collective c-st attribute should be present", c_st );
         assertTrue( c_st.contains( "FL" ) );
 
         // in node without exclusions both values of c-ou should appear with c-st value
-        attributes = ( Attributes ) entries.get( "ou=interceptors,ou=configuration,ou=system" );
+        attributes = entries.get( "ou=interceptors,ou=configuration,ou=system" );
         c_ou = attributes.get( "c-ou" );
         assertNotNull( "a collective c-ou attribute should be present", c_ou );
         assertTrue( c_ou.contains( "configuration" ) );
@@ -382,7 +382,7 @@
         entries = getAllEntries();
 
         // none of the attributes should appear any longer
-        attributes = ( Attributes ) entries.get( "ou=interceptors,ou=configuration,ou=system" );
+        attributes = entries.get( "ou=interceptors,ou=configuration,ou=system" );
         c_ou = attributes.get( "c-ou" );
         if ( c_ou != null )
         {
@@ -401,11 +401,11 @@
         entries = getAllEntriesRestrictAttributes();
 
         // we should no longer see collective attributes with restricted return attribs
-        attributes = ( Attributes ) entries.get( "ou=services,ou=configuration,ou=system" );
+        attributes = entries.get( "ou=services,ou=configuration,ou=system" );
         c_st = attributes.get( "c-st" );
         assertNull( "a collective c-st attribute should NOT be present", c_st );
 
-        attributes = ( Attributes ) entries.get( "ou=partitions,ou=configuration,ou=system" );
+        attributes = entries.get( "ou=partitions,ou=configuration,ou=system" );
         c_ou = attributes.get( "c-ou" );
         c_st = attributes.get( "c-st" );
         assertNull( c_ou );

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationITest.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationITest.java Tue Jan  9 11:58:34 2007
@@ -66,7 +66,7 @@
         // Test AddContextPartition
         AddPartitionConfiguration addCfg = new AddPartitionConfiguration( partitionCfg );
 
-        Hashtable env = new Hashtable();
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
         env.putAll( addCfg.toJndiEnvironment() );
 

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/event/EventServiceITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/event/EventServiceITest.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/event/EventServiceITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/event/EventServiceITest.java Tue Jan  9 11:58:34 2007
@@ -121,7 +121,7 @@
 
     public class TestListener implements ObjectChangeListener, NamespaceChangeListener
     {
-        List events = new ArrayList();
+        List<EventRecord> events = new ArrayList<EventRecord>();
 
 
         public List getEventRecords()

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java Tue Jan  9 11:58:34 2007
@@ -73,7 +73,7 @@
 
     public void testSearchResultNameIsRelativeToSearchContext() throws Exception
     {
-        Hashtable env = configuration.toJndiEnvironment();
+        Hashtable<String,Object> env = configuration.toJndiEnvironment();
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
         env.put( Context.PROVIDER_URL, "ou=system" );
 
@@ -111,7 +111,7 @@
      */
     public void testPasswordComparisonSucceeds() throws Exception
     {
-        Hashtable env = configuration.toJndiEnvironment();
+        Hashtable<String,Object> env = configuration.toJndiEnvironment();
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
         env.put( Context.PROVIDER_URL, "ou=system" );
 

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783ITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783ITest.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783ITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783ITest.java Tue Jan  9 11:58:34 2007
@@ -50,7 +50,7 @@
 
         String rdn = "cn=Fiona Apple";
 
-        Hashtable env = configuration.toJndiEnvironment();
+        Hashtable<String,Object> env = configuration.toJndiEnvironment();
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
         env.put( Context.PROVIDER_URL, "ou=system" );
 

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791ITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791ITest.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791ITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791ITest.java Tue Jan  9 11:58:34 2007
@@ -63,7 +63,7 @@
     public void testDefect1a() throws NamingException 
     {
 
-        Hashtable env = configuration.toJndiEnvironment();
+        Hashtable<String,Object> env = configuration.toJndiEnvironment();
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
         env.put( Context.PROVIDER_URL, "ou=system" );
 
@@ -86,7 +86,7 @@
      */
     public void testDefect1b() throws NamingException 
     {
-        Hashtable env = configuration.toJndiEnvironment();
+        Hashtable<String,Object> env = configuration.toJndiEnvironment();
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
         env.put( Context.PROVIDER_URL, "ou=system" );
 
@@ -111,7 +111,7 @@
      */
     public void testDefect2() throws NamingException 
     {
-        Hashtable env = configuration.toJndiEnvironment();
+        Hashtable<String,Object> env = configuration.toJndiEnvironment();
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
         env.put( Context.PROVIDER_URL, "ou=system" );
 
@@ -156,7 +156,7 @@
      */
     public void testDefect3() throws NamingException 
     {
-        Hashtable env = configuration.toJndiEnvironment();
+        Hashtable<String,Object> env = configuration.toJndiEnvironment();
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
         env.put( Context.PROVIDER_URL, "ou=system" );
 

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ListAsAdminITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ListAsAdminITest.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ListAsAdminITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ListAsAdminITest.java Tue Jan  9 11:58:34 2007
@@ -41,7 +41,7 @@
 {
     public void testListSystemAsAdmin() throws NamingException
     {
-        HashSet set = new HashSet();
+        HashSet<String> set = new HashSet<String>();
 
         NamingEnumeration list = sysRoot.list( "" );
 
@@ -62,7 +62,7 @@
 
     public void testListUsersAsAdmin() throws NamingException
     {
-        HashSet set = new HashSet();
+        HashSet<String> set = new HashSet<String>();
 
         NamingEnumeration list = sysRoot.list( "ou=users" );
 

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ListAsNonAdminITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ListAsNonAdminITest.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ListAsNonAdminITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ListAsNonAdminITest.java Tue Jan  9 11:58:34 2007
@@ -41,7 +41,7 @@
 {
     public void testListSystemAsNonAdmin() throws NamingException
     {
-        HashSet set = new HashSet();
+        HashSet<String> set = new HashSet<String>();
 
         NamingEnumeration list = sysRoot.list( "" );
 
@@ -62,7 +62,7 @@
 
     public void testListUsersAsNonAdmin() throws NamingException
     {
-        HashSet set = new HashSet();
+        HashSet<String> set = new HashSet<String>();
 
         NamingEnumeration list = sysRoot.list( "ou=users" );
 

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java Tue Jan  9 11:58:34 2007
@@ -58,7 +58,7 @@
         partition.setName( "apache" );
         partition.setSuffix( suffix );
 
-        Set indexedAttributes = new HashSet();
+        Set<String> indexedAttributes = new HashSet<String>();
         indexedAttributes.add( "objectClass" );
         indexedAttributes.add( "ou" );
         indexedAttributes.add( "uid" );
@@ -74,7 +74,7 @@
 
         partition.setContextEntry( attrs );
 
-        Set partitions = new HashSet();
+        Set<MutablePartitionConfiguration> partitions = new HashSet<MutablePartitionConfiguration>();
         partitions.add( partition );
 
         configuration.setPartitionConfigurations( partitions );

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/RFC2713ITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/RFC2713ITest.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/RFC2713ITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/RFC2713ITest.java Tue Jan  9 11:58:34 2007
@@ -37,9 +37,10 @@
  */
 public class RFC2713ITest extends AbstractAdminTestCase
 {
+    @SuppressWarnings("unchecked")
     public void testSerialization() throws Exception
     {
-        ArrayList colors = new ArrayList();
+        ArrayList<String> colors = new ArrayList<String>();
         colors.add( "red" );
         colors.add( "white" );
         colors.add( "blue" );
@@ -48,7 +49,7 @@
 
         Object obj = sysRoot.lookup( "cn=colors" );
         assertTrue( obj instanceof ArrayList );
-        colors = ( ArrayList ) obj;
+        colors = ( ArrayList<String> ) obj;
         assertEquals( 3, colors.size() );
         assertTrue( colors.contains( "red" ) );
         assertTrue( colors.contains( "white" ) );

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ReferralITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ReferralITest.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ReferralITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ReferralITest.java Tue Jan  9 11:58:34 2007
@@ -116,7 +116,7 @@
             return sysRoot;
         }
 
-        Hashtable env = new Hashtable();
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
         env.put( "java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory" );
         env.put( "java.naming.provider.url", "ldap://hertz.karasulu.homeip.net:10390/ou=system" );
         env.put( "java.naming.security.principal", "uid=admin,ou=system" );
@@ -931,7 +931,7 @@
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
         NamingEnumeration list = td.rootCtx.search( "", "(objectClass=*)", controls );
-        Map results = new HashMap();
+        Map<String, SearchResult> results = new HashMap<String, SearchResult>();
         while ( list.hasMore() )
         {
             SearchResult result = ( SearchResult ) list.next();
@@ -946,7 +946,7 @@
 
         td.rootCtx.addToEnvironment( Context.REFERRAL, "throw" );
         list = td.rootCtx.search( "", "(objectClass=*)", controls );
-        results = new HashMap();
+        results = new HashMap<String, SearchResult>();
 
         try
         {
@@ -972,7 +972,7 @@
 
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
         list = td.rootCtx.search( "", "(objectClass=*)", controls );
-        results = new HashMap();
+        results = new HashMap<String, SearchResult>();
 
         try
         {

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/RootDSEITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/RootDSEITest.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/RootDSEITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/RootDSEITest.java Tue Jan  9 11:58:34 2007
@@ -92,16 +92,11 @@
     {
         super.tearDown();
 
-        Hashtable env = new Hashtable();
-
+        Hashtable<String,Object> env = new Hashtable<String,Object>();
         env.put( Context.PROVIDER_URL, "ou=system" );
-
         env.put( Context.INITIAL_CONTEXT_FACTORY, "org.apache.directory.server.core.jndi.CoreContextFactory" );
-
         env.putAll( new ShutdownConfiguration().toJndiEnvironment() );
-
         env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
-
         env.put( Context.SECURITY_CREDENTIALS, "secret" );
 
         try
@@ -125,7 +120,7 @@
         MutableStartupConfiguration cfg = new MutableStartupConfiguration();
         cfg.setWorkingDirectory( new File( "target" + File.separator + "server" ) );
 
-        Hashtable env = new Hashtable( cfg.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>( cfg.toJndiEnvironment() );
         env.put( Context.PROVIDER_URL, "" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "secret" );
@@ -148,7 +143,7 @@
         MutableStartupConfiguration cfg = new MutableStartupConfiguration();
         cfg.setWorkingDirectory( new File( "target" + File.separator + "server" ) );
 
-        Hashtable env = new Hashtable( cfg.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>( cfg.toJndiEnvironment() );
         env.put( Context.PROVIDER_URL, "" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "secret" );
@@ -178,7 +173,7 @@
         MutableStartupConfiguration cfg = new MutableStartupConfiguration();
         cfg.setWorkingDirectory( new File( "target" + File.separator + "server" ) );
 
-        Hashtable env = new Hashtable( cfg.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>( cfg.toJndiEnvironment() );
         env.put( Context.PROVIDER_URL, "" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "secret" );
@@ -186,18 +181,13 @@
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
 
         InitialContext initCtx = new InitialContext( env );
-
         assertNotNull( initCtx );
-
         DirContext ctx = ( DirContext ) initCtx.lookup( "" );
 
         Attributes attributes = ctx.getAttributes( "", new String[]
             { "namingContexts", "vendorName" } );
-
         assertEquals( 2, attributes.size() );
-
         assertEquals( "Apache Software Foundation", attributes.get( "vendorName" ).get() );
-
         assertTrue( attributes.get( "namingContexts" ).contains( "ou=system" ) );
     }
 
@@ -212,7 +202,7 @@
         MutableStartupConfiguration cfg = new MutableStartupConfiguration();
         cfg.setWorkingDirectory( new File( "target" + File.separator + "server" ) );
 
-        Hashtable env = new Hashtable( cfg.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>( cfg.toJndiEnvironment() );
         env.put( Context.PROVIDER_URL, "" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "secret" );
@@ -220,17 +210,13 @@
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
 
         InitialContext initCtx = new InitialContext( env );
-
         assertNotNull( initCtx );
-
         DirContext ctx = ( DirContext ) initCtx.lookup( "" );
-
         LdapNoPermissionException notNull = null;
 
         try
         {
             ctx.destroySubcontext( "" );
-
             fail( "we should never get here" );
         }
         catch ( LdapNoPermissionException e )
@@ -252,7 +238,7 @@
         MutableStartupConfiguration cfg = new MutableStartupConfiguration();
         cfg.setWorkingDirectory( new File( "target" + File.separator + "server" ) );
 
-        Hashtable env = new Hashtable( cfg.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>( cfg.toJndiEnvironment() );
         env.put( Context.PROVIDER_URL, "" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "secret" );
@@ -260,17 +246,13 @@
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
 
         InitialContext initCtx = new InitialContext( env );
-
         assertNotNull( initCtx );
-
         DirContext ctx = ( DirContext ) initCtx.lookup( "" );
-
         LdapNoPermissionException notNull = null;
 
         try
         {
             ctx.rename( "", "ou=system" );
-
             fail( "we should never get here" );
         }
         catch ( LdapNoPermissionException e )
@@ -292,7 +274,7 @@
         MutableStartupConfiguration cfg = new MutableStartupConfiguration();
         cfg.setWorkingDirectory( new File( "target" + File.separator + "server" ) );
 
-        Hashtable env = new Hashtable( cfg.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>( cfg.toJndiEnvironment() );
         env.put( Context.PROVIDER_URL, "" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "secret" );
@@ -300,17 +282,13 @@
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
 
         InitialContext initCtx = new InitialContext( env );
-
         assertNotNull( initCtx );
-
         DirContext ctx = ( DirContext ) initCtx.lookup( "" );
-
         LdapNoPermissionException notNull = null;
 
         try
         {
             ctx.modifyAttributes( "", DirContext.ADD_ATTRIBUTE, null );
-
             fail( "we should never get here" );
         }
         catch ( LdapNoPermissionException e )
@@ -332,7 +310,7 @@
         MutableStartupConfiguration cfg = new MutableStartupConfiguration();
         cfg.setWorkingDirectory( new File( "target" + File.separator + "server" ) );
 
-        Hashtable env = new Hashtable( cfg.toJndiEnvironment() );
+        Hashtable<String,Object> env = new Hashtable<String,Object>( cfg.toJndiEnvironment() );
         env.put( Context.PROVIDER_URL, "" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "secret" );

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextITest.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextITest.java Tue Jan  9 11:58:34 2007
@@ -163,7 +163,7 @@
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
         controls.setDerefLinkFlag( false );
         sysRoot.addToEnvironment( DerefAliasesEnum.JNDI_DEREF_ALIAS_PROP, DerefAliasesEnum.NEVER_DEREF_ALIASES );
-        HashMap map = new HashMap();
+        HashMap<String,Attributes> map = new HashMap<String,Attributes>();
 
         NamingEnumeration list = sysRoot.search( "", "(ou=*)", controls );
         while ( list.hasMore() )
@@ -186,7 +186,7 @@
         controls.setDerefLinkFlag( false );
         sysRoot.addToEnvironment( DerefAliasesEnum.JNDI_DEREF_ALIAS_PROP, DerefAliasesEnum.NEVER_DEREF_ALIASES );
 
-        HashMap map = new HashMap();
+        HashMap<String, Attributes> map = new HashMap<String, Attributes>();
         NamingEnumeration list = sysRoot.search( "", "(ou=*)", controls );
         while ( list.hasMore() )
         {
@@ -210,7 +210,7 @@
         controls.setDerefLinkFlag( false );
         sysRoot.addToEnvironment( DerefAliasesEnum.JNDI_DEREF_ALIAS_PROP, DerefAliasesEnum.NEVER_DEREF_ALIASES );
 
-        HashMap map = new HashMap();
+        HashMap<String, Attributes> map = new HashMap<String, Attributes>();
         NamingEnumeration list = sysRoot.search( "", "(objectClass=organ*)", controls );
         while ( list.hasMore() )
         {
@@ -234,7 +234,7 @@
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
         controls.setDerefLinkFlag( false );
         sysRoot.addToEnvironment( DerefAliasesEnum.JNDI_DEREF_ALIAS_PROP, DerefAliasesEnum.NEVER_DEREF_ALIASES );
-        HashMap map = new HashMap();
+        HashMap<String, Attributes> map = new HashMap<String, Attributes>();
 
         NamingEnumeration list = sysRoot.search( "", "(| (ou={0}) (ou={1}))", new Object[]
             { "testing00", "testing01" }, controls );
@@ -258,7 +258,7 @@
         controls.setCountLimit( 7 );
         sysRoot.addToEnvironment( DerefAliasesEnum.JNDI_DEREF_ALIAS_PROP, DerefAliasesEnum.NEVER_DEREF_ALIASES );
 
-        HashMap map = new HashMap();
+        HashMap<String, Attributes> map = new HashMap<String, Attributes>();
         NamingEnumeration list = sysRoot.search( "", "(ou=*)", controls );
 
         try
@@ -285,7 +285,7 @@
         controls.setTimeLimit( 200 );
         sysRoot.addToEnvironment( DerefAliasesEnum.JNDI_DEREF_ALIAS_PROP, DerefAliasesEnum.NEVER_DEREF_ALIASES );
 
-        HashMap map = new HashMap();
+        HashMap<String, Attributes> map = new HashMap<String, Attributes>();
         NamingEnumeration list = sysRoot.search( "", "(ou=*)", controls );
         SearchResultFilteringEnumeration srfe = ( SearchResultFilteringEnumeration ) list;
         srfe.addResultFilter( new SearchResultFilter()
@@ -328,7 +328,7 @@
         controls.setDerefLinkFlag( false );
         sysRoot.addToEnvironment( DerefAliasesEnum.JNDI_DEREF_ALIAS_PROP, DerefAliasesEnum.NEVER_DEREF_ALIASES );
         
-        HashMap map = new HashMap();
+        HashMap<String, Attributes> map = new HashMap<String, Attributes>();
         NamingEnumeration list = sysRoot.search( "", "(name=testing00)", controls );
         while ( list.hasMore() )
         {
@@ -347,7 +347,7 @@
         controls.setDerefLinkFlag( false );
         sysRoot.addToEnvironment( DerefAliasesEnum.JNDI_DEREF_ALIAS_PROP, DerefAliasesEnum.NEVER_DEREF_ALIASES );
         
-        HashMap map = new HashMap();
+        HashMap<String, Attributes> map = new HashMap<String, Attributes>();
         NamingEnumeration list = sysRoot.search( "", "(name=*)", controls );
         while ( list.hasMore() )
         {
@@ -379,7 +379,7 @@
         controls.setDerefLinkFlag( false );
         sysRoot.addToEnvironment( DerefAliasesEnum.JNDI_DEREF_ALIAS_PROP, DerefAliasesEnum.NEVER_DEREF_ALIASES );
         
-        HashMap map = new HashMap();
+        HashMap<String, Attributes> map = new HashMap<String, Attributes>();
         NamingEnumeration list = sysRoot.search( "", "(| (name=testing00)(name=testing01))", controls );
         while ( list.hasMore() )
         {
@@ -399,7 +399,7 @@
         controls.setDerefLinkFlag( false );
         sysRoot.addToEnvironment( DerefAliasesEnum.JNDI_DEREF_ALIAS_PROP, DerefAliasesEnum.NEVER_DEREF_ALIASES );
         
-        HashMap map = new HashMap();
+        HashMap<String, Attributes> map = new HashMap<String, Attributes>();
         NamingEnumeration list = sysRoot.search( "", "(name=testing*)", controls );
         while ( list.hasMore() )
         {
@@ -420,7 +420,7 @@
         controls.setDerefLinkFlag( false );
         sysRoot.addToEnvironment( DerefAliasesEnum.JNDI_DEREF_ALIAS_PROP, DerefAliasesEnum.NEVER_DEREF_ALIASES );
         
-        HashMap map = new HashMap();
+        HashMap<String, Attributes> map = new HashMap<String, Attributes>();
         String filter = "(|(2.5.4.11.1=testing*)(2.5.4.54=testing*)(2.5.4.10=testing*)" +
             "(2.5.4.6=testing*)(2.5.4.43=testing*)(2.5.4.7.1=testing*)(2.5.4.10.1=testing*)" +
             "(2.5.4.44=testing*)(2.5.4.11=testing*)(2.5.4.4=testing*)(2.5.4.8.1=testing*)" +
@@ -446,7 +446,7 @@
         controls.setDerefLinkFlag( false );
         controls.setReturningAttributes( new String[] { "creatorsName" } );
         sysRoot.addToEnvironment( DerefAliasesEnum.JNDI_DEREF_ALIAS_PROP, DerefAliasesEnum.NEVER_DEREF_ALIASES );
-        HashMap map = new HashMap();
+        HashMap<String, Attributes> map = new HashMap<String, Attributes>();
 
         NamingEnumeration list = sysRoot.search( "", "(ou=testing00)", controls );
         while ( list.hasMore() )
@@ -457,7 +457,7 @@
 
         assertEquals( "Expected number of results returned was incorrect!", 1, map.size() );
         assertTrue( map.containsKey( "ou=testing00,ou=system" ) );
-        Attributes attrs = ( Attributes ) map.get( "ou=testing00,ou=system" );
+        Attributes attrs = map.get( "ou=testing00,ou=system" );
         assertEquals( "normalized creator's name", "0.9.2342.19200300.100.1.1=admin,2.5.4.11=system", 
             attrs.get( "creatorsName" ).get() );
     }
@@ -470,7 +470,7 @@
         controls.setDerefLinkFlag( false );
         controls.setReturningAttributes( new String[] { "creatorsName" } );
         sysRoot.addToEnvironment( DerefAliasesEnum.JNDI_DEREF_ALIAS_PROP, DerefAliasesEnum.NEVER_DEREF_ALIASES );
-        HashMap map = new HashMap();
+        HashMap<String, Attributes> map = new HashMap<String, Attributes>();
 
         NamingEnumeration list = sysRoot.search( "", "(ou=testing00)", controls );
         while ( list.hasMore() )
@@ -481,7 +481,7 @@
 
         assertEquals( "Expected number of results returned was incorrect!", 1, map.size() );
         assertTrue( map.containsKey( "ou=testing00,ou=system" ) );
-        Attributes attrs = ( Attributes ) map.get( "ou=testing00,ou=system" );
+        Attributes attrs = map.get( "ou=testing00,ou=system" );
         assertEquals( "normalized creator's name", "uid=admin,ou=system", 
             attrs.get( "creatorsName" ).get() );
     }

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/BadSubentryServiceITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/BadSubentryServiceITest.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/BadSubentryServiceITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/BadSubentryServiceITest.java Tue Jan  9 11:58:34 2007
@@ -129,9 +129,9 @@
     }
 
 
-    public Map getAllEntries() throws NamingException
+    public Map<String, Attributes> getAllEntries() throws NamingException
     {
-        Map resultMap = new HashMap();
+        Map<String, Attributes> resultMap = new HashMap<String, Attributes>();
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
         controls.setReturningAttributes( new String[] { "+", "*" } );
@@ -158,8 +158,8 @@
             getAccessControlTestSubentry( "accessControlTestSubentry" ) );
         super.sysRoot.createSubcontext( "cn=testEntry", getTestEntry( "testEntry" ) );
         
-        Map results = getAllEntries();
-        Attributes testEntry = ( Attributes ) results.get( "cn=testEntry,ou=system" );
+        Map<String, Attributes> results = getAllEntries();
+        Attributes testEntry = results.get( "cn=testEntry,ou=system" );
         
         //----------------------------------------------------------------------
         



Mime
View raw message