You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2008/06/07 09:48:20 UTC

svn commit: r664295 [2/5] - in /directory/apacheds/branches/bigbang: ./ apacheds-jdbm/src/examples/ apacheds-jdbm/src/main/java/jdbm/ apacheds-jdbm/src/main/java/jdbm/btree/ bootstrap-extract/src/main/java/org/apache/directory/server/schema/bootstrap/p...

Modified: directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java (original)
+++ directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java Sat Jun  7 00:48:16 2008
@@ -54,16 +54,18 @@
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.util.StringTools;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import static org.junit.Assert.assertNotNull;
+
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
 import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
+import org.junit.BeforeClass;
+import org.junit.Test;
+
 
 /**
  * Test the DefaultServerEntry class.
@@ -640,8 +642,6 @@
         LdapDN dn = new LdapDN( "cn=test" );
         DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
         
-        AttributeType atCN = registries.getAttributeTypeRegistry().lookup( "cn" );
-        
         // Test a simple addition
         entry.add( atCN, "test1" );
         assertNotNull( entry.get( atCN ) );
@@ -748,7 +748,6 @@
         LdapDN dn = new LdapDN( "cn=test" );
         DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
         
-        AttributeType atCN = registries.getAttributeTypeRegistry().lookup( "cn" );
         AttributeType atPassword = registries.getAttributeTypeRegistry().lookup( "userPassword" );
         
         byte[] b1 = StringTools.getBytesUtf8( "test1" );
@@ -854,8 +853,6 @@
         LdapDN dn = new LdapDN( "cn=test" );
         DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
         
-        AttributeType atCN = registries.getAttributeTypeRegistry().lookup( "cn" );
-        
         // Test a simple addition
         entry.add( "CN", "test1" );
         assertNotNull( entry.get( atCN ) );
@@ -965,7 +962,6 @@
         LdapDN dn = new LdapDN( "cn=test" );
         ServerEntry entry = new DefaultServerEntry( registries, dn );
         
-        AttributeType atCN = registries.getAttributeTypeRegistry().lookup( "cn" );
         AttributeType atPassword = registries.getAttributeTypeRegistry().lookup( "userPassword" );
         
         byte[] b1 = StringTools.getBytesUtf8( "test1" );
@@ -1077,8 +1073,6 @@
         LdapDN dn = new LdapDN( "cn=test" );
         DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
         
-        AttributeType atCN = registries.getAttributeTypeRegistry().lookup( "cn" );
-        
         // Test a simple addition
         entry.add( "cn", atCN, "test1" );
         assertNotNull( entry.get( atCN ) );
@@ -1185,7 +1179,6 @@
         LdapDN dn = new LdapDN( "cn=test" );
         ServerEntry entry = new DefaultServerEntry( registries, dn );
         
-        AttributeType atCN = registries.getAttributeTypeRegistry().lookup( "cn" );
         AttributeType atPassword = registries.getAttributeTypeRegistry().lookup( "userPassword" );
         
         byte[] b1 = StringTools.getBytesUtf8( "test1" );
@@ -2560,9 +2553,8 @@
             assertTrue( true );
         }
         
-        // Ajout de serverAttributes
-        AttributeType atL = registries.getAttributeTypeRegistry().lookup( "localityName" );
-        AttributeType atC = registries.getAttributeTypeRegistry().lookup( "countryName" );
+        // Adding some serverAttributes
+        //AttributeType atCo = registries.getAttributeTypeRegistry().lookup( "countryName" );
         AttributeType atGN = registries.getAttributeTypeRegistry().lookup( "givenname" );
         AttributeType atStreet = registries.getAttributeTypeRegistry().lookup( "2.5.4.9" );
 
@@ -2630,8 +2622,6 @@
         LdapDN dn = new LdapDN( "cn=test" );
         DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
         
-        AttributeType atCN = registries.getAttributeTypeRegistry().lookup( "cn" );
-
         // Test an empty AT
         entry.put( atCN, (String)null );
         assertEquals( 1, entry.size() );
@@ -2689,8 +2679,6 @@
         LdapDN dn = new LdapDN( "cn=test" );
         DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
         
-        AttributeType atPwd = registries.getAttributeTypeRegistry().lookup( "userPassword" );
-
         // Test an empty AT
         entry.put( atPwd, (byte[])null );
         assertEquals( 1, entry.size() );
@@ -2754,7 +2742,6 @@
         DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
         
         // Adding a null value to an attribute
-        AttributeType atCN = registries.getAttributeTypeRegistry().lookup( "cn" );
         entry.put( atCN, (Value<?>)null );
         
         assertEquals( 1, entry.size() );
@@ -2816,8 +2803,6 @@
         LdapDN dn = new LdapDN( "cn=test" );
         DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
         
-        AttributeType atCN = registries.getAttributeTypeRegistry().lookup( "cn" );
-        
         // Adding a null value should be possible
         entry.put( "cn", (String)null );
         
@@ -2943,8 +2928,6 @@
         LdapDN dn = new LdapDN( "cn=test" );
         DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
         
-        AttributeType atCN = registries.getAttributeTypeRegistry().lookup( "cn" );
-        
         // Test that we get an error when the ID or AT are null
         try
         {
@@ -3091,8 +3074,6 @@
         LdapDN dn = new LdapDN( "cn=test" );
         DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
         
-        AttributeType atCN = registries.getAttributeTypeRegistry().lookup( "cn" );
-        
         // Test that we get an error when the ID or AT are null
         try
         {
@@ -3171,8 +3152,6 @@
         LdapDN dn = new LdapDN( "cn=test" );
         DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
         
-        AttributeType atCN = registries.getAttributeTypeRegistry().lookup( "cn" );
-        
         // Test that we get an error when the ID or AT are null
         try
         {
@@ -3506,7 +3485,6 @@
         LdapDN dn = new LdapDN( "cn=test" );
         DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
         
-        AttributeType atCN = registries.getAttributeTypeRegistry().lookup( "cn" );
         AttributeType atPassword = registries.getAttributeTypeRegistry().lookup( "userPassword" );
         
         byte[] b1 = StringTools.getBytesUtf8( "test1" );
@@ -3573,7 +3551,6 @@
         assertNull( result );
         
         // Now, check what we get when adding one existing AT
-        AttributeType atSN = registries.getAttributeTypeRegistry().lookup( "sn" );
         result = entry.set( atSN );
         
         assertNull( result );
@@ -3583,8 +3560,6 @@
         assertEquals( "sn", ((ServerAttribute)sa).getAttributeType().getName() );
         
         // Add two AT now
-        AttributeType atL = registries.getAttributeTypeRegistry().lookup( "localityName" );
-        AttributeType atC = registries.getAttributeTypeRegistry().lookup( "countryName" );
         AttributeType atGN = registries.getAttributeTypeRegistry().lookup( "givenname" );
         AttributeType atStreet = registries.getAttributeTypeRegistry().lookup( "2.5.4.9" );
         result = entry.set( atL, atC, atGN, atStreet );
@@ -3669,8 +3644,6 @@
         assertEquals( "sn", sa.getId() );
         
         // Add different upIds now
-        AttributeType atL = registries.getAttributeTypeRegistry().lookup( "localityName" );
-        AttributeType atC = registries.getAttributeTypeRegistry().lookup( "countryName" );
         AttributeType atGN = registries.getAttributeTypeRegistry().lookup( "givenname" );
         AttributeType atStreet = registries.getAttributeTypeRegistry().lookup( "2.5.4.9" );
         

Modified: directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerBinaryValueTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerBinaryValueTest.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerBinaryValueTest.java (original)
+++ directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerBinaryValueTest.java Sat Jun  7 00:48:16 2008
@@ -20,16 +20,6 @@
 package org.apache.directory.server.core.entry;
 
 
-import org.apache.directory.shared.ldap.schema.AttributeType;
-import org.apache.directory.shared.ldap.schema.ByteArrayComparator;
-import org.apache.directory.shared.ldap.schema.Normalizer;
-import org.apache.directory.shared.ldap.schema.syntax.AcceptAllSyntaxChecker;
-import org.apache.directory.shared.ldap.util.StringTools;
-import org.junit.Before;
-import org.junit.Test;
-
-import javax.naming.NamingException;
-
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -37,13 +27,24 @@
 import java.io.ObjectOutputStream;
 import java.util.Arrays;
 
+import javax.naming.NamingException;
+
+import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.schema.ByteArrayComparator;
+import org.apache.directory.shared.ldap.schema.Normalizer;
+import org.apache.directory.shared.ldap.schema.syntax.AcceptAllSyntaxChecker;
+import org.apache.directory.shared.ldap.util.StringTools;
+
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
+import org.junit.Before;
+import org.junit.Test;
+
 
 /**
  * Tests that the ServerBinaryValue class works properly as expected.
@@ -80,7 +81,7 @@
         mr.comparator = new ByteArrayComparator();
         mr.normalizer = new Normalizer()
         {
-            public static final long serialVersionUID = 1L;
+            private static final long serialVersionUID = 1L;
             
             public Object normalize( Object value ) throws NamingException
             {
@@ -126,11 +127,11 @@
         }
         
         // create a AT without any syntax
-        AttributeType at = new TestServerEntryUtils.AT( "1.1.3.1" );
+        AttributeType attribute = new TestServerEntryUtils.AT( "1.1.3.1" );
         
         try
         {
-            new ServerBinaryValue( at );
+            new ServerBinaryValue( attribute );
             fail();
         }
         catch ( IllegalArgumentException ae )
@@ -145,9 +146,9 @@
      */
     @Test public void testServerBinaryValueNullValue()
     {
-        AttributeType at = TestServerEntryUtils.getBytesAttributeType();
+        AttributeType attribute = TestServerEntryUtils.getBytesAttributeType();
         
-        ServerBinaryValue value = new ServerBinaryValue( at, null );
+        ServerBinaryValue value = new ServerBinaryValue( attribute, null );
         
         assertNull( value.getReference() );
         assertTrue( value.isNull() );
@@ -159,9 +160,9 @@
      */
     @Test public void testServerBinaryValueEmptyValue()
     {
-        AttributeType at = TestServerEntryUtils.getBytesAttributeType();
+        AttributeType attribute = TestServerEntryUtils.getBytesAttributeType();
         
-        ServerBinaryValue value = new ServerBinaryValue( at, StringTools.EMPTY_BYTES );
+        ServerBinaryValue value = new ServerBinaryValue( attribute, StringTools.EMPTY_BYTES );
         
         assertEquals( StringTools.EMPTY_BYTES, value.getReference() );
         assertFalse( value.isNull() );
@@ -173,9 +174,9 @@
      */
     @Test public void testServerBinaryValueNoValue()
     {
-        AttributeType at = TestServerEntryUtils.getBytesAttributeType();
+        AttributeType attribute = TestServerEntryUtils.getBytesAttributeType();
         byte[] val = new byte[]{0x01};
-        ServerBinaryValue value = new ServerBinaryValue( at );
+        ServerBinaryValue value = new ServerBinaryValue( attribute );
         
         value.set( val );
         assertTrue( Arrays.equals( val, value.getReference() ) );
@@ -189,9 +190,9 @@
      */
     @Test public void testServerBinaryValue()
     {
-        AttributeType at = TestServerEntryUtils.getBytesAttributeType();
+        AttributeType attribute = TestServerEntryUtils.getBytesAttributeType();
         byte[] val = new byte[]{0x01};
-        ServerBinaryValue value = new ServerBinaryValue( at, val );
+        ServerBinaryValue value = new ServerBinaryValue( attribute, val );
         
         assertTrue( Arrays.equals( val, value.getReference() ) );
         assertFalse( value.isNull() );
@@ -208,7 +209,7 @@
         AttributeType at1 = TestServerEntryUtils.getBytesAttributeType();
         ServerBinaryValue sbv = new ServerBinaryValue( at1, null );
         
-        ServerBinaryValue sbv1 = (ServerBinaryValue)sbv.clone();
+        ServerBinaryValue sbv1 = sbv.clone();
         
         assertEquals( sbv, sbv1 );
         
@@ -218,7 +219,7 @@
         assertTrue( Arrays.equals( StringTools.EMPTY_BYTES, sbv.get() ) );
         
         sbv.set(  BYTES2 );
-        sbv1 = (ServerBinaryValue)sbv.clone();
+        sbv1 = sbv.clone();
         
         assertEquals( sbv, sbv1 );
         
@@ -262,17 +263,17 @@
     /**
      * Test the getNormalizedValue method
      */
-    @Test public void testGetNormalizedValue() throws NamingException
+    @Test public void testGetNormalizedValue()
     {
-        AttributeType at = TestServerEntryUtils.getBytesAttributeType();
+        AttributeType attribute = TestServerEntryUtils.getBytesAttributeType();
         
-        ServerBinaryValue value = new ServerBinaryValue( at, null );
+        ServerBinaryValue value = new ServerBinaryValue( attribute, null );
         assertNull( value.getNormalizedValue() );
 
-        value = new ServerBinaryValue( at, StringTools.EMPTY_BYTES );
+        value = new ServerBinaryValue( attribute, StringTools.EMPTY_BYTES );
         assertTrue( Arrays.equals(  StringTools.EMPTY_BYTES, value.getNormalizedValue() ) );
 
-        value = new ServerBinaryValue( at, BYTES2 );
+        value = new ServerBinaryValue( attribute, BYTES2 );
         assertTrue( Arrays.equals( BYTES1, value.getNormalizedValue() ) );
     }
     
@@ -280,17 +281,17 @@
     /**
      * Test the getNormalizedValue method
      */
-    @Test public void testGetNormalizedValueCopy() throws NamingException
+    @Test public void testGetNormalizedValueCopy()
     {
-        AttributeType at = TestServerEntryUtils.getBytesAttributeType();
+        AttributeType attribute = TestServerEntryUtils.getBytesAttributeType();
         
-        ServerBinaryValue value = new ServerBinaryValue( at, null );
+        ServerBinaryValue value = new ServerBinaryValue( attribute, null );
         assertNull( value.getNormalizedValueCopy() );
 
-        value = new ServerBinaryValue( at, StringTools.EMPTY_BYTES );
+        value = new ServerBinaryValue( attribute, StringTools.EMPTY_BYTES );
         assertTrue( Arrays.equals(  StringTools.EMPTY_BYTES, value.getNormalizedValueCopy() ) );
 
-        value = new ServerBinaryValue( at, BYTES2 );
+        value = new ServerBinaryValue( attribute, BYTES2 );
         assertTrue( Arrays.equals( BYTES1, value.getNormalizedValueCopy() ) );
     }
     
@@ -298,17 +299,17 @@
     /**
      * Test the getNormalizedValue method
      */
-    @Test public void testGetNormalizedValueReference() throws NamingException
+    @Test public void testGetNormalizedValueReference()
     {
-        AttributeType at = TestServerEntryUtils.getBytesAttributeType();
+        AttributeType attribute = TestServerEntryUtils.getBytesAttributeType();
         
-        ServerBinaryValue value = new ServerBinaryValue( at, null );
+        ServerBinaryValue value = new ServerBinaryValue( attribute, null );
         assertNull( value.getNormalizedValueReference() );
 
-        value = new ServerBinaryValue( at, StringTools.EMPTY_BYTES );
+        value = new ServerBinaryValue( attribute, StringTools.EMPTY_BYTES );
         assertTrue( Arrays.equals(  StringTools.EMPTY_BYTES, value.getNormalizedValueReference() ) );
 
-        value = new ServerBinaryValue( at, BYTES2 );
+        value = new ServerBinaryValue( attribute, BYTES2 );
         assertTrue( Arrays.equals( BYTES1, value.getNormalizedValueReference() ) );
     }
     
@@ -317,12 +318,12 @@
      * Test the getAttributeType method
      */
     @Test
-    public void testgetAttributeType() throws NamingException
+    public void testgetAttributeType()
     {
-        AttributeType at = TestServerEntryUtils.getBytesAttributeType();
-        ServerBinaryValue sbv = new ServerBinaryValue( at );
+        AttributeType attribute = TestServerEntryUtils.getBytesAttributeType();
+        ServerBinaryValue sbv = new ServerBinaryValue( attribute );
         
-        assertEquals( at, sbv.getAttributeType() );
+        assertEquals( attribute, sbv.getAttributeType() );
     }    
 
     
@@ -331,20 +332,20 @@
      * 
      * The SyntaxChecker does not accept values longer than 5 chars.
      */
-    @Test public void testIsValid() throws NamingException
+    @Test public void testIsValid()
     {
-        AttributeType at = TestServerEntryUtils.getBytesAttributeType();
+        AttributeType attribute = TestServerEntryUtils.getBytesAttributeType();
         
-        ServerBinaryValue value = new ServerBinaryValue( at, null );
+        ServerBinaryValue value = new ServerBinaryValue( attribute, null );
         assertTrue( value.isValid() );
         
-        value = new ServerBinaryValue( at, StringTools.EMPTY_BYTES );
+        value = new ServerBinaryValue( attribute, StringTools.EMPTY_BYTES );
         assertTrue( value.isValid() );
 
-        value = new ServerBinaryValue( at, new byte[]{0x01, 0x02} );
+        value = new ServerBinaryValue( attribute, new byte[]{0x01, 0x02} );
         assertTrue( value.isValid() );
 
-        value = new ServerBinaryValue( at, new byte[]{0x01, 0x02, 0x03, 0x04, 0x05, 0x06} );
+        value = new ServerBinaryValue( attribute, new byte[]{0x01, 0x02, 0x03, 0x04, 0x05, 0x06} );
         assertFalse( value.isValid() );
     }
     
@@ -353,12 +354,12 @@
      * Tests to make sure the hashCode method is working properly.
      * @throws Exception on errors
      */
-    @Test public void testHashCode() throws Exception
+    @Test public void testHashCode()
     {
-        AttributeType at = TestServerEntryUtils.getBytesAttributeType();
-        ServerBinaryValue v0 = new ServerBinaryValue( at, new byte[]{0x01, 0x02} );
-        ServerBinaryValue v1 = new ServerBinaryValue( at, new byte[]{(byte)0x81, (byte)0x82} );
-        ServerBinaryValue v2 = new ServerBinaryValue( at, new byte[]{0x01, 0x02} );
+        AttributeType attribute = TestServerEntryUtils.getBytesAttributeType();
+        ServerBinaryValue v0 = new ServerBinaryValue( attribute, new byte[]{0x01, 0x02} );
+        ServerBinaryValue v1 = new ServerBinaryValue( attribute, new byte[]{(byte)0x81, (byte)0x82} );
+        ServerBinaryValue v2 = new ServerBinaryValue( attribute, new byte[]{0x01, 0x02} );
         assertEquals( v0.hashCode(), v1.hashCode() );
         assertEquals( v1.hashCode(), v2.hashCode() );
         assertEquals( v0.hashCode(), v2.hashCode() );
@@ -369,7 +370,7 @@
         assertTrue( v1.isValid() );
         assertTrue( v2.isValid() );
 
-        ServerBinaryValue v3 = new ServerBinaryValue( at, new byte[]{0x01, 0x03} );
+        ServerBinaryValue v3 = new ServerBinaryValue( attribute, new byte[]{0x01, 0x03} );
         assertFalse( v3.equals( v0 ) );
         assertFalse( v3.equals( v1 ) );
         assertFalse( v3.equals( v2 ) );
@@ -383,8 +384,8 @@
     @Test
     public void testSame() throws NamingException
     {
-        AttributeType at = TestServerEntryUtils.getBytesAttributeType();
-        ServerBinaryValue sbv = new ServerBinaryValue( at );
+        AttributeType attribute = TestServerEntryUtils.getBytesAttributeType();
+        ServerBinaryValue sbv = new ServerBinaryValue( attribute );
 
         sbv.normalize();
         assertTrue( sbv.isSame() );
@@ -409,14 +410,14 @@
     @Test
     public void testInstanceOf() throws NamingException
     {
-        AttributeType at = TestServerEntryUtils.getBytesAttributeType();
-        ServerBinaryValue sbv = new ServerBinaryValue( at );
+        AttributeType attribute = TestServerEntryUtils.getBytesAttributeType();
+        ServerBinaryValue sbv = new ServerBinaryValue( attribute );
         
-        assertTrue( sbv.instanceOf( at ) );
+        assertTrue( sbv.instanceOf( attribute ) );
         
-        at = TestServerEntryUtils.getIA5StringAttributeType();
+        attribute = TestServerEntryUtils.getIA5StringAttributeType();
         
-        assertFalse( sbv.instanceOf( at ) );
+        assertFalse( sbv.instanceOf( attribute ) );
     }    
     
 
@@ -426,8 +427,8 @@
     @Test
     public void testNormalize() throws NamingException
     {
-        AttributeType at = TestServerEntryUtils.getBytesAttributeType();
-        ServerBinaryValue sbv = new ServerBinaryValue( at );
+        AttributeType attribute = TestServerEntryUtils.getBytesAttributeType();
+        ServerBinaryValue sbv = new ServerBinaryValue( attribute );
 
         sbv.normalize();
         assertEquals( null, sbv.getNormalizedValue() );

Modified: directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerEntrySerializerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerEntrySerializerTest.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerEntrySerializerTest.java (original)
+++ directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerEntrySerializerTest.java Sat Jun  7 00:48:16 2008
@@ -42,9 +42,10 @@
 import org.apache.directory.shared.ldap.schema.DeepTrimToLowerNormalizer;
 import org.apache.directory.shared.ldap.schema.OidNormalizer;
 import org.apache.directory.shared.ldap.util.StringTools;
+
+import static org.junit.Assert.assertEquals;
 import org.junit.BeforeClass;
 import org.junit.Test;
-import static org.junit.Assert.assertEquals;
 
 
 /**
@@ -96,14 +97,15 @@
 
         oidOids.put( "dc", new OidNormalizer( "0.9.2342.19200300.100.1.25", new DeepTrimToLowerNormalizer() ) );
         oidOids.put( "domaincomponent", new OidNormalizer( "0.9.2342.19200300.100.1.25", new DeepTrimToLowerNormalizer() ) );
-        oidOids.put( "0.9.2342.19200300.100.1.25", new OidNormalizer( "0.9.2342.19200300.100.1.25", new DeepTrimToLowerNormalizer() ) );
+        oidOids.put( "0.9.2342.19200300.100.1.25", 
+            new OidNormalizer( "0.9.2342.19200300.100.1.25", new DeepTrimToLowerNormalizer() ) );
         oidOids.put( "ou", new OidNormalizer( "2.5.4.11", new DeepTrimToLowerNormalizer() ) );
         oidOids.put( "organizationalUnitName", new OidNormalizer( "2.5.4.11", new DeepTrimToLowerNormalizer() ) );
         oidOids.put( "2.5.4.11", new OidNormalizer( "2.5.4.11", new DeepTrimToLowerNormalizer() ) );
     }
 
     
-    @Test public void testSerializeEmtpyServerEntry() throws IOException, Exception, ClassNotFoundException
+    @Test public void testSerializeEmtpyServerEntry() throws Exception
     {
         LdapDN dn = LdapDN.EMPTY_LDAPDN;
         ServerEntry entry = new DefaultServerEntry( registries, dn );
@@ -117,7 +119,8 @@
         assertEquals( entry, result );
     }
 
-    @Test public void testSerializeDNServerEntry() throws IOException, Exception, ClassNotFoundException
+
+    @Test public void testSerializeDNServerEntry() throws Exception
     {
         LdapDN dn = new LdapDN( "cn=text, dc=example, dc=com" );
         dn.normalize( oids );
@@ -134,7 +137,7 @@
     }
 
 
-    @Test public void testSerializeServerEntryOC() throws IOException, Exception, ClassNotFoundException
+    @Test public void testSerializeServerEntryOC() throws Exception
     {
         LdapDN dn = new LdapDN( "cn=text, dc=example, dc=com" );
         dn.normalize( oids );
@@ -152,7 +155,7 @@
     }
 
 
-    @Test public void testSerializeServerEntry() throws IOException, Exception, ClassNotFoundException
+    @Test public void testSerializeServerEntry() throws Exception
     {
         LdapDN dn = new LdapDN( "cn=text, dc=example, dc=com" );
         dn.normalize( oids );

Modified: directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerModificationTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerModificationTest.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerModificationTest.java (original)
+++ directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerModificationTest.java Sat Jun  7 00:48:16 2008
@@ -19,14 +19,14 @@
  */
 package org.apache.directory.server.core.entry;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.schema.AttributeType;
-import org.junit.Test;
-import static org.junit.Assert.assertTrue;
+
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
 
 
 /**
@@ -37,7 +37,7 @@
  */
 public class ServerModificationTest
 {
-    @Test public void testCreateServerModification() throws NamingException
+    @Test public void testCreateServerModification()
     {
         AttributeType at = TestServerEntryUtils.getIA5StringAttributeType();
         ServerAttribute attribute = new DefaultServerAttribute( at );

Modified: directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerStringValueTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerStringValueTest.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerStringValueTest.java (original)
+++ directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerStringValueTest.java Sat Jun  7 00:48:16 2008
@@ -20,18 +20,6 @@
 package org.apache.directory.server.core.entry;
 
 
-import org.apache.directory.shared.ldap.entry.Value;
-import org.apache.directory.shared.ldap.schema.AttributeType;
-import org.apache.directory.shared.ldap.schema.DeepTrimToLowerNormalizer;
-import org.apache.directory.shared.ldap.schema.NoOpNormalizer;
-import org.apache.directory.shared.ldap.schema.syntax.AcceptAllSyntaxChecker;
-import org.apache.directory.shared.ldap.schema.syntax.SyntaxChecker;
-import org.junit.Before;
-import org.junit.Test;
-
-import javax.naming.NamingException;
-import javax.naming.directory.InvalidAttributeValueException;
-
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -43,15 +31,28 @@
 import java.util.HashSet;
 import java.util.List;
 
-import jdbm.helper.StringComparator;
+import javax.naming.NamingException;
+import javax.naming.directory.InvalidAttributeValueException;
+
+import org.apache.directory.shared.ldap.entry.Value;
+import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.schema.DeepTrimToLowerNormalizer;
+import org.apache.directory.shared.ldap.schema.NoOpNormalizer;
+import org.apache.directory.shared.ldap.schema.syntax.AcceptAllSyntaxChecker;
+import org.apache.directory.shared.ldap.schema.syntax.SyntaxChecker;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
+import org.junit.Before;
+import org.junit.Test;
+
+import jdbm.helper.StringComparator;
+
 
 /**
  * Tests that the ServerStringValue class works properly as expected.
@@ -98,9 +99,9 @@
     @Test 
     public void testServerStringValueNullValue()
     {
-        AttributeType at = TestServerEntryUtils.getIA5StringAttributeType();
+        AttributeType attribute = TestServerEntryUtils.getIA5StringAttributeType();
         
-        ServerStringValue value = new ServerStringValue( at, null );
+        ServerStringValue value = new ServerStringValue( attribute, null );
         
         assertNull( value.get() );
         assertTrue( value.isNull() );
@@ -110,11 +111,11 @@
     /**
      * Test the getNormalizedValue method
      */
-    @Test public void testGetNormalizedValue() throws NamingException
+    @Test public void testGetNormalizedValue()
     {
-        AttributeType at = TestServerEntryUtils.getIA5StringAttributeType();
+        AttributeType attribute = TestServerEntryUtils.getIA5StringAttributeType();
         
-        ServerStringValue value = new ServerStringValue( at, null );
+        ServerStringValue value = new ServerStringValue( attribute, null );
         
         assertFalse( value.isNormalized() );
         assertNull( value.getNormalizedValue() );
@@ -137,11 +138,11 @@
      * 
      * The SyntaxChecker does not accept values longer than 5 chars.
      */
-    @Test public void testIsValid() throws NamingException
+    @Test public void testIsValid()
     {
-        AttributeType at = TestServerEntryUtils.getIA5StringAttributeType();
+        AttributeType attribute = TestServerEntryUtils.getIA5StringAttributeType();
         
-        ServerStringValue value = new ServerStringValue( at, null );
+        ServerStringValue value = new ServerStringValue( attribute, null );
         assertTrue( value.isValid() );
 
         value.set( "" );
@@ -161,8 +162,8 @@
     @Test
     public void testNormalize() throws NamingException
     {
-        AttributeType at = TestServerEntryUtils.getIA5StringAttributeType();
-        ServerStringValue ssv = new ServerStringValue( at );
+        AttributeType attribute = TestServerEntryUtils.getIA5StringAttributeType();
+        ServerStringValue ssv = new ServerStringValue( attribute );
 
         ssv.normalize();
         assertEquals( null, ssv.getNormalizedValue() );
@@ -183,14 +184,14 @@
     @Test
     public void testInstanceOf() throws NamingException
     {
-        AttributeType at = TestServerEntryUtils.getIA5StringAttributeType();
-        ServerStringValue ssv = new ServerStringValue( at );
+        AttributeType attribute = TestServerEntryUtils.getIA5StringAttributeType();
+        ServerStringValue ssv = new ServerStringValue( attribute );
         
-        assertTrue( ssv.instanceOf( at ) );
+        assertTrue( ssv.instanceOf( attribute ) );
         
-        at = TestServerEntryUtils.getBytesAttributeType();
+        attribute = TestServerEntryUtils.getBytesAttributeType();
         
-        assertFalse( ssv.instanceOf( at ) );
+        assertFalse( ssv.instanceOf( attribute ) );
     }    
     
 
@@ -198,12 +199,12 @@
      * Test the getAttributeType method
      */
     @Test
-    public void testgetAttributeType() throws NamingException
+    public void testgetAttributeType()
     {
-        AttributeType at = TestServerEntryUtils.getIA5StringAttributeType();
-        ServerStringValue ssv = new ServerStringValue( at );
+        AttributeType attribute = TestServerEntryUtils.getIA5StringAttributeType();
+        ServerStringValue ssv = new ServerStringValue( attribute );
         
-        assertEquals( at, ssv.getAttributeType() );
+        assertEquals( attribute, ssv.getAttributeType() );
     }    
 
     
@@ -260,11 +261,11 @@
         }
         
         // create a AT without any syntax
-        AttributeType at = new TestServerEntryUtils.AT( "1.1.3.1" );
+        AttributeType attribute = new TestServerEntryUtils.AT( "1.1.3.1" );
         
         try
         {
-            new ServerStringValue( at );
+            new ServerStringValue( attribute );
             fail();
         }
         catch ( IllegalArgumentException iae )
@@ -278,7 +279,7 @@
      * Tests to make sure the hashCode method is working properly.
      * @throws Exception on errors
      */
-    @Test public void testHashCode() throws Exception
+    @Test public void testHashCode()
     {
         AttributeType at1 = TestServerEntryUtils.getCaseIgnoringAttributeNoNumbersType();
         ServerStringValue v0 = new ServerStringValue( at1, "Alex" );
@@ -337,7 +338,7 @@
         AttributeType at1 = TestServerEntryUtils.getCaseIgnoringAttributeNoNumbersType();
         ServerStringValue ssv = new ServerStringValue( at1, "Test" );
         
-        ServerStringValue ssv1 = (ServerStringValue)ssv.clone();
+        ServerStringValue ssv1 = ssv.clone();
         
         assertEquals( ssv, ssv1 );
         
@@ -347,7 +348,7 @@
         assertEquals( "", ssv.get() );
         
         ssv.set(  "  This is    a   TEST  " );
-        ssv1 = (ServerStringValue)ssv.clone();
+        ssv1 = ssv.clone();
         
         assertEquals( ssv, ssv1 );
         
@@ -364,7 +365,7 @@
      *
      * @throws Exception on errors
      */
-    @Test public void testConstrainedString() throws Exception
+    @Test public void testConstrainedString()
     {
         s.setSyntaxChecker( new SyntaxChecker() {
             public String getSyntaxOid() { return "1.1.1.1"; }
@@ -378,7 +379,7 @@
                 return false;
             }
             public void assertSyntax( Object value ) throws NamingException
-            { if ( ! isValidSyntax( value ) ) throw new InvalidAttributeValueException(); }
+            { if ( ! isValidSyntax( value ) ) {throw new InvalidAttributeValueException(); }}
         });
 
         mr.syntax = s;
@@ -405,18 +406,18 @@
                 int i1 = getValue( o1 );
                 int i2 = getValue( o2 );
 
-                if ( i1 == i2 ) return 0;
-                if ( i1 > i2 ) return 1;
-                if ( i1 < i2 ) return -1;
+                if ( i1 == i2 ) { return 0; }
+                if ( i1 > i2 ) { return 1; }
+                if ( i1 < i2 ) { return -1; }
 
                 throw new IllegalStateException( "should not get here at all" );
             }
 
-            int getValue( String val )
+            public int getValue( String val )
             {
-                if ( val.equals( "LOW" ) ) return 0;
-                if ( val.equals( "MEDIUM" ) ) return 1;
-                if ( val.equals( "HIGH" ) ) return 2;
+                if ( val.equals( "LOW" ) ) { return 0; }
+                if ( val.equals( "MEDIUM" ) ) { return 1; }
+                if ( val.equals( "HIGH" ) ) { return 2; }
                 throw new IllegalArgumentException( "Not a valid value" );
             }
         };
@@ -509,7 +510,7 @@
      * is still OK.
      * @throws Exception on errors
      */
-    @Test public void testAcceptAllNoNormalization() throws Exception
+    @Test public void testAcceptAllNoNormalization()
     {
         // check that normalization and syntax checks work as expected
         ServerStringValue value = new ServerStringValue( at, "hello" );
@@ -582,9 +583,9 @@
                 {
                     return mr.getComparator().compare( n1, n2 );
                 }
-                catch ( Exception e )
+                catch ( NamingException ne )
                 {
-                    throw new IllegalStateException( "Normalization and comparison should succeed!", e );
+                    throw new IllegalStateException( "Normalization and comparison should succeed!", ne );
                 }
             }
         };

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java (original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java Sat Jun  7 00:48:16 2008
@@ -604,5 +604,11 @@
         public void setSchema( String schemaName )
         {
         }
+
+        public String[] getNamesRef()
+        {
+            // TODO Auto-generated method stub
+            return null;
+        }
     }
 }

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java (original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java Sat Jun  7 00:48:16 2008
@@ -607,5 +607,11 @@
         public void setSchema( String schemaName )
         {
         }
+
+        public String[] getNamesRef()
+        {
+            // TODO Auto-generated method stub
+            return null;
+        }
     }
 }

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java (original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java Sat Jun  7 00:48:16 2008
@@ -621,5 +621,11 @@
         public void setSchema( String schemaName )
         {
         }
+
+        public String[] getNamesRef()
+        {
+            // TODO Auto-generated method stub
+            return null;
+        }
     }
 }

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java (original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java Sat Jun  7 00:48:16 2008
@@ -1424,8 +1424,8 @@
         assertEquals( "1.3.6.1.4.1.18060.0.4.0.2.10000", at.getOid() );
         assertEquals( "name", at.getSuperior().getName() );
         assertEquals( "bogus description", at.getDescription() );
-        assertEquals( "bogus", at.getNames()[0] );
-        assertEquals( "bogusName", at.getNames()[1] );
+        assertEquals( "bogus", at.getName() );
+        assertEquals( "bogusName", at.getNamesRef()[1] );
         assertEquals( true, at.isCanUserModify() );
         assertEquals( false, at.isCollective() );
         assertEquals( false, at.isObsolete() );
@@ -1486,8 +1486,8 @@
         assertEquals( "1.3.6.1.4.1.18060.0.4.0.2.10000", at.getOid() );
         assertEquals( "name", at.getSuperior().getName() );
         assertEquals( "bogus description", at.getDescription() );
-        assertEquals( "bogus", at.getNames()[0] );
-        assertEquals( "bogusName", at.getNames()[1] );
+        assertEquals( "bogus", at.getNamesRef()[0] );
+        assertEquals( "bogusName", at.getNamesRef()[1] );
         assertEquals( true, at.isCanUserModify() );
         assertEquals( false, at.isCollective() );
         assertEquals( false, at.isObsolete() );

Modified: directory/apacheds/branches/bigbang/core-plugin/src/main/resources/org/apache/directory/server/core/tools/schema/AttributeTypes.template
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-plugin/src/main/resources/org/apache/directory/server/core/tools/schema/AttributeTypes.template?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-plugin/src/main/resources/org/apache/directory/server/core/tools/schema/AttributeTypes.template (original)
+++ directory/apacheds/branches/bigbang/core-plugin/src/main/resources/org/apache/directory/server/core/tools/schema/AttributeTypes.template Sat Jun  7 00:48:16 2008
@@ -69,7 +69,9 @@
         ## --------------------------------------------------------------------
 
         attributeType = newAttributeType( "$attrType.getOid()", registries );
-#if ( $attrType.getDescription() )        attributeType.setDescription( "$attrType.getDescription()" );
+#if ( $attrType.getDescription() )
+        #set( $desc = $attrType.getDescription().replaceAll("\"", "\\\"") )
+        attributeType.setDescription( "$desc" );
 #end
         attributeType.setCanUserModify( ! $attrType.isNoUserModification() );
         attributeType.setSingleValue( $attrType.isSingleValue() );

Modified: directory/apacheds/branches/bigbang/core-plugin/src/main/resources/org/apache/directory/server/core/tools/schema/ObjectClasses.template
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-plugin/src/main/resources/org/apache/directory/server/core/tools/schema/ObjectClasses.template?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-plugin/src/main/resources/org/apache/directory/server/core/tools/schema/ObjectClasses.template (original)
+++ directory/apacheds/branches/bigbang/core-plugin/src/main/resources/org/apache/directory/server/core/tools/schema/ObjectClasses.template Sat Jun  7 00:48:16 2008
@@ -71,7 +71,8 @@
         objectClass.setObsolete( $objectClass.isObsolete() );
 
         #if ( $objectClass.getDescription() )
-objectClass.setDescription( "$objectClass.getDescription()" );
+#set( $desc = $objectClass.getDescription().replaceAll("\"", "\\\"") )
+objectClass.setDescription( "$desc" );
         #end
 // set the objectclass type
         #if ( $objectClass.getClassType().getValue() == 0 )

Modified: directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractTestCase.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractTestCase.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractTestCase.java (original)
+++ directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractTestCase.java Sat Jun  7 00:48:16 2008
@@ -58,8 +58,8 @@
     public static final Logger LOG = LoggerFactory.getLogger( AbstractTestCase.class );
 
     public static final String LDIF = 
-    	"dn: uid=akarasulu,ou=users,ou=system\n" + 
-    	"cn: Alex Karasulu\n" +
+        "dn: uid=akarasulu,ou=users,ou=system\n" + 
+        "cn: Alex Karasulu\n" +
         "sn: Karasulu\n" + 
         "givenname: Alex\n" + 
         "objectclass: top\n" + 
@@ -178,7 +178,7 @@
         // -------------------------------------------------------------------
 
         LdifReader reader = new LdifReader();
-    	List<LdifEntry> entries = reader.parseLdif( LDIF );
+        List<LdifEntry> entries = reader.parseLdif( LDIF );
         LdifEntry entry = entries.get(0);
         testEntries.add( entry );
 
@@ -213,12 +213,9 @@
 
         if ( in != null )
         {
-            Iterator<LdifEntry> list = new LdifReader( in );
-            
-            while ( list.hasNext() )
+            for ( LdifEntry ldifEntry:new LdifReader( in ) )
             {
-                entry = list.next();
-                testEntries.add( entry );
+                testEntries.add( ldifEntry );
             }
         }
 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java Sat Jun  7 00:48:16 2008
@@ -20,6 +20,8 @@
 package org.apache.directory.server.core.authn;
 
 
+import javax.naming.NamingException;
+
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.shared.ldap.name.LdapDN;
 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java Sat Jun  7 00:48:16 2008
@@ -20,6 +20,10 @@
 package org.apache.directory.server.core.authn;
 
 
+import javax.naming.Context;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/Authenticator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/Authenticator.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/Authenticator.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/Authenticator.java Sat Jun  7 00:48:16 2008
@@ -20,6 +20,9 @@
 package org.apache.directory.server.core.authn;
 
 
+import javax.naming.Context;
+import javax.naming.NamingException;
+
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
 import org.apache.directory.server.core.jndi.ServerContext;
@@ -49,7 +52,7 @@
      * Returns the type of this authenticator (e.g. <tt>'simple'</tt>,
      * <tt>'none'</tt>,...).
      */
-    public String getAuthenticatorType();
+    String getAuthenticatorType();
 
 
     /**
@@ -63,7 +66,7 @@
      * Called by {@link AuthenticationInterceptor} to indicate that this
      * authenticator is being removed from service.
      */
-    public void destroy();
+    void destroy();
 
     
     /**
@@ -74,7 +77,7 @@
      * 
      * @param bindDn the already normalized distinguished name of the bind principal
      */
-    public void invalidateCache( LdapDN bindDn );
+    void invalidateCache( LdapDN bindDn );
 
     
     /**

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/LdapPrincipal.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/LdapPrincipal.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/LdapPrincipal.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/LdapPrincipal.java Sat Jun  7 00:48:16 2008
@@ -88,7 +88,8 @@
     {
         this.name = name;
         this.authenticationLevel = authenticationLevel;
-        this.userPassword = userPassword;
+        this.userPassword = new byte[ userPassword.length ];
+        System.arraycopy( userPassword, 0, this.userPassword, 0, userPassword.length );
     }
 
 
@@ -154,6 +155,7 @@
 
     public void setUserPassword( byte[] userPassword )
     {
-        this.userPassword = userPassword;
+        this.userPassword = new byte[ userPassword.length ];
+        System.arraycopy( userPassword, 0, this.userPassword, 0, userPassword.length );
     }
 }

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java Sat Jun  7 00:48:16 2008
@@ -34,20 +34,20 @@
 import javax.naming.NamingException;
 
 import org.apache.commons.collections.map.LRUMap;
-import org.apache.directory.server.core.interceptor.context.BindOperationContext;
-import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
-import org.apache.directory.server.core.normalization.NormalizationInterceptor;
-import org.apache.directory.server.core.referral.ReferralInterceptor;
 import org.apache.directory.server.core.authz.AciAuthorizationInterceptor;
 import org.apache.directory.server.core.authz.DefaultAuthorizationInterceptor;
-import org.apache.directory.server.core.exception.ExceptionInterceptor;
-import org.apache.directory.server.core.operational.OperationalAttributeInterceptor;
-import org.apache.directory.server.core.schema.SchemaInterceptor;
-import org.apache.directory.server.core.subtree.SubentryInterceptor;
 import org.apache.directory.server.core.collective.CollectiveAttributeInterceptor;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.entry.ServerStringValue;
 import org.apache.directory.server.core.event.EventInterceptor;
+import org.apache.directory.server.core.exception.ExceptionInterceptor;
+import org.apache.directory.server.core.interceptor.context.BindOperationContext;
+import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
+import org.apache.directory.server.core.normalization.NormalizationInterceptor;
+import org.apache.directory.server.core.operational.OperationalAttributeInterceptor;
+import org.apache.directory.server.core.referral.ReferralInterceptor;
+import org.apache.directory.server.core.schema.SchemaInterceptor;
+import org.apache.directory.server.core.subtree.SubentryInterceptor;
 import org.apache.directory.server.core.trigger.TriggerInterceptor;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.constants.LdapSecurityConstants;
@@ -177,8 +177,8 @@
         
         private EncryptionMethod( LdapSecurityConstants algorithm, byte[] salt )
         {
-        	this.algorithm = algorithm;
-        	this.salt = salt;
+            this.algorithm = algorithm;
+            this.salt = salt;
         }
     }
     
@@ -284,7 +284,7 @@
                 LOG.debug( "{} Authenticated", opContext.getDn() );
             }
             
-        	return principal;
+            return principal;
         }
         
         // Let's see if the stored password was encrypted
@@ -379,7 +379,8 @@
                     // in two parts, after having decoded the password.
                     // The salt will be stored into the EncryptionMethod structure
                     // The salt is at the end of the credentials, and is 8 bytes long
-                    byte[] passwordAndSalt = Base64.decode( new String( credentials, pos, credentials.length - pos, "UTF-8" ).toCharArray() );
+                    byte[] passwordAndSalt = Base64.decode( new String( credentials, pos, credentials.length - pos, "UTF-8" ).
+                        toCharArray() );
                     
                     encryptionMethod.salt = new byte[8];
                     byte[] password = new byte[passwordAndSalt.length - encryptionMethod.salt.length];
@@ -528,7 +529,8 @@
                     salt[1] = ( byte ) ( i2 < 12 ? ( i2 + '.' ) : i2 < 38 ? ( i2 + 'A' - 12 ) : ( i2 + 'a' - 38 ) );
                 }
 
-                String saltWithCrypted = UnixCrypt.crypt( StringTools.utf8ToString( credentials ), StringTools.utf8ToString( salt ) );
+                String saltWithCrypted = UnixCrypt.crypt( StringTools.utf8ToString( credentials ), 
+                    StringTools.utf8ToString( salt ) );
                 String crypted = saltWithCrypted.substring( 2 );
                 
                 return StringTools.getBytesUtf8( crypted );
@@ -621,8 +623,7 @@
         String sPassword = StringTools.utf8ToString( password );
         int rightParen = sPassword.indexOf( '}' );
 
-        if ( ( sPassword != null ) &&
-             ( sPassword.length() > 2 ) &&
+        if ( ( sPassword.length() > 2 ) &&
              ( sPassword.charAt( 0 ) == '{' ) &&
              ( rightParen > -1 ) )
         {

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java Sat Jun  7 00:48:16 2008
@@ -20,6 +20,16 @@
 package org.apache.directory.server.core.authz;
 
 
+import javax.naming.directory.SearchControls;
+
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.DefaultCoreSession;
@@ -72,16 +82,6 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.naming.directory.SearchControls;
-
-import java.text.ParseException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
 
 /**
  * An ACI based authorization service.
@@ -229,8 +229,8 @@
 
         // stuff for dealing with subentries (garbage for now)
         Value<?> subschemaSubentry = 
-        	directoryService.getPartitionNexus().getRootDSE( null ).
-        		get( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ).get();
+            directoryService.getPartitionNexus().getRootDSE( null ).
+                get( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ).get();
         LdapDN subschemaSubentryDnName = new LdapDN( (String)(subschemaSubentry.get()) );
         subschemaSubentryDnName.normalize( atRegistry.getNormalizerMapping() );
         subschemaSubentryDn = subschemaSubentryDnName.toNormName();
@@ -371,8 +371,7 @@
         // will contain the subentryACI attributes that effect subentries
         LdapDN parentDn = ( LdapDN ) dn.clone();
         parentDn.remove( dn.size() - 1 );
-        ServerEntry administrativeEntry = opContext.lookup( parentDn, 
-            Collections.singletonList( SchemaConstants.SUBENTRY_ACI_AT ) ).getOriginalEntry();
+        ServerEntry administrativeEntry = opContext.lookup( parentDn, ByPassConstants.LOOKUP_BYPASS ).getOriginalEntry();
         
         EntryAttribute subentryAci = administrativeEntry.get( subentryAciType );
 
@@ -501,8 +500,8 @@
 
     public void delete( NextInterceptor next, DeleteOperationContext deleteContext ) throws Exception
     {
-    	LdapDN name = deleteContext.getDn();
-    	
+        LdapDN name = deleteContext.getDn();
+        
         LdapPrincipal principal = deleteContext.getSession().getEffectivePrincipal();
         LdapDN principalDn = principal.getJndiName();
 
@@ -761,7 +760,7 @@
         
         if ( !principalDn.isNormalized() )
         {
-        	principalDn.normalize( atRegistry.getNormalizerMapping() );
+            principalDn.normalize( atRegistry.getNormalizerMapping() );
         }
         
         if ( isPrincipalAnAdministrator( principalDn ) || !enabled )
@@ -1031,7 +1030,7 @@
     {
     	LdapDN name = opContext.getDn();
     	String oid = opContext.getOid();
-    	Value<?> value = (Value<?>)opContext.getValue();
+    	Value<?> value = ( Value<?> ) opContext.getValue();
 
         ClonedServerEntry entry = opContext.lookup( name, ByPassConstants.LOOKUP_BYPASS );
 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java Sat Jun  7 00:48:16 2008
@@ -20,6 +20,16 @@
 package org.apache.directory.server.core.authz;
 
 
+import javax.naming.directory.SearchControls;
+import javax.naming.ldap.LdapContext;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.NoPermissionException;
+
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.DefaultCoreSession;
@@ -176,8 +186,8 @@
 
     public void delete( NextInterceptor nextInterceptor, DeleteOperationContext opContext ) throws Exception
     {
-    	LdapDN name = opContext.getDn();
-    	
+        LdapDN name = opContext.getDn();
+        
         if ( !enabled )
         {
             nextInterceptor.delete( opContext );
@@ -543,7 +553,7 @@
         
         if ( !dn.isNormalized() )
         {
-        	dn.normalize( normalizerMapping );
+            dn.normalize( normalizerMapping );
         }
 
         // Admin users gets full access to all entries

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java Sat Jun  7 00:48:16 2008
@@ -20,6 +20,10 @@
 package org.apache.directory.server.core.authz;
 
 
+import javax.naming.directory.SearchControls;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java Sat Jun  7 00:48:16 2008
@@ -46,9 +46,9 @@
 {
     public Collection<ACITuple> filter( 
             Registries registries, 
-    		Collection<ACITuple> tuples, 
-    		OperationScope scope, 
-    		OperationContext opContext,
+	    Collection<ACITuple> tuples, 
+	    OperationScope scope, 
+	    OperationContext opContext,
             Collection<LdapDN> userGroupNames, 
             LdapDN userName, 
             ServerEntry userEntry, 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java Sat Jun  7 00:48:16 2008
@@ -20,6 +20,15 @@
 package org.apache.directory.server.core.authz.support;
 
 
+import javax.naming.directory.SearchControls;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+
 import org.apache.directory.server.core.authn.AuthenticationInterceptor;
 import org.apache.directory.server.core.authz.AciAuthorizationInterceptor;
 import org.apache.directory.server.core.authz.DefaultAuthorizationInterceptor;

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java Sat Jun  7 00:48:16 2008
@@ -82,7 +82,7 @@
             
             if ( name.isNormalized() == false )
             {
-            	name = LdapDN.normalize( name, atRegistry.getNormalizerMapping() );
+                name = LdapDN.normalize( name, atRegistry.getNormalizerMapping() );
             }
             
             String[] retAttrs = operation.getSearchControls().getReturningAttributes();

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java Sat Jun  7 00:48:16 2008
@@ -138,8 +138,8 @@
     public void add( NextInterceptor nextInterceptor, AddOperationContext opContext )
         throws Exception
     {
-    	LdapDN name = opContext.getDn();
-    	
+        LdapDN name = opContext.getDn();
+        
         if ( subschemSubentryDn.getNormName().equals( name.getNormName() ) )
         {
             throw new LdapNameAlreadyBoundException( 
@@ -162,13 +162,13 @@
         
         synchronized( notAliasCache )
         {
-        	notAnAlias = notAliasCache.containsKey( parentDn.getNormName() );
+            notAnAlias = notAliasCache.containsKey( parentDn.getNormName() );
         }
         
         if ( ! notAnAlias )
         {
-        	// We don't know if the parent is an alias or not, so we will launch a 
-        	// lookup, and update the cache if it's not an alias
+            // We don't know if the parent is an alias or not, so we will launch a 
+            // lookup, and update the cache if it's not an alias
             ServerEntry attrs;
             
             try
@@ -196,10 +196,10 @@
             }
             else
             {
-            	synchronized ( notAliasCache )
-            	{
-            		notAliasCache.put( parentDn.getNormName(), parentDn );
-            	}
+                synchronized ( notAliasCache )
+                {
+                    notAliasCache.put( parentDn.getNormName(), parentDn );
+                }
             }
         }
 
@@ -213,8 +213,8 @@
      */
     public void delete( NextInterceptor nextInterceptor, DeleteOperationContext opContext ) throws Exception
     {
-    	LdapDN name = opContext.getDn();
-    	
+        LdapDN name = opContext.getDn();
+        
         if ( name.getNormName().equalsIgnoreCase( subschemSubentryDn.getNormName() ) )
         {
             throw new LdapOperationNotSupportedException( 
@@ -247,10 +247,10 @@
 
         synchronized( notAliasCache )
         {
-        	if ( notAliasCache.containsKey( name.getNormName() ) )
-        	{
-        		notAliasCache.remove( name.getNormName() );
-        	}
+            if ( notAliasCache.containsKey( name.getNormName() ) )
+            {
+                notAliasCache.remove( name.getNormName() );
+            }
         }
         
         nextInterceptor.delete( opContext );
@@ -344,10 +344,10 @@
         // it would also be more complex.
         synchronized( notAliasCache )
         {
-        	if ( notAliasCache.containsKey( opContext.getDn().getNormName() ) )
-        	{
-        		notAliasCache.remove( opContext.getDn().getNormName() );
-        	}
+            if ( notAliasCache.containsKey( opContext.getDn().getNormName() ) )
+            {
+                notAliasCache.remove( opContext.getDn().getNormName() );
+            }
         }
 
         nextInterceptor.modify( opContext );
@@ -390,10 +390,10 @@
         // Remove the previous entry from the notAnAlias cache
         synchronized( notAliasCache )
         {
-        	if ( notAliasCache.containsKey( dn.getNormName() ) )
-        	{
-        		notAliasCache.remove( dn.getNormName() );
-        	}
+            if ( notAliasCache.containsKey( dn.getNormName() ) )
+            {
+                notAliasCache.remove( dn.getNormName() );
+            }
         }
 
         nextInterceptor.rename( opContext );
@@ -446,10 +446,10 @@
         // Remove the original entry from the NotAlias cache, if needed
         synchronized( notAliasCache )
         {
-        	if ( notAliasCache.containsKey( oriChildName.getNormName() ) )
-        	{
-        		notAliasCache.remove( oriChildName.getNormName() );
-        	}
+            if ( notAliasCache.containsKey( oriChildName.getNormName() ) )
+            {
+                notAliasCache.remove( oriChildName.getNormName() );
+            }
         }
                 
         nextInterceptor.move( opContext );
@@ -500,10 +500,10 @@
         // Remove the original entry from the NotAlias cache, if needed
         synchronized( notAliasCache )
         {
-        	if ( notAliasCache.containsKey( oriChildName.getNormName() ) )
-        	{
-        		notAliasCache.remove( oriChildName.getNormName() );
-        	}
+            if ( notAliasCache.containsKey( oriChildName.getNormName() ) )
+            {
+                notAliasCache.remove( oriChildName.getNormName() );
+            }
         }
         
         nextInterceptor.moveAndRename( opContext );
@@ -521,16 +521,16 @@
         {
             EntryFilteringCursor cursor =  nextInterceptor.search( opContext );
 	        
-	        if ( ! cursor.next() )
-	        {
-	            if ( !base.isEmpty() && !( subschemSubentryDn.toNormName() ).equalsIgnoreCase( base.toNormName() ) )
-	            {
-	                // We just check that the entry exists only if we didn't found any entry
-	                assertHasEntry( nextInterceptor, opContext, "Attempt to search under non-existant entry:" , base );
-	            }
-	        }
+            if ( ! cursor.next() )
+            {
+                if ( !base.isEmpty() && !( subschemSubentryDn.toNormName() ).equalsIgnoreCase( base.toNormName() ) )
+                {
+                    // We just check that the entry exists only if we didn't found any entry
+                    assertHasEntry( nextInterceptor, opContext, "Attempt to search under non-existant entry:" , base );
+                }
+            }
 
-	        return cursor;
+            return cursor;
         }
         catch ( Exception ne )
         {

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/CompareOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/CompareOperationContext.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/CompareOperationContext.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/CompareOperationContext.java Sat Jun  7 00:48:16 2008
@@ -104,39 +104,39 @@
     /**
      * @return The compared OID
      */
-	public String getOid() 
-	{
-		return oid;
-	}
+    public String getOid() 
+    {
+        return oid;
+    }
 
 	
-	/**
-	 * Set the compared OID
-	 * @param oid The compared OID
-	 */
-	public void setOid( String  oid ) 
-	{
-		this.oid = oid;
-	}
+    /**
+     * Set the compared OID
+     * @param oid The compared OID
+     */
+    public void setOid( String  oid ) 
+    {
+        this.oid = oid;
+    }
 
 	
-	/**
-	 * @return The value to compare
-	 */
-	public Object getValue() 
-	{
-		return value;
-	}
+    /**
+     * @return The value to compare
+     */
+    public Object getValue() 
+    {
+        return value;
+    }
 
 	
-	/**
-	 * Set the value to compare
-	 * @param value The value to compare
-	 */
-	public void setValue( Object value ) 
-	{
-		this.value = value;
-	}
+    /**
+     * Set the value to compare
+     * @param value The value to compare
+     */
+    public void setValue( Object value ) 
+    {
+        this.value = value;
+    }
 
 
     /**
@@ -148,20 +148,20 @@
     }
 
     
-	/**
+    /**
      * @see Object#toString()
      */
     public String toString()
     {
         return "CompareContext for DN '" + getDn().getUpName() + "'" + 
-        	( ( oid != null ) ? ", oid : <" + oid + ">" : "" ) +
-        	( ( value != null ) ? ", value :'" +
-        			( ( value instanceof String ) ?
-        					value :
-        					( ( value instanceof byte[] ) ?
-        							StringTools.dumpBytes( (byte[])value ) : 
-        								"unknown value type" ) )
-        				+ "'"
-        			: "" );
+            ( ( oid != null ) ? ", oid : <" + oid + ">" : "" ) +
+            ( ( value != null ) ? ", value :'" +
+                    ( ( value instanceof String ) ?
+                            value :
+                            ( ( value instanceof byte[] ) ?
+                                    StringTools.dumpBytes( (byte[])value ) : 
+                                        "unknown value type" ) )
+                        + "'"
+                    : "" );
     }
 }

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/RenameOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/RenameOperationContext.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/RenameOperationContext.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/RenameOperationContext.java Sat Jun  7 00:48:16 2008
@@ -71,39 +71,39 @@
     /**
      * @return The delete old DN flag
      */
-	public boolean getDelOldDn() 
-	{
-		return delOldDn;
-	}
+    public boolean getDelOldDn() 
+    {
+        return delOldDn;
+    }
 
 
     /**
-	 * Set the flag to delete the old DN
-	 * @param delOldDn the flag to set
-	 */
-	public void setDelOldDn( boolean delOldDn ) 
-	{
-		this.delOldDn = delOldDn;
-	}
+     * Set the flag to delete the old DN
+     * @param delOldDn the flag to set
+     */
+    public void setDelOldDn( boolean delOldDn ) 
+    {
+        this.delOldDn = delOldDn;
+    }
 
 
     /**
-	 * @return The new RDN
-	 */
-	public Rdn getNewRdn()
-	{
-		return newRdn;
-	}
+     * @return The new RDN
+     */
+    public Rdn getNewRdn()
+    {
+        return newRdn;
+    }
 
 
     /**
-	 * Set the new RDN
-	 * @param newRdn The new RDN
-	 */
-	public void setNewRdn( Rdn newRdn )
-	{
-		this.newRdn = newRdn;
-	}
+     * Set the new RDN
+     * @param newRdn The new RDN
+     */
+    public void setNewRdn( Rdn newRdn )
+    {
+        this.newRdn = newRdn;
+    }
 
 
     /**

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java Sat Jun  7 00:48:16 2008
@@ -173,10 +173,10 @@
          * objectClass: javaSerializedObject
          */
         entry.put( SchemaConstants.OBJECT_CLASS_AT,
-        		SchemaConstants.TOP_OC,
-        		JOBJECT_ATTR,
-        		JCONTAINER_ATTR,
-        		JSERIALIZEDOBJ_ATTR );
+                SchemaConstants.TOP_OC,
+                JOBJECT_ATTR,
+                JCONTAINER_ATTR,
+                JSERIALIZEDOBJ_ATTR );
 
         // Add the javaClassName and javaSerializedData attributes
         entry.put( JCLASSNAME_ATTR, obj.getClass().getName() );

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/normalization/ExpandingVisitor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/normalization/ExpandingVisitor.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/normalization/ExpandingVisitor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/normalization/ExpandingVisitor.java Sat Jun  7 00:48:16 2008
@@ -52,6 +52,12 @@
     private final AttributeTypeRegistry attrRegistry;
 
 
+    /**
+     * 
+     * Creates a new instance of ExpandingVisitor.
+     *
+     * @param attrRegistry The AttributeType registry
+     */
     public ExpandingVisitor( AttributeTypeRegistry attrRegistry )
     {
         this.attrRegistry = attrRegistry;

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/normalization/NormalizingVisitor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/normalization/NormalizingVisitor.java?rev=664295&r1=664294&r2=664295&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/normalization/NormalizingVisitor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/normalization/NormalizingVisitor.java Sat Jun  7 00:48:16 2008
@@ -20,6 +20,11 @@
 package org.apache.directory.server.core.normalization;
 
 
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.naming.NamingException;
+
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientBinaryValue;
@@ -41,11 +46,6 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.naming.NamingException;
-
-import java.util.ArrayList;
-import java.util.List;
-
 
 /**
  * A filter visitor which normalizes leaf node values as it visits them.  It also removes
@@ -67,7 +67,7 @@
 public class NormalizingVisitor implements FilterVisitor
 {
     /** logger used by this class */
-    private final static Logger log = LoggerFactory.getLogger( NormalizingVisitor.class );
+    private static final Logger log = LoggerFactory.getLogger( NormalizingVisitor.class );
 
     /** the name component normalizer used by this visitor */
     private final NameComponentNormalizer ncn;
@@ -76,6 +76,13 @@
     private final Registries registries;
 
 
+    /**
+     * 
+     * Creates a new instance of NormalizingVisitor.
+     *
+     * @param ncn The name component normalizer to use
+     * @param registries The global registries
+     */
     public NormalizingVisitor( NameComponentNormalizer ncn, Registries registries )
     {
         this.ncn = ncn;
@@ -85,13 +92,16 @@
 
     /**
      * A private method used to normalize a value
-     * @return
+     * 
+     * @param attribute The attribute's ID
+     * @param value The value to normalize
+     * @return the normalized value
      */
     private Value<?> normalizeValue( String attribute, Value<?> value )
     {
         try
         {
-            Value<?> normalized;
+            Value<?> normalized = null;
 
             AttributeType attributeType = registries.getAttributeTypeRegistry().lookup( attribute );
 
@@ -137,6 +147,9 @@
     /**
      * Visit a PresenceNode. If the attribute exists, the node is returned, otherwise
      * null is returned.
+     * 
+     * @param node the node to visit
+     * @return The visited node
      */
     private ExprNode visitPresenceNode( PresenceNode node )
     {
@@ -160,6 +173,9 @@
      *  - EqualityNode
      *  - GreaterEqNode
      *  - LesserEqNode
+     *  
+     * @param node the node to visit
+     * @return the visited node
      */
     private ExprNode visitSimpleNode( SimpleNode node )
     {
@@ -196,6 +212,9 @@
      * null is returned. 
      * 
      * Normalizing substring value is pretty complex. It's not currently implemented...
+     * 
+     * @param node the node to visit
+     * @return the visited node
      */
     private ExprNode visitSubstringNode( SubstringNode node )
     {
@@ -291,6 +310,9 @@
      * null is returned. 
      * 
      * TODO implement the logic for ExtensibleNode
+     * 
+     * @param node the node to visit
+     * @return the visited node
      */
     private ExprNode visitExtensibleNode( ExtensibleNode node )
     {
@@ -312,6 +334,9 @@
      *  - AndNode
      *  - NotNode
      *  - OrNode
+     *  
+     * @param node the node to visit
+     * @return the visited node
      */
     private ExprNode visitBranchNode( BranchNode node )
     {
@@ -346,7 +371,7 @@
         else
         {
             // Manage AND and OR nodes.
-            BranchNode branchNode = ( BranchNode ) node;
+            BranchNode branchNode = node;
             List<ExprNode> children = node.getChildren();
 
             // For AND and OR, we may have more than one children.
@@ -409,6 +434,9 @@
      * 
      * The PresencNode is managed differently from other nodes, as it just check
      * for the attribute, not the value.
+     * 
+     * @param node the node to visit
+     * @return the visited node
      */
     public Object visit( ExprNode node )
     {