directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r379013 [4/45] - in /directory/trunks/apacheds: ./ core-plugin/ core-plugin/src/main/java/org/apache/directory/server/core/tools/schema/ core-plugin/src/test/java/org/apache/directory/server/core/tools/schema/ core-shared/ core-shared/src/m...
Date Mon, 20 Feb 2006 03:58:21 GMT
Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationTest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationTest.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationTest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationTest.java Sun Feb 19 19:57:02 2006
@@ -48,6 +48,7 @@
      */
     private Map results = new HashMap();
 
+
     /**
      * Generates a set of simple organizationalUnit entries where the
      * ou of the entry returned is the index of the entry in the array.
@@ -77,7 +78,7 @@
 
 
     private void recursivelyAddSearchData( Name parent, Attributes[] children, final int sizeLimit, int[] count )
-            throws NamingException
+        throws NamingException
     {
         Name[] childRdns = new Name[children.length];
         for ( int ii = 0; ii < children.length && count[0] < sizeLimit; ii++ )
@@ -118,8 +119,9 @@
     {
         parent = ( Name ) parent.clone();
         parent.add( "ou=tests" );
-        sysRoot.createSubcontext( parent, getTestNodes(1)[0] );
-        recursivelyAddSearchData( parent, getTestNodes( branchingFactor ), sizelimit, new int[] { 1 } );
+        sysRoot.createSubcontext( parent, getTestNodes( 1 )[0] );
+        recursivelyAddSearchData( parent, getTestNodes( branchingFactor ), sizelimit, new int[]
+            { 1 } );
         return parent;
     }
 
@@ -188,7 +190,7 @@
      * @throws NamingException if there are problems conducting the search
      */
     private boolean checkCanSearchAs( String uid, String password, SearchControls cons, int resultSetSz )
-            throws NamingException
+        throws NamingException
     {
         return checkCanSearchAs( uid, password, "(objectClass=*)", cons, resultSetSz );
     }
@@ -205,8 +207,8 @@
      * @return true if the search succeeds as expected, false otherwise
      * @throws NamingException if there are problems conducting the search
      */
