directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r494544 [2/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
Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java Tue Jan  9 11:58:34 2007
@@ -103,9 +103,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[]
@@ -126,13 +126,13 @@
         super.sysRoot.createSubcontext( "cn=testsubentry", getTestSubentry() );
         super.sysRoot.createSubcontext( "cn=unmarked", getTestEntry( "unmarked" ) );
         super.sysRoot.createSubcontext( "cn=marked,ou=configuration", getTestEntry( "marked" ) );
-        Map results = getAllEntries();
+        Map<String, Attributes> results = getAllEntries();
 
         // --------------------------------------------------------------------
         // Make sure entries selected by the subentry do have the mark
         // --------------------------------------------------------------------
 
-        Attributes marked = ( Attributes ) results.get( "cn=marked,ou=configuration,ou=system" );
+        Attributes marked = results.get( "cn=marked,ou=configuration,ou=system" );
         Attribute collectiveAttributeSubentries = marked.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=marked,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
@@ -142,7 +142,7 @@
         // Make sure entries not selected by subentry do not have the mark
         // --------------------------------------------------------------------
 
-        Attributes unmarked = ( Attributes ) results.get( "cn=unmarked,ou=system" );
+        Attributes unmarked = results.get( "cn=unmarked,ou=system" );
         assertNull( "cn=unmarked,ou=system should not be marked", unmarked
             .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
     }
@@ -161,31 +161,31 @@
 
         addAdministrativeRole( "collectiveArributeSpecificArea" );
         super.sysRoot.createSubcontext( "cn=testsubentry", getTestSubentry() );
-        Map results = getAllEntries();
+        Map<String, Attributes> results = getAllEntries();
 
         // --------------------------------------------------------------------
         // Make sure entries selected by the subentry do have the mark
         // --------------------------------------------------------------------
 
-        Attributes configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
+        Attributes configuration = results.get( "ou=configuration,ou=system" );
         Attribute collectiveAttributeSubentries = configuration.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        Attributes interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
+        Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" );
         collectiveAttributeSubentries = interceptors.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        Attributes partitions = ( Attributes ) results.get( "ou=partitions,ou=configuration,ou=system" );
+        Attributes partitions = results.get( "ou=partitions,ou=configuration,ou=system" );
         collectiveAttributeSubentries = partitions.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        Attributes services = ( Attributes ) results.get( "ou=services,ou=configuration,ou=system" );
+        Attributes services = results.get( "ou=services,ou=configuration,ou=system" );
         collectiveAttributeSubentries = services.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=services,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
@@ -195,19 +195,19 @@
         // Make sure entries not selected by subentry do not have the mark
         // --------------------------------------------------------------------
 
-        Attributes system = ( Attributes ) results.get( "ou=system" );
+        Attributes system = results.get( "ou=system" );
         assertNull( "ou=system should not be marked", system.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes users = ( Attributes ) results.get( "ou=users,ou=system" );
+        Attributes users = results.get( "ou=users,ou=system" );
         assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes groups = ( Attributes ) results.get( "ou=groups,ou=system" );
+        Attributes groups = results.get( "ou=groups,ou=system" );
         assertNull( "ou=groups,ou=system should not be marked", groups.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes admin = ( Attributes ) results.get( "uid=admin,ou=system" );
+        Attributes admin = results.get( "uid=admin,ou=system" );
         assertNull( "uid=admin,ou=system should not be marked", admin.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes sysPrefRoot = ( Attributes ) results.get( "prefNodeName=sysPrefRoot,ou=system" );
+        Attributes sysPrefRoot = results.get( "prefNodeName=sysPrefRoot,ou=system" );
         assertNull( "prefNode=sysPrefRoot,ou=system should not be marked", sysPrefRoot
             .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
@@ -218,31 +218,31 @@
     {
         addAdministrativeRole( "collectiveArributeSpecificArea" );
         super.sysRoot.createSubcontext( "cn=testsubentry", getTestSubentry() );
-        Map results = getAllEntries();
+        Map<String, Attributes> results = getAllEntries();
 
         // --------------------------------------------------------------------
         // Make sure entries selected by the subentry do have the mark
         // --------------------------------------------------------------------
 
-        Attributes configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
+        Attributes configuration = results.get( "ou=configuration,ou=system" );
         Attribute collectiveAttributeSubentries = configuration.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        Attributes interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
+        Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" );
         collectiveAttributeSubentries = interceptors.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        Attributes partitions = ( Attributes ) results.get( "ou=partitions,ou=configuration,ou=system" );
+        Attributes partitions = results.get( "ou=partitions,ou=configuration,ou=system" );
         collectiveAttributeSubentries = partitions.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        Attributes services = ( Attributes ) results.get( "ou=services,ou=configuration,ou=system" );
+        Attributes services = results.get( "ou=services,ou=configuration,ou=system" );
         collectiveAttributeSubentries = services.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=services,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
@@ -252,19 +252,19 @@
         // Make sure entries not selected by subentry do not have the mark
         // --------------------------------------------------------------------
 
-        Attributes system = ( Attributes ) results.get( "ou=system" );
+        Attributes system = results.get( "ou=system" );
         assertNull( "ou=system should not be marked", system.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes users = ( Attributes ) results.get( "ou=users,ou=system" );
+        Attributes users = results.get( "ou=users,ou=system" );
         assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes groups = ( Attributes ) results.get( "ou=groups,ou=system" );
+        Attributes groups = results.get( "ou=groups,ou=system" );
         assertNull( "ou=groups,ou=system should not be marked", groups.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes admin = ( Attributes ) results.get( "uid=admin,ou=system" );
+        Attributes admin = results.get( "uid=admin,ou=system" );
         assertNull( "uid=admin,ou=system should not be marked", admin.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes sysPrefRoot = ( Attributes ) results.get( "prefNodeName=sysPrefRoot,ou=system" );
+        Attributes sysPrefRoot = results.get( "prefNodeName=sysPrefRoot,ou=system" );
         assertNull( "prefNode=sysPrefRoot,ou=system should not be marked", sysPrefRoot
             .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
@@ -283,19 +283,19 @@
         // Make sure entries selected by the subentry do have the mark
         // --------------------------------------------------------------------
 
-        configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
+        configuration = results.get( "ou=configuration,ou=system" );
         collectiveAttributeSubentries = configuration.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
+        interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" );
         collectiveAttributeSubentries = interceptors.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        partitions = ( Attributes ) results.get( "ou=partitions,ou=configuration,ou=system" );
+        partitions = results.get( "ou=partitions,ou=configuration,ou=system" );
         collectiveAttributeSubentries = partitions.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
@@ -305,23 +305,23 @@
         // Make sure entries not selected by subentry do not have the mark
         // --------------------------------------------------------------------
 
-        system = ( Attributes ) results.get( "ou=system" );
+        system = results.get( "ou=system" );
         assertNull( "ou=system should not be marked", system.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        users = ( Attributes ) results.get( "ou=users,ou=system" );
+        users = results.get( "ou=users,ou=system" );
         assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        groups = ( Attributes ) results.get( "ou=groups,ou=system" );
+        groups = results.get( "ou=groups,ou=system" );
         assertNull( "ou=groups,ou=system should not be marked", groups.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        admin = ( Attributes ) results.get( "uid=admin,ou=system" );
+        admin = results.get( "uid=admin,ou=system" );
         assertNull( "uid=admin,ou=system should not be marked", admin.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        sysPrefRoot = ( Attributes ) results.get( "prefNodeName=sysPrefRoot,ou=system" );
+        sysPrefRoot = results.get( "prefNodeName=sysPrefRoot,ou=system" );
         assertNull( "prefNode=sysPrefRoot,ou=system should not be marked", sysPrefRoot
             .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        services = ( Attributes ) results.get( "ou=services,ou=configuration,ou=system" );
+        services = results.get( "ou=services,ou=configuration,ou=system" );
         collectiveAttributeSubentries = services.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         if ( collectiveAttributeSubentries != null )
         {
@@ -334,31 +334,31 @@
     {
         addAdministrativeRole( "collectiveArributeSpecificArea" );
         super.sysRoot.createSubcontext( "cn=testsubentry", getTestSubentry() );
-        Map results = getAllEntries();
+        Map<String, Attributes> results = getAllEntries();
 
         // --------------------------------------------------------------------
         // Make sure entries selected by the subentry do have the mark
         // --------------------------------------------------------------------
 
-        Attributes configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
+        Attributes configuration = results.get( "ou=configuration,ou=system" );
         Attribute collectiveAttributeSubentries = configuration.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        Attributes interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
+        Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" );
         collectiveAttributeSubentries = interceptors.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        Attributes partitions = ( Attributes ) results.get( "ou=partitions,ou=configuration,ou=system" );
+        Attributes partitions = results.get( "ou=partitions,ou=configuration,ou=system" );
         collectiveAttributeSubentries = partitions.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        Attributes services = ( Attributes ) results.get( "ou=services,ou=configuration,ou=system" );
+        Attributes services = results.get( "ou=services,ou=configuration,ou=system" );
         collectiveAttributeSubentries = services.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=services,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
@@ -368,19 +368,19 @@
         // Make sure entries not selected by subentry do not have the mark
         // --------------------------------------------------------------------
 
-        Attributes system = ( Attributes ) results.get( "ou=system" );
+        Attributes system = results.get( "ou=system" );
         assertNull( "ou=system should not be marked", system.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes users = ( Attributes ) results.get( "ou=users,ou=system" );
+        Attributes users = results.get( "ou=users,ou=system" );
         assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes groups = ( Attributes ) results.get( "ou=groups,ou=system" );
+        Attributes groups = results.get( "ou=groups,ou=system" );
         assertNull( "ou=groups,ou=system should not be marked", groups.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes admin = ( Attributes ) results.get( "uid=admin,ou=system" );
+        Attributes admin = results.get( "uid=admin,ou=system" );
         assertNull( "uid=admin,ou=system should not be marked", admin.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes sysPrefRoot = ( Attributes ) results.get( "prefNodeName=sysPrefRoot,ou=system" );
+        Attributes sysPrefRoot = results.get( "prefNodeName=sysPrefRoot,ou=system" );
         assertNull( "prefNode=sysPrefRoot,ou=system should not be marked", sysPrefRoot
             .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
@@ -398,19 +398,19 @@
         // Make sure entries selected by the subentry do have the mark
         // --------------------------------------------------------------------
 
-        configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
+        configuration = results.get( "ou=configuration,ou=system" );
         collectiveAttributeSubentries = configuration.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
+        interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" );
         collectiveAttributeSubentries = interceptors.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        partitions = ( Attributes ) results.get( "ou=partitions,ou=configuration,ou=system" );
+        partitions = results.get( "ou=partitions,ou=configuration,ou=system" );
         collectiveAttributeSubentries = partitions.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
@@ -420,23 +420,23 @@
         // Make sure entries not selected by subentry do not have the mark
         // --------------------------------------------------------------------
 
-        system = ( Attributes ) results.get( "ou=system" );
+        system = results.get( "ou=system" );
         assertNull( "ou=system should not be marked", system.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        users = ( Attributes ) results.get( "ou=users,ou=system" );
+        users = results.get( "ou=users,ou=system" );
         assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        groups = ( Attributes ) results.get( "ou=groups,ou=system" );
+        groups = results.get( "ou=groups,ou=system" );
         assertNull( "ou=groups,ou=system should not be marked", groups.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        admin = ( Attributes ) results.get( "uid=admin,ou=system" );
+        admin = results.get( "uid=admin,ou=system" );
         assertNull( "uid=admin,ou=system should not be marked", admin.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        sysPrefRoot = ( Attributes ) results.get( "prefNodeName=sysPrefRoot,ou=system" );
+        sysPrefRoot = results.get( "prefNodeName=sysPrefRoot,ou=system" );
         assertNull( "prefNode=sysPrefRoot,ou=system should not be marked", sysPrefRoot
             .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        services = ( Attributes ) results.get( "ou=services,ou=configuration,ou=system" );
+        services = results.get( "ou=services,ou=configuration,ou=system" );
         collectiveAttributeSubentries = services.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         if ( collectiveAttributeSubentries != null )
         {
@@ -451,20 +451,20 @@
         super.sysRoot.createSubcontext( "cn=testsubentry", getTestSubentry() );
         super.sysRoot.destroySubcontext( "cn=testsubentry" );
 
-        Map results = getAllEntries();
+        Map<String, Attributes> results = getAllEntries();
 
         // --------------------------------------------------------------------
         // Make sure entries not selected by subentry do not have the mark
         // --------------------------------------------------------------------
 
-        Attributes configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
+        Attributes configuration = results.get( "ou=configuration,ou=system" );
         Attribute collectiveAttributeSubentries = configuration.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         if ( collectiveAttributeSubentries != null )
         {
             assertEquals( "ou=configuration,ou=system should not be marked", 0, collectiveAttributeSubentries.size() );
         }
 
-        Attributes interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
+        Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" );
         collectiveAttributeSubentries = interceptors.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         if ( collectiveAttributeSubentries != null )
         {
@@ -472,30 +472,30 @@
                 .size() );
         }
 
-        Attributes partitions = ( Attributes ) results.get( "ou=partitions,ou=configuration,ou=system" );
+        Attributes partitions = results.get( "ou=partitions,ou=configuration,ou=system" );
         collectiveAttributeSubentries = partitions.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         if ( collectiveAttributeSubentries != null )
         {
             assertEquals( "ou=partitions,ou=configuration,ou=system should not be marked", 0, collectiveAttributeSubentries.size() );
         }
 
-        Attributes services = ( Attributes ) results.get( "ou=services,ou=configuration,ou=system" );
+        Attributes services = results.get( "ou=services,ou=configuration,ou=system" );
         collectiveAttributeSubentries = services.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         if ( collectiveAttributeSubentries != null )
         {
             assertEquals( "ou=services,ou=configuration,ou=system should not be marked", 0, collectiveAttributeSubentries.size() );
         }
 
-        Attributes system = ( Attributes ) results.get( "ou=system" );
+        Attributes system = results.get( "ou=system" );
         assertNull( "ou=system should not be marked", system.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes users = ( Attributes ) results.get( "ou=users,ou=system" );
+        Attributes users = results.get( "ou=users,ou=system" );
         assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes admin = ( Attributes ) results.get( "uid=admin,ou=system" );
+        Attributes admin = results.get( "uid=admin,ou=system" );
         assertNull( "uid=admin,ou=system should not be marked", admin.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes sysPrefRoot = ( Attributes ) results.get( "prefNodeName=sysPrefRoot,ou=system" );
+        Attributes sysPrefRoot = results.get( "prefNodeName=sysPrefRoot,ou=system" );
         assertNull( "prefNode=sysPrefRoot,ou=system should not be marked", sysPrefRoot
             .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
@@ -507,31 +507,31 @@
         addAdministrativeRole( "collectiveArributeSpecificArea" );
         super.sysRoot.createSubcontext( "cn=testsubentry", getTestSubentry() );
         super.sysRoot.rename( "cn=testsubentry", "cn=newname" );
-        Map results = getAllEntries();
+        Map<String, Attributes> results = getAllEntries();
 
         // --------------------------------------------------------------------
         // Make sure entries selected by the subentry do have the mark
         // --------------------------------------------------------------------
 
-        Attributes configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
+        Attributes configuration = results.get( "ou=configuration,ou=system" );
         Attribute collectiveAttributeSubentries = configuration.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=newname,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        Attributes interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
+        Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" );
         collectiveAttributeSubentries = interceptors.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=newname,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        Attributes partitions = ( Attributes ) results.get( "ou=partitions,ou=configuration,ou=system" );
+        Attributes partitions = results.get( "ou=partitions,ou=configuration,ou=system" );
         collectiveAttributeSubentries = partitions.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=newname,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        Attributes services = ( Attributes ) results.get( "ou=services,ou=configuration,ou=system" );
+        Attributes services = results.get( "ou=services,ou=configuration,ou=system" );
         collectiveAttributeSubentries = services.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=services,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=newname,2.5.4.11=system", collectiveAttributeSubentries.get() );
@@ -541,19 +541,19 @@
         // Make sure entries not selected by subentry do not have the mark
         // --------------------------------------------------------------------
 
-        Attributes system = ( Attributes ) results.get( "ou=system" );
+        Attributes system = results.get( "ou=system" );
         assertNull( "ou=system should not be marked", system.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes users = ( Attributes ) results.get( "ou=users,ou=system" );
+        Attributes users = results.get( "ou=users,ou=system" );
         assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes groups = ( Attributes ) results.get( "ou=groups,ou=system" );
+        Attributes groups = results.get( "ou=groups,ou=system" );
         assertNull( "ou=groups,ou=system should not be marked", groups.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes admin = ( Attributes ) results.get( "uid=admin,ou=system" );
+        Attributes admin = results.get( "uid=admin,ou=system" );
         assertNull( "uid=admin,ou=system should not be marked", admin.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes sysPrefRoot = ( Attributes ) results.get( "prefNodeName=sysPrefRoot,ou=system" );
+        Attributes sysPrefRoot = results.get( "prefNodeName=sysPrefRoot,ou=system" );
         assertNull( "prefNode=sysPrefRoot,ou=system should not be marked", sysPrefRoot
             .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
@@ -566,37 +566,37 @@
         super.sysRoot.createSubcontext( "cn=testsubentry", getTestSubentryWithExclusion() );
         super.sysRoot.createSubcontext( "cn=unmarked,ou=configuration", getTestEntry( "unmarked" ) );
         super.sysRoot.createSubcontext( "cn=marked,ou=configuration", getTestEntry( "marked" ) );
-        Map results = getAllEntries();
+        Map<String, Attributes> results = getAllEntries();
 
         // --------------------------------------------------------------------
         // Make sure entries selected by the subentry do have the mark
         // --------------------------------------------------------------------
 
-        Attributes configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
+        Attributes configuration = results.get( "ou=configuration,ou=system" );
         Attribute collectiveAttributeSubentries = configuration.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        Attributes interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
+        Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" );
         collectiveAttributeSubentries = interceptors.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        Attributes partitions = ( Attributes ) results.get( "ou=partitions,ou=configuration,ou=system" );
+        Attributes partitions = results.get( "ou=partitions,ou=configuration,ou=system" );
         collectiveAttributeSubentries = partitions.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        Attributes services = ( Attributes ) results.get( "ou=services,ou=configuration,ou=system" );
+        Attributes services = results.get( "ou=services,ou=configuration,ou=system" );
         collectiveAttributeSubentries = services.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=services,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        Attributes marked = ( Attributes ) results.get( "cn=marked,ou=configuration,ou=system" );
+        Attributes marked = results.get( "cn=marked,ou=configuration,ou=system" );
         collectiveAttributeSubentries = marked.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
@@ -606,23 +606,23 @@
         // Make sure entries not selected by subentry do not have the mark
         // --------------------------------------------------------------------
 
-        Attributes system = ( Attributes ) results.get( "ou=system" );
+        Attributes system = results.get( "ou=system" );
         assertNull( "ou=system should not be marked", system.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes users = ( Attributes ) results.get( "ou=users,ou=system" );
+        Attributes users = results.get( "ou=users,ou=system" );
         assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes groups = ( Attributes ) results.get( "ou=groups,ou=system" );
+        Attributes groups = results.get( "ou=groups,ou=system" );
         assertNull( "ou=groups,ou=system should not be marked", groups.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes admin = ( Attributes ) results.get( "uid=admin,ou=system" );
+        Attributes admin = results.get( "uid=admin,ou=system" );
         assertNull( "uid=admin,ou=system should not be marked", admin.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes sysPrefRoot = ( Attributes ) results.get( "prefNodeName=sysPrefRoot,ou=system" );
+        Attributes sysPrefRoot = results.get( "prefNodeName=sysPrefRoot,ou=system" );
         assertNull( "prefNode=sysPrefRoot,ou=system should not be marked", sysPrefRoot
             .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes unmarked = ( Attributes ) results.get( "cn=unmarked,ou=configuration,ou=system" );
+        Attributes unmarked = results.get( "cn=unmarked,ou=configuration,ou=system" );
         assertNull( "cn=unmarked,ou=configuration,ou=system should not be marked", unmarked
             .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
@@ -634,7 +634,7 @@
         super.sysRoot.rename( "cn=marked,ou=configuration", "cn=unmarked,ou=configuration" );
         results = getAllEntries();
 
-        unmarked = ( Attributes ) results.get( "cn=unmarked,ou=configuration,ou=system" );
+        unmarked = results.get( "cn=unmarked,ou=configuration,ou=system" );
         assertNull( "cn=unmarked,ou=configuration,ou=system should not be marked", unmarked
             .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
         assertNull( results.get( "cn=marked,ou=configuration,ou=system" ) );
@@ -646,7 +646,7 @@
         super.sysRoot.rename( "cn=unmarked,ou=configuration", "cn=marked,ou=configuration" );
         results = getAllEntries();
         assertNull( results.get( "cn=unmarked,ou=configuration,ou=system" ) );
-        marked = ( Attributes ) results.get( "cn=marked,ou=configuration,ou=system" );
+        marked = results.get( "cn=marked,ou=configuration,ou=system" );
         assertNotNull( marked );
         collectiveAttributeSubentries = marked.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
@@ -661,37 +661,37 @@
         super.sysRoot.createSubcontext( "cn=testsubentry", getTestSubentryWithExclusion() );
         super.sysRoot.createSubcontext( "cn=unmarked", getTestEntry( "unmarked" ) );
         super.sysRoot.createSubcontext( "cn=marked,ou=configuration", getTestEntry( "marked" ) );
-        Map results = getAllEntries();
+        Map<String, Attributes> results = getAllEntries();
 
         // --------------------------------------------------------------------
         // Make sure entries selected by the subentry do have the mark
         // --------------------------------------------------------------------
 
-        Attributes configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
+        Attributes configuration = results.get( "ou=configuration,ou=system" );
         Attribute collectiveAttributeSubentries = configuration.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        Attributes interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
+        Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" );
         collectiveAttributeSubentries = interceptors.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        Attributes partitions = ( Attributes ) results.get( "ou=partitions,ou=configuration,ou=system" );
+        Attributes partitions = results.get( "ou=partitions,ou=configuration,ou=system" );
         collectiveAttributeSubentries = partitions.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        Attributes services = ( Attributes ) results.get( "ou=services,ou=configuration,ou=system" );
+        Attributes services = results.get( "ou=services,ou=configuration,ou=system" );
         collectiveAttributeSubentries = services.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=services,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        Attributes marked = ( Attributes ) results.get( "cn=marked,ou=configuration,ou=system" );
+        Attributes marked = results.get( "cn=marked,ou=configuration,ou=system" );
         collectiveAttributeSubentries = marked.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
@@ -701,23 +701,23 @@
         // Make sure entries not selected by subentry do not have the mark
         // --------------------------------------------------------------------
 
-        Attributes system = ( Attributes ) results.get( "ou=system" );
+        Attributes system = results.get( "ou=system" );
         assertNull( "ou=system should not be marked", system.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes users = ( Attributes ) results.get( "ou=users,ou=system" );
+        Attributes users = results.get( "ou=users,ou=system" );
         assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes groups = ( Attributes ) results.get( "ou=groups,ou=system" );
+        Attributes groups = results.get( "ou=groups,ou=system" );
         assertNull( "ou=groups,ou=system should not be marked", groups.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes admin = ( Attributes ) results.get( "uid=admin,ou=system" );
+        Attributes admin = results.get( "uid=admin,ou=system" );
         assertNull( "uid=admin,ou=system should not be marked", admin.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes sysPrefRoot = ( Attributes ) results.get( "prefNodeName=sysPrefRoot,ou=system" );
+        Attributes sysPrefRoot = results.get( "prefNodeName=sysPrefRoot,ou=system" );
         assertNull( "prefNode=sysPrefRoot,ou=system should not be marked", sysPrefRoot
             .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes unmarked = ( Attributes ) results.get( "cn=unmarked,ou=system" );
+        Attributes unmarked = results.get( "cn=unmarked,ou=system" );
         assertNull( "cn=unmarked,ou=system should not be marked", unmarked
             .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
@@ -729,7 +729,7 @@
         super.sysRoot.rename( "cn=marked,ou=configuration", "cn=unmarked" );
         results = getAllEntries();
 
-        unmarked = ( Attributes ) results.get( "cn=unmarked,ou=system" );
+        unmarked = results.get( "cn=unmarked,ou=system" );
         assertNull( "cn=unmarked,ou=system should not be marked", unmarked
             .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
         assertNull( results.get( "cn=marked,ou=configuration,ou=system" ) );
@@ -741,7 +741,7 @@
         super.sysRoot.rename( "cn=unmarked", "cn=marked,ou=configuration" );
         results = getAllEntries();
         assertNull( results.get( "cn=unmarked,ou=system" ) );
-        marked = ( Attributes ) results.get( "cn=marked,ou=configuration,ou=system" );
+        marked = results.get( "cn=marked,ou=configuration,ou=system" );
         assertNotNull( marked );
         collectiveAttributeSubentries = marked.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
@@ -756,37 +756,37 @@
         super.sysRoot.createSubcontext( "cn=testsubentry", getTestSubentryWithExclusion() );
         super.sysRoot.createSubcontext( "cn=unmarked", getTestEntry( "unmarked" ) );
         super.sysRoot.createSubcontext( "cn=marked,ou=configuration", getTestEntry( "marked" ) );
-        Map results = getAllEntries();
+        Map<String, Attributes> results = getAllEntries();
 
         // --------------------------------------------------------------------
         // Make sure entries selected by the subentry do have the mark
         // --------------------------------------------------------------------
 
-        Attributes configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
+        Attributes configuration = results.get( "ou=configuration,ou=system" );
         Attribute collectiveAttributeSubentries = configuration.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        Attributes interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
+        Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" );
         collectiveAttributeSubentries = interceptors.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        Attributes partitions = ( Attributes ) results.get( "ou=partitions,ou=configuration,ou=system" );
+        Attributes partitions = results.get( "ou=partitions,ou=configuration,ou=system" );
         collectiveAttributeSubentries = partitions.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        Attributes services = ( Attributes ) results.get( "ou=services,ou=configuration,ou=system" );
+        Attributes services = results.get( "ou=services,ou=configuration,ou=system" );
         collectiveAttributeSubentries = services.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "ou=services,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
         assertEquals( 1, collectiveAttributeSubentries.size() );
 
-        Attributes marked = ( Attributes ) results.get( "cn=marked,ou=configuration,ou=system" );
+        Attributes marked = results.get( "cn=marked,ou=configuration,ou=system" );
         collectiveAttributeSubentries = marked.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", collectiveAttributeSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", collectiveAttributeSubentries.get() );
@@ -796,23 +796,23 @@
         // Make sure entries not selected by subentry do not have the mark
         // --------------------------------------------------------------------
 
-        Attributes system = ( Attributes ) results.get( "ou=system" );
+        Attributes system = results.get( "ou=system" );
         assertNull( "ou=system should not be marked", system.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes users = ( Attributes ) results.get( "ou=users,ou=system" );
+        Attributes users = results.get( "ou=users,ou=system" );
         assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes groups = ( Attributes ) results.get( "ou=groups,ou=system" );
+        Attributes groups = results.get( "ou=groups,ou=system" );
         assertNull( "ou=groups,ou=system should not be marked", groups.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes admin = ( Attributes ) results.get( "uid=admin,ou=system" );
+        Attributes admin = results.get( "uid=admin,ou=system" );
         assertNull( "uid=admin,ou=system should not be marked", admin.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes sysPrefRoot = ( Attributes ) results.get( "prefNodeName=sysPrefRoot,ou=system" );
+        Attributes sysPrefRoot = results.get( "prefNodeName=sysPrefRoot,ou=system" );
         assertNull( "prefNode=sysPrefRoot,ou=system should not be marked", sysPrefRoot
             .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
-        Attributes unmarked = ( Attributes ) results.get( "cn=unmarked,ou=system" );
+        Attributes unmarked = results.get( "cn=unmarked,ou=system" );
         assertNull( "cn=unmarked,ou=system should not be marked", unmarked
             .get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES ) );
 
@@ -824,11 +824,11 @@
         super.sysRoot.rename( "cn=marked,ou=configuration", "cn=marked,ou=services,ou=configuration" );
         results = getAllEntries();
 
-        unmarked = ( Attributes ) results.get( "cn=unmarked,ou=system" );
+        unmarked = results.get( "cn=unmarked,ou=system" );
         assertNull( "cn=unmarked,ou=system should not be marked", unmarked );
         assertNull( results.get( "cn=marked,ou=configuration,ou=system" ) );
 
-        marked = ( Attributes ) results.get( "cn=marked,ou=services,ou=configuration,ou=system" );
+        marked = results.get( "cn=marked,ou=services,ou=configuration,ou=system" );
         assertNotNull( marked );
         collectiveAttributeSubentries = marked.get( SubentryService.COLLECTIVE_ATTRIBUTE_SUBENTRIES );
         assertNotNull( "cn=marked,ou=services,ou=configuration should be marked", collectiveAttributeSubentries );
@@ -845,7 +845,7 @@
         searchControls.setSearchScope( SearchControls.SUBTREE_SCOPE );
 
         // perform the search without the control
-        Map entries = new HashMap();
+        Map<String, SearchResult> entries = new HashMap<String, SearchResult>();
         NamingEnumeration list = super.sysRoot.search( "", "(objectClass=*)", searchControls );
         while ( list.hasMore() )
         {
@@ -874,7 +874,7 @@
         SearchControls searchControls = new SearchControls();
         searchControls.setSearchScope( SearchControls.OBJECT_SCOPE );
 
-        Map entries = new HashMap();
+        Map<String, SearchResult> entries = new HashMap<String, SearchResult>();
         NamingEnumeration list = super.sysRoot.search( "cn=testsubentry", "(objectClass=subentry)", searchControls );
         while ( list.hasMore() )
         {

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceObjectClassChangeHandlingITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceObjectClassChangeHandlingITest.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceObjectClassChangeHandlingITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceObjectClassChangeHandlingITest.java Tue Jan  9 11:58:34 2007
@@ -97,9 +97,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[]

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/trigger/AbstractTriggerServiceTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/trigger/AbstractTriggerServiceTest.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/trigger/AbstractTriggerServiceTest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/trigger/AbstractTriggerServiceTest.java Tue Jan  9 11:58:34 2007
@@ -75,9 +75,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 ) sysRoot.getEnvironment().clone();
         env.put( DirContext.PROVIDER_URL, dn );
         env.put( DirContext.SECURITY_AUTHENTICATION, "simple" );
         env.put( DirContext.SECURITY_PRINCIPAL, PartitionNexus.ADMIN_PRINCIPAL );
@@ -109,9 +110,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 ) 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/trigger/LoggingUtilities.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/trigger/LoggingUtilities.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/trigger/LoggingUtilities.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/trigger/LoggingUtilities.java Tue Jan  9 11:58:34 2007
@@ -2,13 +2,17 @@
 
 import javax.naming.Name;
 import javax.naming.NamingException;
-import javax.naming.ldap.LdapContext;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 public class LoggingUtilities
 {
+    private static final Logger log = LoggerFactory.getLogger( LoggingUtilities.class ); 
+    
     public static void logWarningForDeletedEntry( Name deletedEntryName, Name operationPrincipal ) throws NamingException
     {
-        System.out.println( "User \"" + operationPrincipal + "\" is about to delete entry \"" + deletedEntryName + "\"." );
+        log.info( "User \"" + operationPrincipal + "\" is about to delete entry \"" + deletedEntryName + "\"." );
     }
 }

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersITest.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersITest.java Tue Jan  9 11:58:34 2007
@@ -101,9 +101,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[]
@@ -123,13 +123,13 @@
         super.sysRoot.createSubcontext( "cn=testsubentry", getTestSubentry() );
         super.sysRoot.createSubcontext( "cn=unmarked", getTestEntry( "unmarked" ) );
         super.sysRoot.createSubcontext( "cn=marked,ou=configuration", getTestEntry( "marked" ) );
-        Map results = getAllEntries();
+        Map<String, Attributes> results = getAllEntries();
 
         // --------------------------------------------------------------------
         // Make sure entries selected by the subentry do have the mark
         // --------------------------------------------------------------------
 
-        Attributes marked = ( Attributes ) results.get( "cn=marked,ou=configuration,ou=system" );
+        Attributes marked = results.get( "cn=marked,ou=configuration,ou=system" );
         Attribute triggerSubentries = marked.get( SubentryService.TRIGGER_SUBENTRIES );
         assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", triggerSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() );
@@ -139,7 +139,7 @@
         // Make sure entries not selected by subentry do not have the mark
         // --------------------------------------------------------------------
 
-        Attributes unmarked = ( Attributes ) results.get( "cn=unmarked,ou=system" );
+        Attributes unmarked = results.get( "cn=unmarked,ou=system" );
         assertNull( "cn=unmarked,ou=system should not be marked", unmarked
             .get( SubentryService.TRIGGER_SUBENTRIES ) );
     }
@@ -158,19 +158,19 @@
 
         addTheAdministrativeRole();
         super.sysRoot.createSubcontext( "cn=testsubentry", getTestSubentry() );
-        Map results = getAllEntries();
+        Map<String, Attributes> results = getAllEntries();
 
         // --------------------------------------------------------------------
         // Make sure entries selected by the subentry do have the mark
         // --------------------------------------------------------------------
 
-        Attributes configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
+        Attributes configuration = results.get( "ou=configuration,ou=system" );
         Attribute triggerSubentries = configuration.get( SubentryService.TRIGGER_SUBENTRIES );
         assertNotNull( "ou=configuration,ou=system should be marked", triggerSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() );
         assertEquals( 1, triggerSubentries.size() );
 
-        Attributes interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
+        Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" );
         triggerSubentries = interceptors.get( SubentryService.TRIGGER_SUBENTRIES );
         assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", triggerSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() );
@@ -180,10 +180,10 @@
         // Make sure entries not selected by subentry do not have the mark
         // --------------------------------------------------------------------
 
-        Attributes system = ( Attributes ) results.get( "ou=system" );
+        Attributes system = results.get( "ou=system" );
         assertNull( "ou=system should not be marked", system.get( SubentryService.TRIGGER_SUBENTRIES ) );
 
-        Attributes users = ( Attributes ) results.get( "ou=users,ou=system" );
+        Attributes users = results.get( "ou=users,ou=system" );
         assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.TRIGGER_SUBENTRIES ) );
     }
 
@@ -192,19 +192,19 @@
     {
         addTheAdministrativeRole();
         super.sysRoot.createSubcontext( "cn=testsubentry", getTestSubentry() );
-        Map results = getAllEntries();
+        Map<String, Attributes> results = getAllEntries();
 
         // --------------------------------------------------------------------
         // Make sure entries selected by the subentry do have the mark
         // --------------------------------------------------------------------
 
-        Attributes configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
+        Attributes configuration = results.get( "ou=configuration,ou=system" );
         Attribute triggerSubentries = configuration.get( SubentryService.TRIGGER_SUBENTRIES );
         assertNotNull( "ou=configuration,ou=system should be marked", triggerSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() );
         assertEquals( 1, triggerSubentries.size() );
 
-        Attributes interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
+        Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" );
         triggerSubentries = interceptors.get( SubentryService.TRIGGER_SUBENTRIES );
         assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", triggerSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() );
@@ -214,10 +214,10 @@
         // Make sure entries not selected by subentry do not have the mark
         // --------------------------------------------------------------------
 
-        Attributes system = ( Attributes ) results.get( "ou=system" );
+        Attributes system = results.get( "ou=system" );
         assertNull( "ou=system should not be marked", system.get( SubentryService.TRIGGER_SUBENTRIES ) );
 
-        Attributes users = ( Attributes ) results.get( "ou=users,ou=system" );
+        Attributes users = results.get( "ou=users,ou=system" );
         assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.TRIGGER_SUBENTRIES ) );
 
         // --------------------------------------------------------------------
@@ -234,7 +234,7 @@
         // Make sure entries selected by the subentry do have the mark
         // --------------------------------------------------------------------
 
-        configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
+        configuration = results.get( "ou=configuration,ou=system" );
         triggerSubentries = configuration.get( SubentryService.TRIGGER_SUBENTRIES );
         assertNotNull( "ou=configuration,ou=system should be marked", triggerSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() );
@@ -244,13 +244,13 @@
         // Make sure entries not selected by subentry do not have the mark
         // --------------------------------------------------------------------
 
-        system = ( Attributes ) results.get( "ou=system" );
+        system = results.get( "ou=system" );
         assertNull( "ou=system should not be marked", system.get( SubentryService.TRIGGER_SUBENTRIES ) );
 
-        users = ( Attributes ) results.get( "ou=users,ou=system" );
+        users = results.get( "ou=users,ou=system" );
         assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.TRIGGER_SUBENTRIES ) );
 
-        interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
+        interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" );
         triggerSubentries = interceptors.get( SubentryService.TRIGGER_SUBENTRIES );
         if ( triggerSubentries != null )
         {
@@ -264,30 +264,30 @@
         addTheAdministrativeRole();
         super.sysRoot.createSubcontext( "cn=testsubentry", getTestSubentry() );
         super.sysRoot.destroySubcontext( "cn=testsubentry" );
-        Map results = getAllEntries();
+        Map<String, Attributes> results = getAllEntries();
 
         // --------------------------------------------------------------------
         // Make sure entries not selected by subentry do not have the mark
         // --------------------------------------------------------------------
 
-        Attributes configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
+        Attributes configuration = results.get( "ou=configuration,ou=system" );
         Attribute triggerSubentries = configuration.get( SubentryService.TRIGGER_SUBENTRIES );
         if ( triggerSubentries != null )
         {
             assertEquals( "ou=configuration,ou=system should not be marked", 0, triggerSubentries.size() );
         }
 
-        Attributes interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
+        Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" );
         triggerSubentries = interceptors.get( SubentryService.TRIGGER_SUBENTRIES );
         if ( triggerSubentries != null )
         {
             assertEquals( "ou=interceptors,ou=configuration,ou=system should not be marked", 0, triggerSubentries.size() );
         }
 
-        Attributes system = ( Attributes ) results.get( "ou=system" );
+        Attributes system = results.get( "ou=system" );
         assertNull( "ou=system should not be marked", system.get( SubentryService.TRIGGER_SUBENTRIES ) );
 
-        Attributes users = ( Attributes ) results.get( "ou=users,ou=system" );
+        Attributes users = results.get( "ou=users,ou=system" );
         assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.TRIGGER_SUBENTRIES ) );
     }
 
@@ -297,19 +297,19 @@
         addTheAdministrativeRole();
         super.sysRoot.createSubcontext( "cn=testsubentry", getTestSubentry() );
         super.sysRoot.rename( "cn=testsubentry", "cn=newname" );
-        Map results = getAllEntries();
+        Map<String, Attributes> results = getAllEntries();
 
         // --------------------------------------------------------------------
         // Make sure entries selected by the subentry do have the mark
         // --------------------------------------------------------------------
 
-        Attributes configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
+        Attributes configuration = results.get( "ou=configuration,ou=system" );
         Attribute triggerSubentries = configuration.get( SubentryService.TRIGGER_SUBENTRIES );
         assertNotNull( "ou=configuration,ou=system should be marked", triggerSubentries );
         assertEquals( "2.5.4.3=newname,2.5.4.11=system", triggerSubentries.get() );
         assertEquals( 1, triggerSubentries.size() );
 
-        Attributes interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
+        Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" );
         triggerSubentries = interceptors.get( SubentryService.TRIGGER_SUBENTRIES );
         assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", triggerSubentries );
         assertEquals( "2.5.4.3=newname,2.5.4.11=system", triggerSubentries.get() );
@@ -319,10 +319,10 @@
         // Make sure entries not selected by subentry do not have the mark
         // --------------------------------------------------------------------
 
-        Attributes system = ( Attributes ) results.get( "ou=system" );
+        Attributes system = results.get( "ou=system" );
         assertNull( "ou=system should not be marked", system.get( SubentryService.TRIGGER_SUBENTRIES ) );
 
-        Attributes users = ( Attributes ) results.get( "ou=users,ou=system" );
+        Attributes users = results.get( "ou=users,ou=system" );
         assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.TRIGGER_SUBENTRIES ) );
     }
 
@@ -333,25 +333,25 @@
         super.sysRoot.createSubcontext( "cn=testsubentry", getTestSubentryWithExclusion() );
         super.sysRoot.createSubcontext( "cn=unmarked,ou=configuration", getTestEntry( "unmarked" ) );
         super.sysRoot.createSubcontext( "cn=marked,ou=configuration", getTestEntry( "marked" ) );
-        Map results = getAllEntries();
+        Map<String, Attributes> results = getAllEntries();
 
         // --------------------------------------------------------------------
         // Make sure entries selected by the subentry do have the mark
         // --------------------------------------------------------------------
 
-        Attributes configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
+        Attributes configuration = results.get( "ou=configuration,ou=system" );
         Attribute triggerSubentries = configuration.get( SubentryService.TRIGGER_SUBENTRIES );
         assertNotNull( "ou=configuration,ou=system should be marked", triggerSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() );
         assertEquals( 1, triggerSubentries.size() );
 
-        Attributes interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
+        Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" );
         triggerSubentries = interceptors.get( SubentryService.TRIGGER_SUBENTRIES );
         assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", triggerSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() );
         assertEquals( 1, triggerSubentries.size() );
 
-        Attributes marked = ( Attributes ) results.get( "cn=marked,ou=configuration,ou=system" );
+        Attributes marked = results.get( "cn=marked,ou=configuration,ou=system" );
         triggerSubentries = marked.get( SubentryService.TRIGGER_SUBENTRIES );
         assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", triggerSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() );
@@ -361,13 +361,13 @@
         // Make sure entries not selected by subentry do not have the mark
         // --------------------------------------------------------------------
 
-        Attributes system = ( Attributes ) results.get( "ou=system" );
+        Attributes system = results.get( "ou=system" );
         assertNull( "ou=system should not be marked", system.get( SubentryService.TRIGGER_SUBENTRIES ) );
 
-        Attributes users = ( Attributes ) results.get( "ou=users,ou=system" );
+        Attributes users = results.get( "ou=users,ou=system" );
         assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.TRIGGER_SUBENTRIES ) );
 
-        Attributes unmarked = ( Attributes ) results.get( "cn=unmarked,ou=configuration,ou=system" );
+        Attributes unmarked = results.get( "cn=unmarked,ou=configuration,ou=system" );
         assertNull( "cn=unmarked,ou=configuration,ou=system should not be marked", unmarked
             .get( SubentryService.TRIGGER_SUBENTRIES ) );
 
@@ -379,7 +379,7 @@
         super.sysRoot.rename( "cn=marked,ou=configuration", "cn=unmarked,ou=configuration" );
         results = getAllEntries();
 
-        unmarked = ( Attributes ) results.get( "cn=unmarked,ou=configuration,ou=system" );
+        unmarked = results.get( "cn=unmarked,ou=configuration,ou=system" );
         assertNull( "cn=unmarked,ou=configuration,ou=system should not be marked", unmarked
             .get( SubentryService.TRIGGER_SUBENTRIES ) );
         assertNull( results.get( "cn=marked,ou=configuration,ou=system" ) );
@@ -391,7 +391,7 @@
         super.sysRoot.rename( "cn=unmarked,ou=configuration", "cn=marked,ou=configuration" );
         results = getAllEntries();
         assertNull( results.get( "cn=unmarked,ou=configuration,ou=system" ) );
-        marked = ( Attributes ) results.get( "cn=marked,ou=configuration,ou=system" );
+        marked = results.get( "cn=marked,ou=configuration,ou=system" );
         assertNotNull( marked );
         triggerSubentries = marked.get( SubentryService.TRIGGER_SUBENTRIES );
         assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", triggerSubentries );
@@ -406,25 +406,25 @@
         super.sysRoot.createSubcontext( "cn=testsubentry", getTestSubentryWithExclusion() );
         super.sysRoot.createSubcontext( "cn=unmarked", getTestEntry( "unmarked" ) );
         super.sysRoot.createSubcontext( "cn=marked,ou=configuration", getTestEntry( "marked" ) );
-        Map results = getAllEntries();
+        Map<String, Attributes> results = getAllEntries();
 
         // --------------------------------------------------------------------
         // Make sure entries selected by the subentry do have the mark
         // --------------------------------------------------------------------
 
-        Attributes configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
+        Attributes configuration = results.get( "ou=configuration,ou=system" );
         Attribute triggerSubentries = configuration.get( SubentryService.TRIGGER_SUBENTRIES );
         assertNotNull( "ou=configuration,ou=system should be marked", triggerSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() );
         assertEquals( 1, triggerSubentries.size() );
 
-        Attributes interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
+        Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" );
         triggerSubentries = interceptors.get( SubentryService.TRIGGER_SUBENTRIES );
         assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", triggerSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() );
         assertEquals( 1, triggerSubentries.size() );
 
-        Attributes marked = ( Attributes ) results.get( "cn=marked,ou=configuration,ou=system" );
+        Attributes marked = results.get( "cn=marked,ou=configuration,ou=system" );
         triggerSubentries = marked.get( SubentryService.TRIGGER_SUBENTRIES );
         assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", triggerSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() );
@@ -434,13 +434,13 @@
         // Make sure entries not selected by subentry do not have the mark
         // --------------------------------------------------------------------
 
-        Attributes system = ( Attributes ) results.get( "ou=system" );
+        Attributes system = results.get( "ou=system" );
         assertNull( "ou=system should not be marked", system.get( SubentryService.TRIGGER_SUBENTRIES ) );
 
-        Attributes users = ( Attributes ) results.get( "ou=users,ou=system" );
+        Attributes users = results.get( "ou=users,ou=system" );
         assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.TRIGGER_SUBENTRIES ) );
 
-        Attributes unmarked = ( Attributes ) results.get( "cn=unmarked,ou=system" );
+        Attributes unmarked = results.get( "cn=unmarked,ou=system" );
         assertNull( "cn=unmarked,ou=system should not be marked", unmarked
             .get( SubentryService.TRIGGER_SUBENTRIES ) );
 
@@ -452,7 +452,7 @@
         super.sysRoot.rename( "cn=marked,ou=configuration", "cn=unmarked" );
         results = getAllEntries();
 
-        unmarked = ( Attributes ) results.get( "cn=unmarked,ou=system" );
+        unmarked = results.get( "cn=unmarked,ou=system" );
         assertNull( "cn=unmarked,ou=system should not be marked", unmarked
             .get( SubentryService.TRIGGER_SUBENTRIES ) );
         assertNull( results.get( "cn=marked,ou=configuration,ou=system" ) );
@@ -464,7 +464,7 @@
         super.sysRoot.rename( "cn=unmarked", "cn=marked,ou=configuration" );
         results = getAllEntries();
         assertNull( results.get( "cn=unmarked,ou=system" ) );
-        marked = ( Attributes ) results.get( "cn=marked,ou=configuration,ou=system" );
+        marked = results.get( "cn=marked,ou=configuration,ou=system" );
         assertNotNull( marked );
         triggerSubentries = marked.get( SubentryService.TRIGGER_SUBENTRIES );
         assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", triggerSubentries );
@@ -479,25 +479,25 @@
         super.sysRoot.createSubcontext( "cn=testsubentry", getTestSubentryWithExclusion() );
         super.sysRoot.createSubcontext( "cn=unmarked", getTestEntry( "unmarked" ) );
         super.sysRoot.createSubcontext( "cn=marked,ou=configuration", getTestEntry( "marked" ) );
-        Map results = getAllEntries();
+        Map<String, Attributes> results = getAllEntries();
 
         // --------------------------------------------------------------------
         // Make sure entries selected by the subentry do have the mark
         // --------------------------------------------------------------------
 
-        Attributes configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
+        Attributes configuration = results.get( "ou=configuration,ou=system" );
         Attribute triggerSubentries = configuration.get( SubentryService.TRIGGER_SUBENTRIES );
         assertNotNull( "ou=configuration,ou=system should be marked", triggerSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() );
         assertEquals( 1, triggerSubentries.size() );
 
-        Attributes interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
+        Attributes interceptors = results.get( "ou=interceptors,ou=configuration,ou=system" );
         triggerSubentries = interceptors.get( SubentryService.TRIGGER_SUBENTRIES );
         assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", triggerSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() );
         assertEquals( 1, triggerSubentries.size() );
 
-        Attributes marked = ( Attributes ) results.get( "cn=marked,ou=configuration,ou=system" );
+        Attributes marked = results.get( "cn=marked,ou=configuration,ou=system" );
         triggerSubentries = marked.get( SubentryService.TRIGGER_SUBENTRIES );
         assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", triggerSubentries );
         assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", triggerSubentries.get() );
@@ -507,13 +507,13 @@
         // Make sure entries not selected by subentry do not have the mark
         // --------------------------------------------------------------------
 
-        Attributes system = ( Attributes ) results.get( "ou=system" );
+        Attributes system = results.get( "ou=system" );
         assertNull( "ou=system should not be marked", system.get( SubentryService.TRIGGER_SUBENTRIES ) );
 
-        Attributes users = ( Attributes ) results.get( "ou=users,ou=system" );
+        Attributes users = results.get( "ou=users,ou=system" );
         assertNull( "ou=users,ou=system should not be marked", users.get( SubentryService.TRIGGER_SUBENTRIES ) );
 
-        Attributes unmarked = ( Attributes ) results.get( "cn=unmarked,ou=system" );
+        Attributes unmarked = results.get( "cn=unmarked,ou=system" );
         assertNull( "cn=unmarked,ou=system should not be marked", unmarked
             .get( SubentryService.TRIGGER_SUBENTRIES ) );
 
@@ -525,11 +525,11 @@
         super.sysRoot.rename( "cn=marked,ou=configuration", "cn=marked,ou=interceptors,ou=configuration" );
         results = getAllEntries();
 
-        unmarked = ( Attributes ) results.get( "cn=unmarked,ou=system" );
+        unmarked = results.get( "cn=unmarked,ou=system" );
         assertNull( "cn=unmarked,ou=system should not be marked", unmarked );
         assertNull( results.get( "cn=marked,ou=configuration,ou=system" ) );
 
-        marked = ( Attributes ) results.get( "cn=marked,ou=interceptors,ou=configuration,ou=system" );
+        marked = results.get( "cn=marked,ou=interceptors,ou=configuration,ou=system" );
         assertNotNull( marked );
         triggerSubentries = marked.get( SubentryService.TRIGGER_SUBENTRIES );
         assertNotNull( "cn=marked,ou=interceptors,ou=configuration should be marked", triggerSubentries );

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java Tue Jan  9 11:58:34 2007
@@ -92,7 +92,7 @@
     }
 
 
-    public void setPartitionConfigurations( Set<PartitionConfiguration> paritionConfigurations )
+    public void setPartitionConfigurations( Set<? extends PartitionConfiguration> paritionConfigurations )
     {
         super.setPartitionConfigurations( paritionConfigurations );
     }

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java Tue Jan  9 11:58:34 2007
@@ -241,7 +241,7 @@
     /**
      * Sets {@link PartitionConfiguration}s to configure context partitions.
      */
-    protected void setPartitionConfigurations( Set<PartitionConfiguration> contextParitionConfigurations )
+    protected void setPartitionConfigurations( Set<? extends PartitionConfiguration> contextParitionConfigurations )
     {
         Set newSet = ConfigurationUtil.getTypeSafeSet( contextParitionConfigurations,
             PartitionConfiguration.class );

Modified: directory/trunks/apacheds/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java?view=diff&rev=494544&r1=494543&r2=494544
==============================================================================
--- directory/trunks/apacheds/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java (original)
+++ directory/trunks/apacheds/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java Tue Jan  9 11:58:34 2007
@@ -18,7 +18,7 @@
  *  
  */
 package org.apache.directory.server.configuration;
-
+ 
 
 import java.io.File;
 import java.util.Collection;
@@ -102,7 +102,7 @@
     }
 
 
-    public void setPartitionConfigurations( Set<PartitionConfiguration> arg0 )
+    public void setPartitionConfigurations( Set<? extends PartitionConfiguration> arg0 )
     {
         super.setPartitionConfigurations( arg0 );
     }



Mime
View raw message