-    private boolean checkCanSearchAs( String uid, String password, String filter,
-                                      SearchControls cons, int resultSetSz ) throws NamingException
+    private boolean checkCanSearchAs( String uid, String password, String filter, SearchControls cons, int resultSetSz )
+        throws NamingException
     {
         if ( cons == null )
         {
@@ -214,7 +216,7 @@
         }
 
         Name base = addSearchData( new LdapName(), 3, 10 );
-        Name userDn = new LdapName( "uid="+uid+",ou=users,ou=system" );
+        Name userDn = new LdapName( "uid=" + uid + ",ou=users,ou=system" );
         try
         {
             results.clear();
@@ -249,9 +251,8 @@
      * @return true if the search succeeds as expected, false otherwise
      * @throws NamingException if there are problems conducting the search
      */
-    private boolean checkSearchAsWithEntryACI( String uid, String password, SearchControls cons, Name rdn,
-                                               String aci, int resultSetSz )
-            throws NamingException
+    private boolean checkSearchAsWithEntryACI( String uid, String password, SearchControls cons, Name rdn, String aci,
+        int resultSetSz ) throws NamingException
     {
         if ( cons == null )
         {
@@ -260,7 +261,7 @@
 
         Name base = addSearchData( new LdapName(), 3, 10 );
         addEntryACI( rdn, aci );
-        Name userDn = new LdapName( "uid="+uid+",ou=users,ou=system" );
+        Name userDn = new LdapName( "uid=" + uid + ",ou=users,ou=system" );
         try
         {
             results.clear();
@@ -308,7 +309,14 @@
 
         assertEquals( 10, counter );
         recursivelyDelete( base );
-        try { sysRoot.lookup( base ); fail(); } catch ( LdapNameNotFoundException e ) {}
+        try
+        {
+            sysRoot.lookup( base );
+            fail();
+        }
+        catch ( LdapNameNotFoundException e )
+        {
+        }
     }
 
 
@@ -316,7 +324,6 @@
     // All or nothing search ACI rule tests
     // -----------------------------------------------------------------------
 
-
     /**
      * Checks to make sure group membership based userClass works for add operations.
      *
@@ -332,15 +339,11 @@
 
         // Gives search perms to all users in the Administrators group for
         // entries and all attribute types and values
-        createAccessControlSubentry( "searchAdmin", "{ " +
-                "identificationTag \"searchAci\", " +
-                "precedence 14, " +
-                "authenticationLevel none, " +
-                "itemOrUserFirst userFirst: { " +
-                "userClasses { userGroup { \"cn=Administrators,ou=groups,ou=system\" } }, " +
-                "userPermissions { { " +
-                "protectedItems {entry, allUserAttributeTypesAndValues}, " +
-                "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }" );
+        createAccessControlSubentry( "searchAdmin", "{ " + "identificationTag \"searchAci\", " + "precedence 14, "
+            + "authenticationLevel none, " + "itemOrUserFirst userFirst: { "
+            + "userClasses { userGroup { \"cn=Administrators,ou=groups,ou=system\" } }, " + "userPermissions { { "
+            + "protectedItems {entry, allUserAttributeTypesAndValues}, "
+            + "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }" );
 
         // see if we can now add that test entry which we could not before
         // add op should still fail since billd is not in the admin group
@@ -368,15 +371,11 @@
         assertFalse( checkCanSearchAs( "billyd", "billyd" ) );
 
         // now add a subentry that enables user billyd to add an entry below ou=system
-        createAccessControlSubentry( "billydSearch", "{ " +
-                "identificationTag \"searchAci\", " +
-                "precedence 14, " +
-                "authenticationLevel none, " +
-                "itemOrUserFirst userFirst: { " +
-                "userClasses { name { \"uid=billyd,ou=users,ou=system\" } }, " +
-                "userPermissions { { " +
-                "protectedItems {entry, allUserAttributeTypesAndValues}, " +
-                "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }" );
+        createAccessControlSubentry( "billydSearch", "{ " + "identificationTag \"searchAci\", " + "precedence 14, "
+            + "authenticationLevel none, " + "itemOrUserFirst userFirst: { "
+            + "userClasses { name { \"uid=billyd,ou=users,ou=system\" } }, " + "userPermissions { { "
+            + "protectedItems {entry, allUserAttributeTypesAndValues}, "
+            + "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }" );
 
         // should work now that billyd is authorized by name
         assertTrue( checkCanSearchAs( "billyd", "billyd" ) );
@@ -398,15 +397,11 @@
         assertFalse( checkCanSearchAs( "BillyD", "billyd" ) );
 
         // now add a subentry that enables user billyd to add an entry below ou=system
-        createAccessControlSubentry( "billydSearch", "{ " +
-                "identificationTag \"searchAci\", " +
-                "precedence 14, " +
-                "authenticationLevel none, " +
-                "itemOrUserFirst userFirst: { " +
-                "userClasses { name { \"uid=billyd,ou=users,ou=system\" } }, " +
-                "userPermissions { { " +
-                "protectedItems {entry, allUserAttributeTypesAndValues}, " +
-                "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }" );
+        createAccessControlSubentry( "billydSearch", "{ " + "identificationTag \"searchAci\", " + "precedence 14, "
+            + "authenticationLevel none, " + "itemOrUserFirst userFirst: { "
+            + "userClasses { name { \"uid=billyd,ou=users,ou=system\" } }, " + "userPermissions { { "
+            + "protectedItems {entry, allUserAttributeTypesAndValues}, "
+            + "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }" );
 
         // should work now that billyd is authorized by name
         assertTrue( checkCanSearchAs( "BillyD", "billyd" ) );
@@ -427,15 +422,11 @@
         assertFalse( checkCanSearchAs( "billyd", "billyd" ) );
 
         // now add a subentry that enables user billyd to add an entry below ou=system
-        createAccessControlSubentry( "billySearchBySubtree", "{ " +
-                "identificationTag \"searchAci\", " +
-                "precedence 14, " +
-                "authenticationLevel none, " +
-                "itemOrUserFirst userFirst: { " +
-                "userClasses { subtree { { base \"ou=users,ou=system\" } } }, " +
-                "userPermissions { { " +
-                "protectedItems {entry, allUserAttributeTypesAndValues}, " +
-                "grantsAndDenials {  grantRead, grantReturnDN, grantBrowse } } } } }" );
+        createAccessControlSubentry( "billySearchBySubtree", "{ " + "identificationTag \"searchAci\", "
+            + "precedence 14, " + "authenticationLevel none, " + "itemOrUserFirst userFirst: { "
+            + "userClasses { subtree { { base \"ou=users,ou=system\" } } }, " + "userPermissions { { "
+            + "protectedItems {entry, allUserAttributeTypesAndValues}, "
+            + "grantsAndDenials {  grantRead, grantReturnDN, grantBrowse } } } } }" );
 
         // should work now that billyd is authorized by the subtree userClass
         assertTrue( checkCanSearchAs( "billyd", "billyd" ) );
@@ -456,15 +447,10 @@
         assertFalse( checkCanSearchAs( "billyd", "billyd" ) );
 
         // now add a subentry that enables anyone to search an entry below ou=system
-        createAccessControlSubentry( "anybodySearch", "{ " +
-                "identificationTag \"searchAci\", " +
-                "precedence 14, " +
-                "authenticationLevel none, " +
-                "itemOrUserFirst userFirst: { " +
-                "userClasses { allUsers }, " +
-                "userPermissions { { " +
-                "protectedItems {entry, allUserAttributeTypesAndValues}, " +
-                "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }" );
+        createAccessControlSubentry( "anybodySearch", "{ " + "identificationTag \"searchAci\", " + "precedence 14, "
+            + "authenticationLevel none, " + "itemOrUserFirst userFirst: { " + "userClasses { allUsers }, "
+            + "userPermissions { { " + "protectedItems {entry, allUserAttributeTypesAndValues}, "
+            + "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }" );
 
         // see if we can now search that tree which we could not before
         // should work now with billyd now that all users are authorized
@@ -476,7 +462,6 @@
     //
     // -----------------------------------------------------------------------
 
-
     /**
      * Checks to make sure search does not return entries not assigned the
      * perscriptiveACI and that it does not fail with an exception.
@@ -495,17 +480,11 @@
 
         // now add a subentry that enables anyone to add an entry below ou=system
         // down two more rdns for DNs of a max size of 3
-        createAccessControlSubentry( "anybodySearch",
-                "{ maximum 2 }",
-                "{ " +
-                "identificationTag \"searchAci\", " +
-                "precedence 14, " +
-                "authenticationLevel none, " +
-                "itemOrUserFirst userFirst: { " +
-                "userClasses { allUsers }, " +
-                "userPermissions { { " +
-                "protectedItems {entry, allUserAttributeTypesAndValues}, " +
-                "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }" );
+        createAccessControlSubentry( "anybodySearch", "{ maximum 2 }", "{ " + "identificationTag \"searchAci\", "
+            + "precedence 14, " + "authenticationLevel none, " + "itemOrUserFirst userFirst: { "
+            + "userClasses { allUsers }, " + "userPermissions { { "
+            + "protectedItems {entry, allUserAttributeTypesAndValues}, "
+            + "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }" );
 
         // see if we can now add that test entry which we could not before
         // should work now with billyd now that all users are authorized
@@ -532,17 +511,11 @@
         // now add a subentry that enables anyone to search an entry below ou=system
         // down two more rdns for DNs of a max size of 3.  It only grants access to
         // the ou and objectClass attributes however.
-        createAccessControlSubentry( "excluseTelephoneNumber",
-                "{ maximum 2 }",
-                "{ " +
-                "identificationTag \"searchAci\", " +
-                "precedence 14, " +
-                "authenticationLevel none, " +
-                "itemOrUserFirst userFirst: { " +
-                "userClasses { allUsers }, " +
-                "userPermissions { { " +
-                "protectedItems {entry, allAttributeValues { ou, objectClass } }, " +
-                "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }" );
+        createAccessControlSubentry( "excluseTelephoneNumber", "{ maximum 2 }", "{ "
+            + "identificationTag \"searchAci\", " + "precedence 14, " + "authenticationLevel none, "
+            + "itemOrUserFirst userFirst: { " + "userClasses { allUsers }, " + "userPermissions { { "
+            + "protectedItems {entry, allAttributeValues { ou, objectClass } }, "
+            + "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }" );
 
         // see if we can now add that search and find 4 entries
         assertTrue( checkCanSearchAs( "billyd", "billyd", cons, 4 ) );
@@ -561,17 +534,11 @@
         // now add a subentry that enables anyone to search an entry below ou=system
         // down two more rdns for DNs of a max size of 3.  This time we should be able
         // to see the telephoneNumber attribute
-        createAccessControlSubentry( "includeAllAttributeTypesAndValues",
-                "{ maximum 2 }",
-                "{ " +
-                "identificationTag \"searchAci\", " +
-                "precedence 14, " +
-                "authenticationLevel none, " +
-                "itemOrUserFirst userFirst: { " +
-                "userClasses { allUsers }, " +
-                "userPermissions { { " +
-                "protectedItems {entry, allUserAttributeTypesAndValues }, " +
-                "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }" );
+        createAccessControlSubentry( "includeAllAttributeTypesAndValues", "{ maximum 2 }", "{ "
+            + "identificationTag \"searchAci\", " + "precedence 14, " + "authenticationLevel none, "
+            + "itemOrUserFirst userFirst: { " + "userClasses { allUsers }, " + "userPermissions { { "
+            + "protectedItems {entry, allUserAttributeTypesAndValues }, "
+            + "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }" );
 
         // again we should find four entries
         assertTrue( checkCanSearchAs( "billyd", "billyd", cons, 4 ) );
@@ -603,17 +570,18 @@
         // now add a subentry that enables anyone to search an entry below ou=system
         // down two more rdns for DNs of a max size of 3.  It only grants access to
         // the ou and objectClass attributes however.
-        createAccessControlSubentry( "excluseOUValue",
-                "{ maximum 2 }",
-                "{ " +
-                "identificationTag \"searchAci\", " +
-                "precedence 14, " +
-                "authenticationLevel none, " +
-                "itemOrUserFirst userFirst: { " +
-                "userClasses { allUsers }, " +
-                "userPermissions { { " +
-                "protectedItems {entry, attributeType { ou }, allAttributeValues { objectClass }, attributeValue { ou=0, ou=1, ou=2 } }, " +
-                "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }" );
+        createAccessControlSubentry(
+            "excluseOUValue",
+            "{ maximum 2 }",
+            "{ "
+                + "identificationTag \"searchAci\", "
+                + "precedence 14, "
+                + "authenticationLevel none, "
+                + "itemOrUserFirst userFirst: { "
+                + "userClasses { allUsers }, "
+                + "userPermissions { { "
+                + "protectedItems {entry, attributeType { ou }, allAttributeValues { objectClass }, attributeValue { ou=0, ou=1, ou=2 } }, "
+                + "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }" );
 
         // see if we can now add that search and find 4 entries
         assertTrue( checkCanSearchAs( "billyd", "billyd", 3 ) );
@@ -632,17 +600,11 @@
         // now add a subentry that enables anyone to search an entry below ou=system
         // down two more rdns for DNs of a max size of 3.  This time we should be able
         // to see the telephoneNumber attribute
-        createAccessControlSubentry( "includeAllAttributeTypesAndValues",
-                "{ maximum 2 }",
-                "{ " +
-                "identificationTag \"searchAci\", " +
-                "precedence 14, " +
-                "authenticationLevel none, " +
-                "itemOrUserFirst userFirst: { " +
-                "userClasses { allUsers }, " +
-                "userPermissions { { " +
-                "protectedItems {entry, allUserAttributeTypesAndValues }, " +
-                "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }" );
+        createAccessControlSubentry( "includeAllAttributeTypesAndValues", "{ maximum 2 }", "{ "
+            + "identificationTag \"searchAci\", " + "precedence 14, " + "authenticationLevel none, "
+            + "itemOrUserFirst userFirst: { " + "userClasses { allUsers }, " + "userPermissions { { "
+            + "protectedItems {entry, allUserAttributeTypesAndValues }, "
+            + "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }" );
 
         // again we should find four entries
         assertTrue( checkCanSearchAs( "billyd", "billyd", 3 ) );
@@ -670,15 +632,10 @@
         createUser( "billyd", "billyd" );
 
         // now add an entryACI denies browse, read and returnDN to a specific entry
-        String aci = "{ " +
-                "identificationTag \"denyAci\", " +
-                "precedence 14, " +
-                "authenticationLevel none, " +
-                "itemOrUserFirst userFirst: { " +
-                "userClasses { allUsers }, " +
-                "userPermissions { { " +
-                "protectedItems {entry, allUserAttributeTypesAndValues}, " +
-                "grantsAndDenials { denyRead, denyReturnDN, denyBrowse } } } } }";
+        String aci = "{ " + "identificationTag \"denyAci\", " + "precedence 14, " + "authenticationLevel none, "
+            + "itemOrUserFirst userFirst: { " + "userClasses { allUsers }, " + "userPermissions { { "
+            + "protectedItems {entry, allUserAttributeTypesAndValues}, "
+            + "grantsAndDenials { denyRead, denyReturnDN, denyBrowse } } } } }";
 
         // try a search operation which should fail without any prescriptive ACI
         SearchControls cons = new SearchControls();
@@ -687,15 +644,10 @@
         assertFalse( checkSearchAsWithEntryACI( "billyd", "billyd", cons, rdn, aci, 9 ) );
 
         // now add a subentry that enables anyone to search below ou=system
-        createAccessControlSubentry( "anybodySearch", "{ " +
-                "identificationTag \"searchAci\", " +
-                "precedence 14, " +
-                "authenticationLevel none, " +
-                "itemOrUserFirst userFirst: { " +
-                "userClasses { allUsers }, " +
-                "userPermissions { { " +
-                "protectedItems {entry, allUserAttributeTypesAndValues}, " +
-                "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }" );
+        createAccessControlSubentry( "anybodySearch", "{ " + "identificationTag \"searchAci\", " + "precedence 14, "
+            + "authenticationLevel none, " + "itemOrUserFirst userFirst: { " + "userClasses { allUsers }, "
+            + "userPermissions { { " + "protectedItems {entry, allUserAttributeTypesAndValues}, "
+            + "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }" );
 
         // see if we can now search the tree which we could not before
         // should work with billyd now that all users are authorized
@@ -723,15 +675,10 @@
         createUser( "billyd", "billyd" );
 
         // now add an entryACI denies browse, read and returnDN to a specific entry
-        String aci = "{ " +
-                "identificationTag \"denyAci\", " +
-                "precedence 14, " +
-                "authenticationLevel none, " +
-                "itemOrUserFirst userFirst: { " +
-                "userClasses { allUsers }, " +
-                "userPermissions { { " +
-                "protectedItems {entry, allUserAttributeTypesAndValues}, " +
-                "grantsAndDenials { denyRead, denyReturnDN, denyBrowse } } } } }";
+        String aci = "{ " + "identificationTag \"denyAci\", " + "precedence 14, " + "authenticationLevel none, "
+            + "itemOrUserFirst userFirst: { " + "userClasses { allUsers }, " + "userPermissions { { "
+            + "protectedItems {entry, allUserAttributeTypesAndValues}, "
+            + "grantsAndDenials { denyRead, denyReturnDN, denyBrowse } } } } }";
 
         // try a search operation which should fail without any prescriptive ACI
         SearchControls cons = new SearchControls();
@@ -740,15 +687,10 @@
         assertFalse( checkSearchAsWithEntryACI( "billyd", "billyd", cons, rdn, aci, 9 ) );
 
         // now add a subentry that enables anyone to search below ou=system
-        createAccessControlSubentry( "anybodySearch", "{ " +
-                "identificationTag \"searchAci\", " +
-                "precedence 15, " +
-                "authenticationLevel none, " +
-                "itemOrUserFirst userFirst: { " +
-                "userClasses { allUsers }, " +
-                "userPermissions { { " +
-                "protectedItems {entry, allUserAttributeTypesAndValues}, " +
-                "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }" );
+        createAccessControlSubentry( "anybodySearch", "{ " + "identificationTag \"searchAci\", " + "precedence 15, "
+            + "authenticationLevel none, " + "itemOrUserFirst userFirst: { " + "userClasses { allUsers }, "
+            + "userPermissions { { " + "protectedItems {entry, allUserAttributeTypesAndValues}, "
+            + "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }" );
 
         // see if we can now search the tree which we could not before
         // should work with billyd now that all users are authorized
@@ -760,15 +702,10 @@
 
         // now add an entryACI denies browse, read and returnDN to a specific entry
         // but this time the precedence will be higher than that of the grant
-        aci = "{ " +
-                "identificationTag \"denyAci\", " +
-                "precedence 16, " +
-                "authenticationLevel none, " +
-                "itemOrUserFirst userFirst: { " +
-                "userClasses { allUsers }, " +
-                "userPermissions { { " +
-                "protectedItems {entry, allUserAttributeTypesAndValues}, " +
-                "grantsAndDenials { denyRead, denyReturnDN, denyBrowse } } } } }";
+        aci = "{ " + "identificationTag \"denyAci\", " + "precedence 16, " + "authenticationLevel none, "
+            + "itemOrUserFirst userFirst: { " + "userClasses { allUsers }, " + "userPermissions { { "
+            + "protectedItems {entry, allUserAttributeTypesAndValues}, "
+            + "grantsAndDenials { denyRead, denyReturnDN, denyBrowse } } } } }";
 
         // see if we can now search the tree which we could not before
         // should work with billyd now that all users are authorized
@@ -791,7 +728,7 @@
      */
     private SearchResult checkCanSearhSubentryAs( String uid, String password, Name rdn ) throws NamingException
     {
-        DirContext userCtx = getContextAs( new LdapName( "uid="+uid+",ou=users,ou=system" ), password );
+        DirContext userCtx = getContextAs( new LdapName( "uid=" + uid + ",ou=users,ou=system" ), password );
         SearchControls cons = new SearchControls();
         cons.setSearchScope( SearchControls.OBJECT_SCOPE );
         SearchResult result = null;
@@ -812,7 +749,10 @@
         }
         finally
         {
-            if ( list != null ) { list.close(); }
+            if ( list != null )
+            {
+                list.close();
+            }
         }
 
         return result;
@@ -825,53 +765,37 @@
         createUser( "billyd", "billyd" );
 
         // now add a subentry that enables anyone to search below ou=system
-        createAccessControlSubentry( "anybodySearch", "{ " +
-                "identificationTag \"searchAci\", " +
-                "precedence 14, " +
-                "authenticationLevel none, " +
-                "itemOrUserFirst userFirst: { " +
-                "userClasses { allUsers }, " +
-                "userPermissions { { " +
-                "protectedItems {entry, allUserAttributeTypesAndValues}, " +
-                "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }" );
+        createAccessControlSubentry( "anybodySearch", "{ " + "identificationTag \"searchAci\", " + "precedence 14, "
+            + "authenticationLevel none, " + "itemOrUserFirst userFirst: { " + "userClasses { allUsers }, "
+            + "userPermissions { { " + "protectedItems {entry, allUserAttributeTypesAndValues}, "
+            + "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }" );
 
         // check and see if we can access the subentry now
         assertNotNull( checkCanSearhSubentryAs( "billyd", "billyd", new LdapName( "cn=anybodySearch" ) ) );
 
         // now add a denial to prevent all users except the admin from accessing the subentry
-        addSubentryACI( "{ " +
-                "identificationTag \"searchAci\", " +
-                "precedence 14, " +
-                "authenticationLevel none, " +
-                "itemOrUserFirst userFirst: { " +
-                "userClasses { allUsers }, " +
-                "userPermissions { { " +
-                "protectedItems {entry, allUserAttributeTypesAndValues}, " +
-                "grantsAndDenials { denyRead, denyReturnDN, denyBrowse } } } } }" );
+        addSubentryACI( "{ " + "identificationTag \"searchAci\", " + "precedence 14, " + "authenticationLevel none, "
+            + "itemOrUserFirst userFirst: { " + "userClasses { allUsers }, " + "userPermissions { { "
+            + "protectedItems {entry, allUserAttributeTypesAndValues}, "
+            + "grantsAndDenials { denyRead, denyReturnDN, denyBrowse } } } } }" );
 
         // now we should not be able to access the subentry with a search
         assertNull( checkCanSearhSubentryAs( "billyd", "billyd", new LdapName( "cn=anybodySearch" ) ) );
     }
 
 
-    public void testGetMatchedName() throws  NamingException
+    public void testGetMatchedName() throws NamingException
     {
         // create the non-admin user
         createUser( "billyd", "billyd" );
 
         // now add a subentry that enables anyone to search/lookup and disclose on error
         // below ou=system, with the exclusion of ou=groups and everything below it
-        createAccessControlSubentry( "selectiveDiscloseOnError",
-                "{ specificExclusions { chopBefore:\"ou=groups\" } }",
-                "{ " +
-                "identificationTag \"searchAci\", " +
-                "precedence 14, " +
-                "authenticationLevel none, " +
-                "itemOrUserFirst userFirst: { " +
-                "userClasses { allUsers }, " +
-                "userPermissions { { " +
-                "protectedItems {entry, allUserAttributeTypesAndValues}, " +
-                "grantsAndDenials { grantRead, grantReturnDN, grantBrowse, grantDiscloseOnError } } } } }" );
+        createAccessControlSubentry( "selectiveDiscloseOnError", "{ specificExclusions { chopBefore:\"ou=groups\" } }",
+            "{ " + "identificationTag \"searchAci\", " + "precedence 14, " + "authenticationLevel none, "
+                + "itemOrUserFirst userFirst: { " + "userClasses { allUsers }, " + "userPermissions { { "
+                + "protectedItems {entry, allUserAttributeTypesAndValues}, "
+                + "grantsAndDenials { grantRead, grantReturnDN, grantBrowse, grantDiscloseOnError } } } } }" );
 
         // get a context as the user and try a lookup of a non-existant entry under ou=groups,ou=system
         DirContext userCtx = getContextAs( new LdapName( "uid=billyd,ou=users,ou=system" ), "billyd" );
@@ -879,7 +803,7 @@
         {
             userCtx.lookup( "cn=blah,ou=groups" );
         }
-        catch( NamingException e )
+        catch ( NamingException e )
         {
             Name matched = e.getResolvedName();
 
@@ -889,23 +813,18 @@
 
         // now delete and replace subentry with one that does not excluse ou=groups,ou=system
         deleteAccessControlSubentry( "selectiveDiscloseOnError" );
-        createAccessControlSubentry( "selectiveDiscloseOnError",
-                "{ " +
-                "identificationTag \"searchAci\", " +
-                "precedence 14, " +
-                "authenticationLevel none, " +
-                "itemOrUserFirst userFirst: { " +
-                "userClasses { allUsers }, " +
-                "userPermissions { { " +
-                "protectedItems {entry, allUserAttributeTypesAndValues}, " +
-                "grantsAndDenials { grantRead, grantReturnDN, grantBrowse, grantDiscloseOnError } } } } }" );
+        createAccessControlSubentry( "selectiveDiscloseOnError", "{ " + "identificationTag \"searchAci\", "
+            + "precedence 14, " + "authenticationLevel none, " + "itemOrUserFirst userFirst: { "
+            + "userClasses { allUsers }, " + "userPermissions { { "
+            + "protectedItems {entry, allUserAttributeTypesAndValues}, "
+            + "grantsAndDenials { grantRead, grantReturnDN, grantBrowse, grantDiscloseOnError } } } } }" );
 
         // now try a lookup of a non-existant entry under ou=groups,ou=system again
         try
         {
             userCtx.lookup( "cn=blah,ou=groups" );
         }
-        catch( NamingException e )
+        catch ( NamingException e )
         {
             Name matched = e.getResolvedName();
 

Propchange: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationTest.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceTest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceTest.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceTest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceTest.java Sun Feb 19 19:57:02 2006
@@ -99,7 +99,8 @@
         Attribute attribute = new LockableAttributeImpl( "administrativeRole" );
         attribute.add( role );
         ModificationItem item = new ModificationItem( DirContext.ADD_ATTRIBUTE, attribute );
-        super.sysRoot.modifyAttributes( "", new ModificationItem[] { item } );
+        super.sysRoot.modifyAttributes( "", new ModificationItem[]
+            { item } );
     }
 
 
@@ -108,7 +109,8 @@
         Map resultMap = new HashMap();
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
-        controls.setReturningAttributes( new String[] { "+", "*" } );
+        controls.setReturningAttributes( new String[]
+            { "+", "*" } );
         NamingEnumeration results = super.sysRoot.search( "", "(objectClass=*)", controls );
         while ( results.hasMore() )
         {
@@ -124,7 +126,8 @@
         Map resultMap = new HashMap();
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
-        controls.setReturningAttributes( new String[] { "cn", "ou" } );
+        controls.setReturningAttributes( new String[]
+            { "cn", "ou" } );
         NamingEnumeration results = super.sysRoot.search( "", "(objectClass=*)", controls );
         while ( results.hasMore() )
         {
@@ -165,9 +168,9 @@
         // now modify entries included by the subentry to have collectiveExclusions
         // -------------------------------------------------------------------
 
-        ModificationItem[] items = new ModificationItem[] {
-            new ModificationItem( DirContext.ADD_ATTRIBUTE,
-                    new LockableAttributeImpl( "collectiveExclusions", "c-ou" ) ) };
+        ModificationItem[] items = new ModificationItem[]
+            { new ModificationItem( DirContext.ADD_ATTRIBUTE,
+                new LockableAttributeImpl( "collectiveExclusions", "c-ou" ) ) };
         super.sysRoot.modifyAttributes( "ou=services,ou=configuration", items );
 
         // entry should not show the c-ou collective attribute anymore
@@ -221,9 +224,9 @@
         // now modify an entry to exclude all collective attributes
         // -------------------------------------------------------------------
 
-        items = new ModificationItem[] {
-            new ModificationItem( DirContext.REPLACE_ATTRIBUTE,
-                    new LockableAttributeImpl( "collectiveExclusions", "excludeAllCollectiveAttributes" ) ) };
+        items = new ModificationItem[]
+            { new ModificationItem( DirContext.REPLACE_ATTRIBUTE, new LockableAttributeImpl( "collectiveExclusions",
+                "excludeAllCollectiveAttributes" ) ) };
         super.sysRoot.modifyAttributes( "ou=interceptors,ou=configuration", items );
 
         // none of the attributes should appear any longer
@@ -272,9 +275,9 @@
         // now modify entries included by the subentry to have collectiveExclusions
         // -------------------------------------------------------------------
 
-        ModificationItem[] items = new ModificationItem[] {
-            new ModificationItem( DirContext.ADD_ATTRIBUTE,
-                    new LockableAttributeImpl( "collectiveExclusions", "c-ou" ) ) };
+        ModificationItem[] items = new ModificationItem[]
+            { new ModificationItem( DirContext.ADD_ATTRIBUTE,
+                new LockableAttributeImpl( "collectiveExclusions", "c-ou" ) ) };
         super.sysRoot.modifyAttributes( "ou=services,ou=configuration", items );
         entries = getAllEntries();
 
@@ -331,9 +334,9 @@
         // now modify an entry to exclude all collective attributes
         // -------------------------------------------------------------------
 
-        items = new ModificationItem[] {
-            new ModificationItem( DirContext.REPLACE_ATTRIBUTE,
-                    new LockableAttributeImpl( "collectiveExclusions", "excludeAllCollectiveAttributes" ) ) };
+        items = new ModificationItem[]
+            { new ModificationItem( DirContext.REPLACE_ATTRIBUTE, new LockableAttributeImpl( "collectiveExclusions",
+                "excludeAllCollectiveAttributes" ) ) };
         super.sysRoot.modifyAttributes( "ou=interceptors,ou=configuration", items );
         entries = getAllEntries();
 

Propchange: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceTest.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationTest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationTest.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationTest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationTest.java Sun Feb 19 19:57:02 2006
@@ -48,10 +48,10 @@
     {
     }
 
+
     public void testAddAndRemove() throws Exception
     {
-        MutableDirectoryPartitionConfiguration partitionCfg =
-            new MutableDirectoryPartitionConfiguration();
+        MutableDirectoryPartitionConfiguration partitionCfg = new MutableDirectoryPartitionConfiguration();
         partitionCfg.setName( "removable" );
         partitionCfg.setSuffix( "ou=removable" );
         Attributes ctxEntry = new BasicAttributes( true );
@@ -59,30 +59,28 @@
         ctxEntry.put( "ou", "removable" );
         partitionCfg.setContextEntry( ctxEntry );
         partitionCfg.setContextPartition( new JdbmDirectoryPartition() );
-        
+
         // Test AddContextPartition
-        AddDirectoryPartitionConfiguration addCfg =
-            new AddDirectoryPartitionConfiguration( partitionCfg );
-        
+        AddDirectoryPartitionConfiguration addCfg = new AddDirectoryPartitionConfiguration( partitionCfg );
+
         Hashtable env = new Hashtable();
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
         env.putAll( addCfg.toJndiEnvironment() );
-        
+
         Context ctx = new InitialContext( env );
         Assert.assertNotNull( ctx.lookup( "ou=removable" ) );
-        
+
         // Test removeContextPartition
-        RemoveDirectoryPartitionConfiguration removeCfg =
-            new RemoveDirectoryPartitionConfiguration( "ou=removable" );
+        RemoveDirectoryPartitionConfiguration removeCfg = new RemoveDirectoryPartitionConfiguration( "ou=removable" );
         env.putAll( removeCfg.toJndiEnvironment() );
-        
+
         ctx = new InitialContext( env );
         try
         {
             ctx.lookup( "ou=removable" );
             Assert.fail( "NameNotFoundException should be thrown." );
         }
-        catch( NameNotFoundException e )
+        catch ( NameNotFoundException e )
         {
             // Partition is removed.
         }

Propchange: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationTest.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/event/EventServiceTest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/event/EventServiceTest.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/event/EventServiceTest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/event/EventServiceTest.java Sun Feb 19 19:57:02 2006
@@ -107,7 +107,6 @@
         assertEquals( "objectAdded", rec.method );
     }
 
-
     public class TestListener implements ObjectChangeListener, NamespaceChangeListener
     {
         List events = new ArrayList();
@@ -149,13 +148,13 @@
         }
     }
 
-
     public class EventRecord
     {
         String method;
         EventObject event;
 
-        EventRecord( String method, EventObject event )
+
+        EventRecord(String method, EventObject event)
         {
             this.method = method;
             this.event = event;

Propchange: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/event/EventServiceTest.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceTest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceTest.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceTest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceTest.java Sun Feb 19 19:57:02 2006
@@ -50,7 +50,6 @@
     // Search Operation Tests
     // ------------------------------------------------------------------------
 
-
     /**
      * Test search operation failure when the search base is non-existant.
      */
@@ -62,7 +61,7 @@
             sysRoot.search( "ou=blah", "(objectClass=*)", ctls );
             fail( "Execution should never get here due to exception!" );
         }
-        catch( LdapNameNotFoundException e )
+        catch ( LdapNameNotFoundException e )
         {
             assertEquals( "ou=system", e.getResolvedName().toString() );
             assertEquals( ResultCodeEnum.NOSUCHOBJECT, e.getResultCode() );
@@ -94,7 +93,6 @@
     // Move Operation Tests
     // ------------------------------------------------------------------------
 
-
     /**
      * Test move operation failure when the object moved is non-existant.
      */
@@ -106,7 +104,7 @@
             sysRoot.rename( "ou=users", "ou=users,ou=groups" );
             fail( "Execution should never get here due to exception!" );
         }
-        catch( LdapNameAlreadyBoundException e )
+        catch ( LdapNameAlreadyBoundException e )
         {
             assertEquals( "ou=users,ou=groups,ou=system", e.getResolvedName().toString() );
             assertEquals( ResultCodeEnum.ENTRYALREADYEXISTS, e.getResultCode() );
@@ -120,7 +118,7 @@
             sysRoot.removeFromEnvironment( "java.naming.ldap.deleteRDN" );
             fail( "Execution should never get here due to exception!" );
         }
-        catch( LdapNameAlreadyBoundException e )
+        catch ( LdapNameAlreadyBoundException e )
         {
             assertEquals( "ou=uzerz,ou=groups,ou=system", e.getResolvedName().toString() );
             assertEquals( ResultCodeEnum.ENTRYALREADYEXISTS, e.getResultCode() );
@@ -138,7 +136,7 @@
             sysRoot.rename( "ou=blah", "ou=blah,ou=groups" );
             fail( "Execution should never get here due to exception!" );
         }
-        catch( LdapNameNotFoundException e )
+        catch ( LdapNameNotFoundException e )
         {
             assertEquals( "ou=system", e.getResolvedName().toString() );
             assertEquals( ResultCodeEnum.NOSUCHOBJECT, e.getResultCode() );
@@ -151,7 +149,7 @@
             sysRoot.removeFromEnvironment( "java.naming.ldap.deleteRDN" );
             fail( "Execution should never get here due to exception!" );
         }
-        catch( LdapNameNotFoundException e )
+        catch ( LdapNameNotFoundException e )
         {
             assertEquals( "ou=system", e.getResolvedName().toString() );
             assertEquals( ResultCodeEnum.NOSUCHOBJECT, e.getResultCode() );
@@ -173,7 +171,7 @@
             sysRoot.lookup( "ou=users" );
             fail( "Execution should never get here due to exception!" );
         }
-        catch( NamingException e )
+        catch ( NamingException e )
         {
             assertEquals( "ou=system", e.getResolvedName().toString() );
             assertTrue( e instanceof LdapNameNotFoundException );
@@ -195,7 +193,7 @@
             sysRoot.rename( "ou=users", "ou=groups" );
             fail( "Execution should never get here due to exception!" );
         }
-        catch( LdapNameAlreadyBoundException e )
+        catch ( LdapNameAlreadyBoundException e )
         {
             assertEquals( "ou=groups,ou=system", e.getResolvedName().toString() );
             assertEquals( ResultCodeEnum.ENTRYALREADYEXISTS, e.getResultCode() );
@@ -213,7 +211,7 @@
             sysRoot.rename( "ou=blah", "ou=asdf" );
             fail( "Execution should never get here due to exception!" );
         }
-        catch( LdapNameNotFoundException e )
+        catch ( LdapNameNotFoundException e )
         {
             assertEquals( "ou=system", e.getResolvedName().toString() );
             assertEquals( ResultCodeEnum.NOSUCHOBJECT, e.getResultCode() );
@@ -235,7 +233,7 @@
             sysRoot.lookup( "ou=users" );
             fail( "Execution should never get here due to exception!" );
         }
-        catch( NamingException e )
+        catch ( NamingException e )
         {
             assertEquals( "ou=system", e.getResolvedName().toString() );
             assertTrue( e instanceof LdapNameNotFoundException );
@@ -263,23 +261,21 @@
             sysRoot.modifyAttributes( "ou=blah", DirContext.ADD_ATTRIBUTE, attrs );
             fail( "Execution should never get here due to exception!" );
         }
-        catch( LdapNameNotFoundException e )
+        catch ( LdapNameNotFoundException e )
         {
             assertEquals( "ou=system", e.getResolvedName().toString() );
             assertEquals( ResultCodeEnum.NOSUCHOBJECT, e.getResultCode() );
         }
 
-
-        ModificationItem[] mods = new ModificationItem[] {
-            new ModificationItem( DirContext.ADD_ATTRIBUTE, ou )
-        };
+        ModificationItem[] mods = new ModificationItem[]
+            { new ModificationItem( DirContext.ADD_ATTRIBUTE, ou ) };
 
         try
         {
             sysRoot.modifyAttributes( "ou=blah", mods );
             fail( "Execution should never get here due to exception!" );
         }
-        catch( LdapNameNotFoundException e )
+        catch ( LdapNameNotFoundException e )
         {
             assertEquals( "ou=system", e.getResolvedName().toString() );
             assertEquals( ResultCodeEnum.NOSUCHOBJECT, e.getResultCode() );
@@ -304,9 +300,8 @@
 
         attr = new BasicAttribute( "ou" );
         attr.add( "another" );
-        ModificationItem[] mods = new ModificationItem[] {
-            new ModificationItem( DirContext.ADD_ATTRIBUTE, attr )
-        };
+        ModificationItem[] mods = new ModificationItem[]
+            { new ModificationItem( DirContext.ADD_ATTRIBUTE, attr ) };
 
         sysRoot.modifyAttributes( "ou=users", mods );
         ou = sysRoot.getAttributes( "ou=users" ).get( "ou" );
@@ -330,7 +325,7 @@
             sysRoot.lookup( "ou=blah" );
             fail( "Execution should never get here due to exception!" );
         }
-        catch( LdapNameNotFoundException e )
+        catch ( LdapNameNotFoundException e )
         {
             assertEquals( "ou=system", e.getResolvedName().toString() );
             assertEquals( ResultCodeEnum.NOSUCHOBJECT, e.getResultCode() );
@@ -346,7 +341,7 @@
     {
         LdapContext ctx = ( LdapContext ) sysRoot.lookup( "ou=users" );
         assertNotNull( ctx );
-        assertEquals( "users", ctx.getAttributes("").get( "ou" ).get() );
+        assertEquals( "users", ctx.getAttributes( "" ).get( "ou" ).get() );
     }
 
 
@@ -354,7 +349,6 @@
     // List Operation Tests
     // ------------------------------------------------------------------------
 
-
     /**
      * Test list operation failure when the base searched is non-existant.
      */
@@ -365,7 +359,7 @@
             sysRoot.list( "ou=blah" );
             fail( "Execution should never get here due to exception!" );
         }
-        catch( LdapNameNotFoundException e )
+        catch ( LdapNameNotFoundException e )
         {
             assertEquals( "ou=system", e.getResolvedName().toString() );
             assertEquals( ResultCodeEnum.NOSUCHOBJECT, e.getResultCode() );
@@ -395,7 +389,6 @@
     // Add Operation Tests
     // ------------------------------------------------------------------------
 
-
     /**
      * Tests for add operation failure when the parent of the entry to add does
      * not exist.
@@ -416,7 +409,7 @@
             sysRoot.createSubcontext( "ou=blah,cn=toanother" );
             fail( "Execution should never get here due to exception!" );
         }
-        catch( LdapNamingException e )
+        catch ( LdapNamingException e )
         {
             assertEquals( "cn=toanother,ou=system", e.getResolvedName().toString() );
             assertEquals( ResultCodeEnum.ALIASPROBLEM, e.getResultCode() );
@@ -435,7 +428,7 @@
             sysRoot.createSubcontext( "ou=blah,ou=abc" );
             fail( "Execution should never get here due to exception!" );
         }
-        catch( LdapNameNotFoundException e )
+        catch ( LdapNameNotFoundException e )
         {
             assertEquals( "ou=system", e.getResolvedName().toString() );
             assertEquals( ResultCodeEnum.NOSUCHOBJECT, e.getResultCode() );
@@ -455,7 +448,7 @@
             sysRoot.createSubcontext( "ou=blah" );
             fail( "Execution should never get here due to exception!" );
         }
-        catch( LdapNameAlreadyBoundException e )
+        catch ( LdapNameAlreadyBoundException e )
         {
             assertEquals( "ou=blah,ou=system", e.getResolvedName().toString() );
             assertEquals( ResultCodeEnum.ENTRYALREADYEXISTS, e.getResultCode() );
@@ -479,7 +472,6 @@
     // Delete Operation Tests
     // ------------------------------------------------------------------------
 
-
     /**
      * Tests for delete failure when the entry to be deleted has child entires.
      */
@@ -493,7 +485,7 @@
             sysRoot.destroySubcontext( "ou=blah" );
             fail( "Execution should never get here due to exception!" );
         }
-        catch( LdapContextNotEmptyException e )
+        catch ( LdapContextNotEmptyException e )
         {
             assertEquals( "ou=blah,ou=system", e.getResolvedName().toString() );
             assertEquals( ResultCodeEnum.NOTALLOWEDONNONLEAF, e.getResultCode() );
@@ -512,7 +504,7 @@
             sysRoot.destroySubcontext( "ou=blah" );
             fail( "Execution should never get here due to exception!" );
         }
-        catch( LdapNameNotFoundException e )
+        catch ( LdapNameNotFoundException e )
         {
             assertEquals( "ou=system", e.getResolvedName().toString() );
             assertEquals( ResultCodeEnum.NOSUCHOBJECT, e.getResultCode() );
@@ -535,7 +527,7 @@
             sysRoot.lookup( "ou=blah" );
             fail( "Execution should never get here due to exception!" );
         }
-        catch( LdapNameNotFoundException e )
+        catch ( LdapNameNotFoundException e )
         {
             assertEquals( "ou=system", e.getResolvedName().toString() );
             assertEquals( ResultCodeEnum.NOSUCHOBJECT, e.getResultCode() );

Propchange: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceTest.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ComparatorNPEBugTest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ComparatorNPEBugTest.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ComparatorNPEBugTest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ComparatorNPEBugTest.java Sun Feb 19 19:57:02 2006
@@ -38,11 +38,15 @@
     /**
      * Test runs first to initialize the system.
      */
-    public void testAAA() {}
+    public void testAAA()
+    {
+    }
 
 
     /**
      * This test fails currently.
      */
-    public void testZZZ() {}
+    public void testZZZ()
+    {
+    }
 }

Propchange: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ComparatorNPEBugTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ComparatorNPEBugTest.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/CreateContextTest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/CreateContextTest.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/CreateContextTest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/CreateContextTest.java Sun Feb 19 19:57:02 2006
@@ -168,7 +168,6 @@
         assertTrue( attribute.contains( "top" ) );
         assertTrue( attribute.contains( "organizationalUnit" ) );
 
-
         /*
          * fail on recreate attempt for ou=testing00,ou=system
          */

Propchange: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/CreateContextTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/CreateContextTest.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DestroyContextTest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DestroyContextTest.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DestroyContextTest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DestroyContextTest.java Sun Feb 19 19:57:02 2006
@@ -147,14 +147,14 @@
         /*
          * delete ou=testing00,ou=system
          */
-        sysRoot.destroySubcontext( "ou=testing00");
+        sysRoot.destroySubcontext( "ou=testing00" );
 
         try
         {
             sysRoot.lookup( "ou=testing00" );
             fail( "ou=testing00, ou=system should not exist" );
         }
-        catch( NamingException e )
+        catch ( NamingException e )
         {
             assertTrue( e instanceof LdapNameNotFoundException );
         }
@@ -162,14 +162,14 @@
         /*
          * delete ou=subtest,ou=testing01,ou=system
          */
-        sysRoot.destroySubcontext( "ou=subtest,ou=testing01");
+        sysRoot.destroySubcontext( "ou=subtest,ou=testing01" );
 
         try
         {
             sysRoot.lookup( "ou=subtest,ou=testing01" );
             fail( "ou=subtest,ou=testing01,ou=system should not exist" );
         }
-        catch( NamingException e )
+        catch ( NamingException e )
         {
             assertTrue( e instanceof LdapNameNotFoundException );
         }
@@ -177,34 +177,32 @@
         /*
          * delete ou=testing01,ou=system
          */
-        sysRoot.destroySubcontext( "ou=testing01");
+        sysRoot.destroySubcontext( "ou=testing01" );
 
         try
         {
             sysRoot.lookup( "ou=testing01" );
             fail( "ou=testing01, ou=system should not exist" );
         }
-        catch( NamingException e )
+        catch ( NamingException e )
         {
             assertTrue( e instanceof LdapNameNotFoundException );
         }
 
-
         /*
          * delete ou=testing01,ou=system
          */
-        sysRoot.destroySubcontext( "ou=testing02");
+        sysRoot.destroySubcontext( "ou=testing02" );
 
         try
         {
             sysRoot.lookup( "ou=testing02" );
             fail( "ou=testing02, ou=system should not exist" );
         }
-        catch( NamingException e )
+        catch ( NamingException e )
         {
             assertTrue( e instanceof LdapNameNotFoundException );
         }
     }
-
 
 }

Propchange: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DestroyContextTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DestroyContextTest.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectTest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectTest.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectTest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectTest.java Sun Feb 19 19:57:02 2006
@@ -51,7 +51,7 @@
         assertNotNull( attribute );
         assertTrue( attribute.contains( "top" ) );
         assertTrue( attribute.contains( "organizationalUnit" ) );
-        
+
         Attributes newattribs = new BasicAttributes( true );
         Attribute freeform = new BasicAttribute( "freeform" );
         freeform.add( "testing" );
@@ -75,6 +75,7 @@
         assertTrue( attribute.contains( "testing" ) );
     }
 
+
     public void testExtensibleObjectAdd() throws Exception
     {
         Attributes attributes = new BasicAttributes( true );
@@ -84,15 +85,15 @@
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
         attributes.put( "ou", "testing00" );
-        
+
         // WARNING: extensible objects cannot accept any arbitrary 
         // attribute.  The attribute must be defined by the schema
         // at a bare minimum or the addition will be rejected
-        
+
         // here's an attribute that is not on the MAY or MUST list for 
         // an organizationalUnit - it's our test for extensible objects
         attributes.put( "employeeType", "testing" );
-        
+
         DirContext ctx = sysRoot.createSubcontext( "ou=testing00", attributes );
         assertNotNull( ctx );
 

Propchange: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectTest.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Propchange: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ListAsAdminTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ListAsAdminTest.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ListAsNonAdminTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ListAsNonAdminTest.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/MixedCaseTest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/MixedCaseTest.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/MixedCaseTest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/MixedCaseTest.java Sun Feb 19 19:57:02 2006
@@ -40,6 +40,7 @@
 {
     String suffix = "dc=Apache,dc=Org";
 
+
     public void setUp() throws Exception
     {
 
@@ -72,6 +73,7 @@
         super.setUp();
     }
 
+
     public void testSearch() throws NamingException
     {
         SearchControls sc = new SearchControls();
@@ -81,13 +83,14 @@
 
         assertTrue( "Search should return at least one entry.", ne.hasMore() );
 
-        SearchResult sr = (SearchResult) ne.next();
+        SearchResult sr = ( SearchResult ) ne.next();
 
         assertEquals( "The entry returned should be the root entry.", suffix, sr.getName() );
 
         assertFalse( "Search should return no more entries.", ne.hasMore() );
     }
 
+
     public void testAdd() throws NamingException
     {
         String dn = "ou=Test";
@@ -109,13 +112,14 @@
 
         assertTrue( "Search should return at least one entry.", ne.hasMore() );
 
-        SearchResult sr = (SearchResult) ne.next();
+        SearchResult sr = ( SearchResult ) ne.next();
 
-        assertEquals( "The entry returned should be the entry added earlier.", dn+","+suffix, sr.getName() );
+        assertEquals( "The entry returned should be the entry added earlier.", dn + "," + suffix, sr.getName() );
 
         assertFalse( "Search should return no more entries.", ne.hasMore() );
     }
 
+
     public void testModify() throws NamingException
     {
         String dn = "ou=Test";
@@ -133,7 +137,7 @@
         assertNotNull( ctx );
 
         ModificationItem[] mods = new ModificationItem[1];
-        mods[0] = new ModificationItem(DirContext.REPLACE_ATTRIBUTE, new BasicAttribute( "description", description ));
+        mods[0] = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, new BasicAttribute( "description", description ) );
 
         sysRoot.modifyAttributes( dn, mods );
 
@@ -144,9 +148,9 @@
 
         assertTrue( "Search should return at least one entry.", ne.hasMore() );
 
-        SearchResult sr = (SearchResult) ne.next();
+        SearchResult sr = ( SearchResult ) ne.next();
 
-        assertEquals( "The entry returned should be the entry added earlier.", dn+","+suffix, sr.getName() );
+        assertEquals( "The entry returned should be the entry added earlier.", dn + "," + suffix, sr.getName() );
 
         attributes = sr.getAttributes();
         attribute = attributes.get( "description" );
@@ -156,6 +160,7 @@
         assertFalse( "Search should return no more entries.", ne.hasMore() );
     }
 
+
     public void testDelete() throws NamingException
     {
         String dn = "ou=Test";
@@ -175,15 +180,17 @@
         SearchControls sc = new SearchControls();
         sc.setSearchScope( SearchControls.OBJECT_SCOPE );
 
-        try {
+        try
+        {
             sysRoot.search( dn, "(objectClass=*)", sc );
 
-            fail( "Search should throw exception.");
+            fail( "Search should throw exception." );
 
-        } catch (LdapNameNotFoundException e) {
+        }
+        catch ( LdapNameNotFoundException e )
+        {
             // ignore
         }
     }
 
 }
-

Propchange: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/MixedCaseTest.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ModifyContextTest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ModifyContextTest.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ModifyContextTest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ModifyContextTest.java Sun Feb 19 19:57:02 2006
@@ -136,7 +136,7 @@
             assertTrue( attribute.contains( "top" ) );
             assertTrue( attribute.contains( "organizationalUnit" ) );
         }
-        catch( NamingException e )
+        catch ( NamingException e )
         {
         }
     }

Propchange: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ModifyContextTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ModifyContextTest.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ObjStateFactoryTest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ObjStateFactoryTest.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ObjStateFactoryTest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ObjStateFactoryTest.java Sun Feb 19 19:57:02 2006
@@ -72,10 +72,10 @@
         assertEquals( "committer", attrs.get( "description" ).get() );
     }
 
-
     public static class PersonStateFactory implements DirStateFactory
     {
-        public Result getStateToBind( Object obj, Name name, Context nameCtx, Hashtable environment, Attributes inAttrs ) throws NamingException
+        public Result getStateToBind( Object obj, Name name, Context nameCtx, Hashtable environment, Attributes inAttrs )
+            throws NamingException
         {
             // Only interested in Person objects
             if ( obj instanceof Person )
@@ -85,7 +85,7 @@
 
                 if ( inAttrs == null )
                 {
-                    outAttrs = new BasicAttributes(true);
+                    outAttrs = new BasicAttributes( true );
                 }
                 else
                 {
@@ -146,7 +146,8 @@
         }
 
 
-        public Object getStateToBind( Object obj, Name name, Context nameCtx, Hashtable environment ) throws NamingException
+        public Object getStateToBind( Object obj, Name name, Context nameCtx, Hashtable environment )
+            throws NamingException
         {
             throw new UnsupportedOperationException( "Please use directory support overload with Attributes argument." );
         }
@@ -154,52 +155,51 @@
 
     public static class PersonObjectFactory implements DirObjectFactory
     {
-        public Object getObjectInstance( Object obj, Name name, Context nameCtx, Hashtable environment, Attributes attrs ) throws Exception
+        public Object getObjectInstance( Object obj, Name name, Context nameCtx, Hashtable environment, Attributes attrs )
+            throws Exception
         {
             // Only interested in Attributes with "person" objectclass
             // System.out.println("object factory: " + attrs);
-            Attribute oc = (attrs != null ? attrs.get("objectclass") : null);
-            if (oc != null && oc.contains("person"))
+            Attribute oc = ( attrs != null ? attrs.get( "objectclass" ) : null );
+            if ( oc != null && oc.contains( "person" ) )
             {
                 Attribute attr;
                 String passwd = null;
 
-            // Extract the password
-            attr = attrs.get("userPassword");
-            if (attr != null)
-            {
-                Object pw = attr.get();
-
-                if ( pw instanceof String )
-                    passwd = ( String ) pw;
-                else
-                    passwd = new String((byte[]) pw);
-            }
-
-                return new Person(
-                      (String)attrs.get("sn").get(),
-                      (String)attrs.get("cn").get(),
-                      passwd,
-                      (attr=attrs.get("telephoneNumber")) != null ? (String)attr.get() : null,
-                      (attr=attrs.get("seealso")) != null ? (String)attr.get() : null,
-                      (attr=attrs.get("description")) != null ? (String)attr.get() : null);
+                // Extract the password
+                attr = attrs.get( "userPassword" );
+                if ( attr != null )
+                {
+                    Object pw = attr.get();
+
+                    if ( pw instanceof String )
+                        passwd = ( String ) pw;
+                    else
+                        passwd = new String( ( byte[] ) pw );
+                }
+
+                return new Person( ( String ) attrs.get( "sn" ).get(), ( String ) attrs.get( "cn" ).get(), passwd,
+                    ( attr = attrs.get( "telephoneNumber" ) ) != null ? ( String ) attr.get() : null, ( attr = attrs
+                        .get( "seealso" ) ) != null ? ( String ) attr.get() : null,
+                    ( attr = attrs.get( "description" ) ) != null ? ( String ) attr.get() : null );
             }
             return null;
         }
 
 
-        public Object getObjectInstance( Object obj, Name name, Context nameCtx, Hashtable environment ) throws Exception
+        public Object getObjectInstance( Object obj, Name name, Context nameCtx, Hashtable environment )
+            throws Exception
         {
             throw new UnsupportedOperationException( "Please use directory support overload with Attributes argument." );
         }
     }
 
-
     public static class Person
     {
         private String sn, cn, pwd, tele, seealso, desc;
 
-        public Person( String sn, String cn, String pwd, String tele, String seealso, String desc )
+
+        public Person(String sn, String cn, String pwd, String tele, String seealso, String desc)
         {
             this.sn = sn;
             this.cn = cn;

Propchange: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ObjStateFactoryTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ObjStateFactoryTest.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/RFC2713Tests.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/RFC2713Tests.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id



Mime
View raw message