directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1235364 [20/27] - in /directory/shared/trunk: asn1/api/src/main/java/org/apache/directory/shared/asn1/util/ asn1/api/src/test/java/org/apache/directory/shared/asn1/util/ asn1/ber/src/main/java/org/apache/directory/shared/asn1/actions/ asn1...
Date Tue, 24 Jan 2012 17:27:12 GMT
Modified: directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java Tue Jan 24 17:27:00 2012
@@ -55,14 +55,20 @@ public class PSearchControlTest extends 
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x0B );
         bb.put( new byte[]
-            { 
-                0x30, 0x09,           // PersistentSearch ::= SEQUENCE {
-                  0x02, 0x01, 0x01,   // changeTypes INTEGER,
-                  0x01, 0x01, 0x00,   // changesOnly BOOLEAN,
-                  0x01, 0x01, 0x00    // returnECs BOOLEAN
-            } );
+            {
+                0x30, 0x09, // PersistentSearch ::= SEQUENCE {
+                0x02,
+                0x01,
+                0x01, // changeTypes INTEGER,
+                0x01,
+                0x01,
+                0x00, // changesOnly BOOLEAN,
+                0x01,
+                0x01,
+                0x00 // returnECs BOOLEAN
+        } );
 
-        String expected = Strings.dumpBytes(bb.array());
+        String expected = Strings.dumpBytes( bb.array() );
         bb.flip();
 
         PersistentSearchDecorator decorator = new PersistentSearchDecorator( codec );
@@ -70,11 +76,12 @@ public class PSearchControlTest extends 
         ctrl.setChangesOnly( false );
         ctrl.setReturnECs( false );
         ctrl.setChangeTypes( 1 );
-        bb = decorator.encode(ByteBuffer.allocate( decorator.computeLength() ) );
-        String decoded = Strings.dumpBytes(bb.array());
+        bb = decorator.encode( ByteBuffer.allocate( decorator.computeLength() ) );
+        String decoded = Strings.dumpBytes( bb.array() );
         assertEquals( expected, decoded );
     }
 
+
     /**
      * Test the decoding of a PSearchControl with combined changes types
      */
@@ -83,17 +90,23 @@ public class PSearchControlTest extends 
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x0b );
         bb.put( new byte[]
-            { 
-            0x30, 0x09,         // PersistentSearch ::= SEQUENCE {
-              0x02, 0x01, 0x09, // changeTypes INTEGER,
-              0x01, 0x01, 0x00, // changesOnly BOOLEAN,
-              0x01, 0x01, 0x00  // returnECs BOOLEAN
-            } );
+            {
+                0x30, 0x09, // PersistentSearch ::= SEQUENCE {
+                0x02,
+                0x01,
+                0x09, // changeTypes INTEGER,
+                0x01,
+                0x01,
+                0x00, // changesOnly BOOLEAN,
+                0x01,
+                0x01,
+                0x00 // returnECs BOOLEAN
+        } );
         bb.flip();
 
         PersistentSearchDecorator decorator = new PersistentSearchDecorator( codec );
 
-        PersistentSearch ctrl = ( PersistentSearch )decorator.decode( bb.array() );
+        PersistentSearch ctrl = ( PersistentSearch ) decorator.decode( bb.array() );
 
         int changeTypes = ctrl.getChangeTypes();
         assertTrue( ChangeType.ADD.presentIn( changeTypes ) );
@@ -102,22 +115,28 @@ public class PSearchControlTest extends 
         assertEquals( false, ctrl.isReturnECs() );
     }
 
-    
+
     /**
      * Test the decoding of a PSearchControl with a changes types which
      * value is 0
      */
-    @Test( expected=DecoderException.class )
+    @Test(expected = DecoderException.class)
     public void testDecodeModifyDNRequestSuccessChangeTypes0() throws Exception
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x0b );
         bb.put( new byte[]
-            { 
-            0x30, 0x09,         // PersistentSearch ::= SEQUENCE {
-              0x02, 0x01, 0x00, // changeTypes INTEGER,
-              0x01, 0x01, 0x00, // changesOnly BOOLEAN,
-              0x01, 0x01, 0x00  // returnECs BOOLEAN
-            } );
+            {
+                0x30, 0x09, // PersistentSearch ::= SEQUENCE {
+                0x02,
+                0x01,
+                0x00, // changeTypes INTEGER,
+                0x01,
+                0x01,
+                0x00, // changesOnly BOOLEAN,
+                0x01,
+                0x01,
+                0x00 // returnECs BOOLEAN
+        } );
         bb.flip();
 
         PersistentSearchDecorator decorator = new PersistentSearchDecorator( codec );
@@ -125,21 +144,28 @@ public class PSearchControlTest extends 
         decorator.decode( bb.array() );
     }
 
+
     /**
      * Test the decoding of a PSearchControl with a changes types which
      * value is above 15
      */
-    @Test( expected=DecoderException.class )
+    @Test(expected = DecoderException.class)
     public void testDecodeModifyDNRequestSuccessChangeTypes22() throws Exception
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x0b );
         bb.put( new byte[]
-            { 
-            0x30, 0x09,         // PersistentSearch ::= SEQUENCE {
-              0x02, 0x01, 0x22, // changeTypes INTEGER,
-              0x01, 0x01, 0x00, // changesOnly BOOLEAN,
-              0x01, 0x01, 0x00  // returnECs BOOLEAN
-            } );
+            {
+                0x30, 0x09, // PersistentSearch ::= SEQUENCE {
+                0x02,
+                0x01,
+                0x22, // changeTypes INTEGER,
+                0x01,
+                0x01,
+                0x00, // changesOnly BOOLEAN,
+                0x01,
+                0x01,
+                0x00 // returnECs BOOLEAN
+        } );
         bb.flip();
 
         PersistentSearchDecorator decorator = new PersistentSearchDecorator( codec );
@@ -147,17 +173,17 @@ public class PSearchControlTest extends 
         decorator.decode( bb.array() );
     }
 
-    
+
     /**
      * Test the decoding of a PSearchControl with a null sequence
      */
-    @Test( expected=DecoderException.class )
+    @Test(expected = DecoderException.class)
     public void testDecodeModifyDNRequestSuccessNullSequence() throws Exception
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x02 );
         bb.put( new byte[]
-            { 
-            0x30, 0x00,         // PersistentSearch ::= SEQUENCE {
+            {
+                0x30, 0x00, // PersistentSearch ::= SEQUENCE {
             } );
         bb.flip();
 
@@ -166,20 +192,24 @@ public class PSearchControlTest extends 
         decorator.decode( bb.array() );
     }
 
-    
+
     /**
      * Test the decoding of a PSearchControl without changeTypes
      */
-    @Test( expected=DecoderException.class )
+    @Test(expected = DecoderException.class)
     public void testDecodeModifyDNRequestSuccessWithoutChangeTypes() throws Exception
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x08 );
         bb.put( new byte[]
-            { 
-            0x30, 0x06,         // PersistentSearch ::= SEQUENCE {
-              0x01, 0x01, 0x00, // changesOnly BOOLEAN,
-              0x01, 0x01, 0x00  // returnECs BOOLEAN
-            } );
+            {
+                0x30, 0x06, // PersistentSearch ::= SEQUENCE {
+                0x01,
+                0x01,
+                0x00, // changesOnly BOOLEAN,
+                0x01,
+                0x01,
+                0x00 // returnECs BOOLEAN
+        } );
         bb.flip();
 
         PersistentSearchDecorator decorator = new PersistentSearchDecorator( codec );
@@ -187,20 +217,24 @@ public class PSearchControlTest extends 
         decorator.decode( bb.array() );
     }
 
-    
+
     /**
      * Test the decoding of a PSearchControl without changeOnly
      */
-    @Test( expected=DecoderException.class )
+    @Test(expected = DecoderException.class)
     public void testDecodeModifyDNRequestSuccessWithoutChangesOnly() throws Exception
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x08 );
         bb.put( new byte[]
-            { 
-            0x30, 0x06,         // PersistentSearch ::= SEQUENCE {
-              0x02, 0x01, 0x01, // changeTypes INTEGER,
-              0x01, 0x01, 0x00  // returnECs BOOLEAN
-            } );
+            {
+                0x30, 0x06, // PersistentSearch ::= SEQUENCE {
+                0x02,
+                0x01,
+                0x01, // changeTypes INTEGER,
+                0x01,
+                0x01,
+                0x00 // returnECs BOOLEAN
+        } );
         bb.flip();
 
         PersistentSearchDecorator decorator = new PersistentSearchDecorator( codec );
@@ -208,19 +242,23 @@ public class PSearchControlTest extends 
         decorator.decode( bb.array() );
     }
 
-    
+
     /**
      * Test the decoding of a PSearchControl without returnECs
      */
-    @Test( expected=DecoderException.class )
+    @Test(expected = DecoderException.class)
     public void testDecodeModifyDNRequestSuccessWithoutReturnECs() throws Exception
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x08 );
         bb.put( new byte[]
-            { 
-            0x30, 0x06,         // PersistentSearch ::= SEQUENCE {
-              0x02, 0x01, 0x01, // changeTypes INTEGER,
-              0x01, 0x01, 0x00, // changesOnly BOOLEAN,
+            {
+                0x30, 0x06, // PersistentSearch ::= SEQUENCE {
+                0x02,
+                0x01,
+                0x01, // changeTypes INTEGER,
+                0x01,
+                0x01,
+                0x00, // changesOnly BOOLEAN,
             } );
         bb.flip();
 

Modified: directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PagedSearchControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PagedSearchControlTest.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PagedSearchControlTest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PagedSearchControlTest.java Tue Jan 24 17:27:00 2012
@@ -55,93 +55,107 @@ public class PagedSearchControlTest exte
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x0B );
         bb.put( new byte[]
-            { 
-                0x30, 0x09,                        // realSearchControlValue ::= SEQUENCE {
-                  0x02, 0x01, 0x20,                // size INTEGER,
-                  0x04, 0x04, 't', 'e', 's', 't'   // cookie OCTET STRING,
-            } );
+            {
+                0x30, 0x09, // realSearchControlValue ::= SEQUENCE {
+                0x02,
+                0x01,
+                0x20, // size INTEGER,
+                0x04,
+                0x04,
+                't',
+                'e',
+                's',
+                't' // cookie OCTET STRING,
+        } );
         bb.flip();
 
         PagedResultsDecorator decorator = new PagedResultsDecorator( codec );
-        
-        PagedResults pagedSearch = (PagedResults)decorator.decode( bb.array() );
+
+        PagedResults pagedSearch = ( PagedResults ) decorator.decode( bb.array() );
 
         assertEquals( 32, pagedSearch.getSize() );
-        assertTrue( Arrays.equals( Strings.getBytesUtf8("test"),
+        assertTrue( Arrays.equals( Strings.getBytesUtf8( "test" ),
             pagedSearch.getCookie() ) );
-            
+
         bb.flip();
 
         PagedResultsDecorator ctrl = new PagedResultsDecorator( codec );
         ctrl.setSize( 32 );
-        ctrl.setCookie( Strings.getBytesUtf8("test") );
+        ctrl.setCookie( Strings.getBytesUtf8( "test" ) );
 
         ByteBuffer buffer = ctrl.encode( ByteBuffer.allocate( ctrl.computeLength() ) );
         String decoded = Strings.dumpBytes( buffer.array() );
         String expected = Strings.dumpBytes( bb.array() );
         assertEquals( expected, decoded );
     }
-    
-    
+
+
     /**
      * Test the decoding of a PagedSearchControl with no cookie
      */
-    @Test( expected=DecoderException.class )
+    @Test(expected = DecoderException.class)
     public void testDecodePagedSearchRequestNoCookie() throws Exception
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x05 );
         bb.put( new byte[]
-            { 
-            0x30, 0x03,         // realSearchControlValue ::= SEQUENCE {
-              0x02, 0x01, 0x20  // size INTEGER,
-            } );
+            {
+                0x30, 0x03, // realSearchControlValue ::= SEQUENCE {
+                0x02,
+                0x01,
+                0x20 // size INTEGER,
+        } );
         bb.flip();
 
         PagedResultsDecorator decorator = new PagedResultsDecorator( codec );
-        
+
         decorator.decode( bb.array() );
     }
-    
-    
+
+
     /**
      * Test the decoding of a PagedSearchControl with no size
      */
-    @Test( expected=DecoderException.class )
+    @Test(expected = DecoderException.class)
     public void testDecodePagedSearchRequestNoSize() throws Exception
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x08 );
         bb.put( new byte[]
-            { 
-            0x30, 0x06,                       // realSearchControlValue ::= SEQUENCE {
-              0x04, 0x04, 't', 'e', 's', 't'  // cookie OCTET STRING,
-            } );
+            {
+                0x30, 0x06, // realSearchControlValue ::= SEQUENCE {
+                0x04,
+                0x04,
+                't',
+                'e',
+                's',
+                't' // cookie OCTET STRING,
+        } );
         bb.flip();
 
         PagedResultsDecorator decorator = new PagedResultsDecorator( codec );
-        
+
         decorator.decode( bb.array() );
     }
-    
-    
+
+
     /**
      * Test the decoding of a PagedSearchControl with no size  and no cookie
      */
-    @Test( expected=DecoderException.class )
+    @Test(expected = DecoderException.class)
     public void testDecodePagedSearchRequestNoSizeNoCookie() throws Exception
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x02 );
         bb.put( new byte[]
-            { 
-            0x30, 0x00,         // realSearchControlValue ::= SEQUENCE 
+            {
+                0x30, 0x00, // realSearchControlValue ::= SEQUENCE 
             } );
         bb.flip();
 
         PagedResultsDecorator decorator = new PagedResultsDecorator( codec );
-        
+
         decorator.decode( bb.array() );
     }
-    
-    
+
+
     /**
      * Test encoding of a PagedSearchControl with a negative size
      */
@@ -150,56 +164,68 @@ public class PagedSearchControlTest exte
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x0b );
         bb.put( new byte[]
-            { 
-              0x30, 0x09,                        // realSearchControlValue ::= SEQUENCE {
-                0x02, 0x01, (byte)0xFF,          // size INTEGER,
-                0x04, 0x04, 't', 'e', 's', 't'   // cookie OCTET STRING,
-            } );
+            {
+                0x30, 0x09, // realSearchControlValue ::= SEQUENCE {
+                0x02,
+                0x01,
+                ( byte ) 0xFF, // size INTEGER,
+                0x04,
+                0x04,
+                't',
+                'e',
+                's',
+                't' // cookie OCTET STRING,
+        } );
         bb.flip();
 
         PagedResultsDecorator decorator = new PagedResultsDecorator( codec );
-        
-        PagedResults pagedSearch = (PagedResults)decorator.decode( bb.array() );
+
+        PagedResults pagedSearch = ( PagedResults ) decorator.decode( bb.array() );
 
         assertEquals( Integer.MAX_VALUE, pagedSearch.getSize() );
-        assertTrue( Arrays.equals( Strings.getBytesUtf8("test"),
+        assertTrue( Arrays.equals( Strings.getBytesUtf8( "test" ),
             pagedSearch.getCookie() ) );
-            
-        bb.flip();
 
+        bb.flip();
 
         PagedResultsDecorator ctrl = new PagedResultsDecorator( codec );
         ctrl.setSize( -1 );
-        ctrl.setCookie( Strings.getBytesUtf8("test") );
+        ctrl.setCookie( Strings.getBytesUtf8( "test" ) );
 
         ByteBuffer buffer = ctrl.encode( ByteBuffer.allocate( ctrl.computeLength() ) );
         String decoded = Strings.dumpBytes( buffer.array() );
         String expected = Strings.dumpBytes( bb.array() );
         assertEquals( expected, decoded );
     }
-    
-    
+
+
     /**
      * Test encoding of a PagedSearchControl with a empty size
      */
-    @Test( expected=DecoderException.class )
+    @Test(expected = DecoderException.class)
     public void testEncodePagedSearchControlEmptySize() throws Exception
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x0a );
         bb.put( new byte[]
-            { 
-              0x30, 0x08,                        // realSearchControlValue ::= SEQUENCE {
-                0x02, 0x00,                      // size INTEGER,
-                0x04, 0x04, 't', 'e', 's', 't'   // cookie OCTET STRING,
-            } );
+            {
+                0x30, 0x08, // realSearchControlValue ::= SEQUENCE {
+                0x02,
+                0x00, // size INTEGER,
+                0x04,
+                0x04,
+                't',
+                'e',
+                's',
+                't' // cookie OCTET STRING,
+        } );
         bb.flip();
 
         PagedResultsDecorator decorator = new PagedResultsDecorator( codec );
-        
+
         decorator.decode( bb.array() );
     }
-    
-    
+
+
     /**
      * Test encoding of a PagedSearchControl with a empty cookie
      */
@@ -208,20 +234,23 @@ public class PagedSearchControlTest exte
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x07 );
         bb.put( new byte[]
-            { 
-              0x30, 0x05,           // realSearchControlValue ::= SEQUENCE {
-                0x02, 0x01, 0x20,   // size INTEGER,
-                0x04, 0x00          // cookie OCTET STRING,
-            } );
+            {
+                0x30, 0x05, // realSearchControlValue ::= SEQUENCE {
+                0x02,
+                0x01,
+                0x20, // size INTEGER,
+                0x04,
+                0x00 // cookie OCTET STRING,
+        } );
         bb.flip();
 
         PagedResultsDecorator decorator = new PagedResultsDecorator( codec );
-        
-        PagedResults pagedSearch = (PagedResults)decorator.decode( bb.array() );
+
+        PagedResults pagedSearch = ( PagedResults ) decorator.decode( bb.array() );
 
         assertEquals( 32, pagedSearch.getSize() );
         assertNull( pagedSearch.getCookie() );
-            
+
         PagedResultsDecorator ctrl = new PagedResultsDecorator( codec );
         ctrl.setSize( 32 );
         ctrl.setCookie( null );

Modified: directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlTest.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlTest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlTest.java Tue Jan 24 17:27:00 2012
@@ -56,17 +56,17 @@ public class SubEntryControlTest extends
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x03 );
         bb.put( new byte[]
-            { 
-              0x01, 0x01, ( byte ) 0xFF // Visibility ::= BOOLEAN
-            } );
+            {
+                0x01, 0x01, ( byte ) 0xFF // Visibility ::= BOOLEAN
+        } );
         bb.flip();
 
         SubentriesDecorator decorator = new SubentriesDecorator( codec );
-        
-        Subentries subentries = (Subentries)decorator.decode( bb.array() );
+
+        Subentries subentries = ( Subentries ) decorator.decode( bb.array() );
 
         assertTrue( subentries.isVisible() );
-        
+
         // test encoding
         try
         {
@@ -75,7 +75,7 @@ public class SubEntryControlTest extends
             String decoded = Strings.dumpBytes( buffer.array() );
             assertEquals( expected, decoded );
         }
-        catch( EncoderException e )
+        catch ( EncoderException e )
         {
             fail( e.getMessage() );
         }
@@ -90,17 +90,17 @@ public class SubEntryControlTest extends
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x03 );
         bb.put( new byte[]
-            { 
-              0x01, 0x01, 0x00 // Visibility ::= BOOLEAN
-            } );
+            {
+                0x01, 0x01, 0x00 // Visibility ::= BOOLEAN
+        } );
         bb.flip();
 
         SubentriesDecorator decorator = new SubentriesDecorator( codec );
-        
-        Subentries subentries = (Subentries)decorator.decode( bb.array() );
+
+        Subentries subentries = ( Subentries ) decorator.decode( bb.array() );
 
         assertFalse( subentries.isVisible() );
-        
+
         // test encoding
         try
         {
@@ -109,7 +109,7 @@ public class SubEntryControlTest extends
             String decoded = Strings.dumpBytes( buffer.array() );
             assertEquals( expected, decoded );
         }
-        catch( EncoderException e )
+        catch ( EncoderException e )
         {
             fail( e.getMessage() );
         }
@@ -119,21 +119,21 @@ public class SubEntryControlTest extends
     /**
      * Test the decoding of a SubEntryControl with an empty visibility
      */
-    @Test( expected=DecoderException.class )
+    @Test(expected = DecoderException.class)
     public void testDecodeSubEntryEmptyVisibility() throws Exception
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x02 );
 
         bb.put( new byte[]
-            { 
-              0x01, 0x00 // Visibility ::= BOOLEAN
-            } );
+            {
+                0x01, 0x00 // Visibility ::= BOOLEAN
+        } );
 
         bb.flip();
 
         // Allocate a LdapMessage Container
         SubentriesDecorator decorator = new SubentriesDecorator( codec );
-        
+
         decorator.decode( bb.array() );
     }
 
@@ -141,21 +141,21 @@ public class SubEntryControlTest extends
     /**
      * Test the decoding of a bad SubEntryControl
      */
-    @Test( expected=DecoderException.class )
+    @Test(expected = DecoderException.class)
     public void testDecodeSubEntryBad() throws Exception
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x03 );
 
         bb.put( new byte[]
-            { 
-              0x02, 0x01, 0x01 // Visibility ::= BOOLEAN
-            } );
+            {
+                0x02, 0x01, 0x01 // Visibility ::= BOOLEAN
+        } );
 
         bb.flip();
 
         // Allocate a LdapMessage Container
         SubentriesDecorator decorator = new SubentriesDecorator( codec );
-        
+
         decorator.decode( bb.array() );
     }
 }

Modified: directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java Tue Jan 24 17:27:00 2012
@@ -63,16 +63,20 @@ public class UnBindRequestTest extends A
         ByteBuffer stream = ByteBuffer.allocate( 0x07 );
         stream.put( new byte[]
             { 0x30, 0x05, // LDAPMessage ::=SEQUENCE {
-                0x02, 0x01, 0x01, // messageID MessageID
-                0x42, 0x00, // CHOICE { ..., unbindRequest UnbindRequest,...
+                0x02,
+                0x01,
+                0x01, // messageID MessageID
+                0x42,
+                0x00, // CHOICE { ..., unbindRequest UnbindRequest,...
             // UnbindRequest ::= [APPLICATION 2] NULL
-            } );
+        } );
 
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        String decodedPdu = Strings.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<UnbindRequestDecorator> ldapMessageContainer = new LdapMessageContainer<UnbindRequestDecorator>( codec );
+        LdapMessageContainer<UnbindRequestDecorator> ldapMessageContainer = new LdapMessageContainer<UnbindRequestDecorator>(
+            codec );
 
         try
         {
@@ -99,7 +103,7 @@ public class UnBindRequestTest extends A
             // Check the length
             assertEquals( 0x07, bb.limit() );
 
-            String encodedPdu = Strings.dumpBytes(bb.array());
+            String encodedPdu = Strings.dumpBytes( bb.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -123,21 +127,48 @@ public class UnBindRequestTest extends A
         stream.put( new byte[]
             { 0x30,
                 0x22, // LDAPMessage ::=SEQUENCE {
-                0x02, 0x01,
+                0x02,
+                0x01,
                 0x01, // messageID MessageID
                 0x42,
                 0x00, // CHOICE { ..., unbindRequest UnbindRequest,...
                 // UnbindRequest ::= [APPLICATION 2] NULL
                 ( byte ) 0xA0,
                 0x1B, // A control
-                0x30, 0x19, 0x04, 0x17, '2', '.', '1', '6', '.', '8', '4', '0', '.', '1', '.', '1', '1', '3', '7', '3',
-                '0', '.', '3', '.', '4', '.', '2' } );
+                0x30,
+                0x19,
+                0x04,
+                0x17,
+                '2',
+                '.',
+                '1',
+                '6',
+                '.',
+                '8',
+                '4',
+                '0',
+                '.',
+                '1',
+                '.',
+                '1',
+                '1',
+                '3',
+                '7',
+                '3',
+                '0',
+                '.',
+                '3',
+                '.',
+                '4',
+                '.',
+                '2' } );
 
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        String decodedPdu = Strings.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a BindRequest Container
-        LdapMessageContainer<UnbindRequestDecorator> ldapMessageContainer = new LdapMessageContainer<UnbindRequestDecorator>( codec );
+        LdapMessageContainer<UnbindRequestDecorator> ldapMessageContainer = new LdapMessageContainer<UnbindRequestDecorator>(
+            codec );
 
         try
         {
@@ -159,9 +190,10 @@ public class UnBindRequestTest extends A
         assertEquals( 1, controls.size() );
 
         @SuppressWarnings("unchecked")
-        CodecControl<Control> control = (org.apache.directory.shared.ldap.codec.api.CodecControl<Control> ) controls.get( "2.16.840.1.113730.3.4.2" );
+        CodecControl<Control> control = ( org.apache.directory.shared.ldap.codec.api.CodecControl<Control> ) controls
+            .get( "2.16.840.1.113730.3.4.2" );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getOid() );
-        assertEquals( "", Strings.dumpBytes((byte[]) control.getValue()) );
+        assertEquals( "", Strings.dumpBytes( ( byte[] ) control.getValue() ) );
 
         // Check the encoding
         UnbindRequest internalUnbindRequest = new UnbindRequestImpl();
@@ -175,7 +207,7 @@ public class UnBindRequestTest extends A
             // Check the length
             assertEquals( 0x24, bb.limit() );
 
-            String encodedPdu = Strings.dumpBytes(bb.array());
+            String encodedPdu = Strings.dumpBytes( bb.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -198,16 +230,21 @@ public class UnBindRequestTest extends A
         ByteBuffer stream = ByteBuffer.allocate( 0x09 );
         stream.put( new byte[]
             { 0x30, 0x07, // LDAPMessage ::=SEQUENCE {
-                0x02, 0x01, 0x01, // messageID MessageID
-                0x42, 0x02, // CHOICE { ..., unbindRequest UnbindRequest,...
-                0x04, 0x00 // UnbindRequest ::= [APPLICATION 2] NULL
+                0x02,
+                0x01,
+                0x01, // messageID MessageID
+                0x42,
+                0x02, // CHOICE { ..., unbindRequest UnbindRequest,...
+                0x04,
+                0x00 // UnbindRequest ::= [APPLICATION 2] NULL
 
-            } );
+        } );
 
         stream.flip();
 
         // Allocate a LdapMessage Container
-        LdapMessageContainer<UnbindRequestDecorator> ldapMessageContainer = new LdapMessageContainer<UnbindRequestDecorator>( codec );
+        LdapMessageContainer<UnbindRequestDecorator> ldapMessageContainer = new LdapMessageContainer<UnbindRequestDecorator>(
+            codec );
 
         // Decode a UnbindRequest message
         try

Modified: directory/shared/trunk/ldap/codec/standalone/src/main/java/org/apache/directory/shared/ldap/codec/standalone/StandaloneLdapApiService.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/standalone/src/main/java/org/apache/directory/shared/ldap/codec/standalone/StandaloneLdapApiService.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/standalone/src/main/java/org/apache/directory/shared/ldap/codec/standalone/StandaloneLdapApiService.java (original)
+++ directory/shared/trunk/ldap/codec/standalone/src/main/java/org/apache/directory/shared/ldap/codec/standalone/StandaloneLdapApiService.java Tue Jan 24 17:27:00 2012
@@ -67,34 +67,35 @@ public class StandaloneLdapApiService im
 {
     /** A logger */
     private static final Logger LOG = LoggerFactory.getLogger( StandaloneLdapApiService.class );
- 
+
     /** The map of registered {@link org.apache.directory.shared.ldap.codec.api.ControlFactory}'s */
-    private Map<String,ControlFactory<?,?>> controlFactories = new HashMap<String, ControlFactory<?,?>>();
+    private Map<String, ControlFactory<?, ?>> controlFactories = new HashMap<String, ControlFactory<?, ?>>();
 
     /** The map of registered {@link org.apache.directory.shared.ldap.codec.api.ExtendedRequestFactory}'s by request OID */
-    private Map<String,ExtendedRequestFactory<?,?>> extReqFactories = new HashMap<String, ExtendedRequestFactory<?,?>>();
+    private Map<String, ExtendedRequestFactory<?, ?>> extReqFactories = new HashMap<String, ExtendedRequestFactory<?, ?>>();
 
     /** The map of registered {@link UnsolicitedResponseFactory}'s by request OID */
-    private Map<String,UnsolicitedResponseFactory<?>> unsolicitedFactories = new HashMap<String, UnsolicitedResponseFactory<?>>();
-    
+    private Map<String, UnsolicitedResponseFactory<?>> unsolicitedFactories = new HashMap<String, UnsolicitedResponseFactory<?>>();
+
     /** The LDAP {@link ProtocolCodecFactory} implementation used */
     private ProtocolCodecFactory protocolCodecFactory;
-    
-    /** The list of default controls to load at startup */ 
+
+    /** The list of default controls to load at startup */
     public static final String DEFAULT_CONTROLS_LIST = "default.controls";
 
-    /** The list of extra controls to load at startup */ 
+    /** The list of extra controls to load at startup */
     public static final String EXTRA_CONTROLS_LIST = "extra.controls";
 
-    /** The list of default extended operation requests to load at startup */ 
+    /** The list of default extended operation requests to load at startup */
     public static final String DEFAULT_EXTENDED_OPERATION_REQUESTS_LIST = "default.extendedOperation.requests";
 
-    /** The list of default extended operation responses to load at startup */ 
+    /** The list of default extended operation responses to load at startup */
     public static final String DEFAULT_EXTENDED_OPERATION_RESPONSES_LIST = "default.extendedOperation.responses";
 
-    /** The list of extra controls to load at startup */ 
+    /** The list of extra controls to load at startup */
     public static final String EXTRA_EXTENDED_OPERATION_LIST = "extra.extendedOperations";
 
+
     /**
      * Creates a new instance of StandaloneLdapCodecService. Optionally checks for
      * system property {@link #PLUGIN_DIRECTORY_PROPERTY}. Intended for use by 
@@ -162,33 +163,33 @@ public class StandaloneLdapApiService im
     {
         // Load the controls
         loadControls();
-        
+
         // Load the extended operations
         loadExtendedOperations();
-        
+
         // Load the schema elements
         //loadSchemaElements();
-        
+
         // Load the network layer
         //loadNetworkLayer()
-        
+
         if ( protocolCodecFactory == null )
         {
-             try
-             {
-                 @SuppressWarnings("unchecked")
-                 Class<? extends ProtocolCodecFactory> clazz = ( Class<? extends ProtocolCodecFactory> )
-                 Class.forName( DEFAULT_PROTOCOL_CODEC_FACTORY );
-                 protocolCodecFactory = clazz.newInstance();
-             }
-             catch( Exception cause )
-             {
-                 throw new RuntimeException( "Failed to load default codec factory.", cause );
-             }
+            try
+            {
+                @SuppressWarnings("unchecked")
+                Class<? extends ProtocolCodecFactory> clazz = ( Class<? extends ProtocolCodecFactory> )
+                    Class.forName( DEFAULT_PROTOCOL_CODEC_FACTORY );
+                protocolCodecFactory = clazz.newInstance();
+            }
+            catch ( Exception cause )
+            {
+                throw new RuntimeException( "Failed to load default codec factory.", cause );
+            }
         }
     }
-    
-    
+
+
     /**
      * Load the controls
      * 
@@ -198,12 +199,12 @@ public class StandaloneLdapApiService im
     {
         // first load the default controls
         loadDefaultControls();
-        
+
         // The load the extra controls
         loadExtraControls();
     }
-    
-    
+
+
     /**
      * Loads the Controls implemented out of the box in the codec.
      */
@@ -211,7 +212,7 @@ public class StandaloneLdapApiService im
     {
         // Load defaults from command line properties if it exists
         String defaultControlsList = System.getProperty( DEFAULT_CONTROLS_LIST );
-        
+
         if ( Strings.isEmpty( defaultControlsList ) )
         {
             return;
@@ -219,17 +220,20 @@ public class StandaloneLdapApiService im
 
         for ( String control : defaultControlsList.split( "," ) )
         {
-            Class<?>[] types = new Class<?>[] { LdapApiService.class };
-            Class<? extends ControlFactory<?, ?>> clazz = ( Class<? extends ControlFactory<?, ?>> )Class.forName( control );
-            Constructor<?> constructor = clazz.getConstructor(types);
-            
-            ControlFactory<?, ?> factory = (ControlFactory<?, ?>)constructor.newInstance( new Object[]{ this } );
+            Class<?>[] types = new Class<?>[]
+                { LdapApiService.class };
+            Class<? extends ControlFactory<?, ?>> clazz = ( Class<? extends ControlFactory<?, ?>> ) Class
+                .forName( control );
+            Constructor<?> constructor = clazz.getConstructor( types );
+
+            ControlFactory<?, ?> factory = ( ControlFactory<?, ?> ) constructor.newInstance( new Object[]
+                { this } );
             controlFactories.put( factory.getOid(), factory );
             LOG.info( "Registered pre-bundled control factory: {}", factory.getOid() );
         }
     }
-    
-    
+
+
     /**
      * Loads the extra Controls
      */
@@ -237,24 +241,27 @@ public class StandaloneLdapApiService im
     {
         // Load extra from command line properties if it exists
         String extraControlsList = System.getProperty( EXTRA_CONTROLS_LIST );
-        
+
         if ( Strings.isEmpty( extraControlsList ) )
         {
             return;
         }
-        
+
         for ( String control : extraControlsList.split( "," ) )
         {
-            Class<?>[] types = new Class<?>[] { LdapApiService.class };
-            Class<? extends ControlFactory<?, ?>> clazz = ( Class<? extends ControlFactory<?, ?>> )Class.forName( control );
-            Constructor<?> constructor = clazz.getConstructor(types);
-            
-            ControlFactory<?, ?> factory = (ControlFactory<?, ?>)constructor.newInstance( new Object[]{ this } );
+            Class<?>[] types = new Class<?>[]
+                { LdapApiService.class };
+            Class<? extends ControlFactory<?, ?>> clazz = ( Class<? extends ControlFactory<?, ?>> ) Class
+                .forName( control );
+            Constructor<?> constructor = clazz.getConstructor( types );
+
+            ControlFactory<?, ?> factory = ( ControlFactory<?, ?> ) constructor.newInstance( new Object[]
+                { this } );
             controlFactories.put( factory.getOid(), factory );
             LOG.info( "Registered pre-bundled control factory: {}", factory.getOid() );
         }
     }
-    
+
 
     /**
      * Load the extended operations
@@ -267,8 +274,8 @@ public class StandaloneLdapApiService im
         loadDefaultExtendedOperationResponses();
         loadExtraExtendedOperations();
     }
-    
-    
+
+
     /**
      * Loads the default extended operation requests
      */
@@ -276,25 +283,29 @@ public class StandaloneLdapApiService im
     {
         // Load from command line properties if it exists
         String defaultExtendedOperationsList = System.getProperty( DEFAULT_EXTENDED_OPERATION_REQUESTS_LIST );
-        
+
         if ( Strings.isEmpty( defaultExtendedOperationsList ) )
         {
             return;
         }
-        
+
         for ( String extendedOperation : defaultExtendedOperationsList.split( "," ) )
         {
-            Class<?>[] types = new Class<?>[] { LdapApiService.class };
-            Class<? extends ExtendedRequestFactory<?,?>> clazz = ( Class<? extends ExtendedRequestFactory<?,?>> )Class.forName( extendedOperation );
-            Constructor<?> constructor = clazz.getConstructor(types);
-            
-            ExtendedRequestFactory<?,?> factory = (ExtendedRequestFactory<?,?>)constructor.newInstance( new Object[]{ this } );
+            Class<?>[] types = new Class<?>[]
+                { LdapApiService.class };
+            Class<? extends ExtendedRequestFactory<?, ?>> clazz = ( Class<? extends ExtendedRequestFactory<?, ?>> ) Class
+                .forName( extendedOperation );
+            Constructor<?> constructor = clazz.getConstructor( types );
+
+            ExtendedRequestFactory<?, ?> factory = ( ExtendedRequestFactory<?, ?> ) constructor
+                .newInstance( new Object[]
+                    { this } );
             extReqFactories.put( factory.getOid(), factory );
             LOG.info( "Registered pre-bundled extended operation factory: {}", factory.getOid() );
         }
     }
-    
-    
+
+
     /**
      * Loads the default extended operation responses
      */
@@ -302,55 +313,59 @@ public class StandaloneLdapApiService im
     {
         // Load from command line properties if it exists
         String defaultExtendedOperationsList = System.getProperty( DEFAULT_EXTENDED_OPERATION_RESPONSES_LIST );
-        
+
         if ( Strings.isEmpty( defaultExtendedOperationsList ) )
         {
             return;
         }
-        
+
         for ( String extendedOperation : defaultExtendedOperationsList.split( "," ) )
         {
-            Class<?>[] types = new Class<?>[] { LdapApiService.class };
-            Class<? extends UnsolicitedResponseFactory<?>> clazz = ( Class<? extends UnsolicitedResponseFactory<?>> )Class.forName( extendedOperation );
-            Constructor<?> constructor = clazz.getConstructor(types);
-            
-            UnsolicitedResponseFactory<?> factory = (UnsolicitedResponseFactory<?>)constructor.newInstance( new Object[]{ this } );
+            Class<?>[] types = new Class<?>[]
+                { LdapApiService.class };
+            Class<? extends UnsolicitedResponseFactory<?>> clazz = ( Class<? extends UnsolicitedResponseFactory<?>> ) Class
+                .forName( extendedOperation );
+            Constructor<?> constructor = clazz.getConstructor( types );
+
+            UnsolicitedResponseFactory<?> factory = ( UnsolicitedResponseFactory<?> ) constructor
+                .newInstance( new Object[]
+                    { this } );
             unsolicitedFactories.put( factory.getOid(), factory );
             LOG.info( "Registered pre-bundled extended operation factory: {}", factory.getOid() );
         }
     }
-    
-    
+
+
     /**
      * Loads the extra extended operations
      */
     private void loadExtraExtendedOperations()
     {
-        
+
     }
-    
-    
+
+
     //-------------------------------------------------------------------------
     // LdapCodecService implementation methods
     //-------------------------------------------------------------------------
     /**
      * {@inheritDoc}
      */
-    public ControlFactory<?,?> registerControl( ControlFactory<?,?> factory )
+    public ControlFactory<?, ?> registerControl( ControlFactory<?, ?> factory )
     {
         return controlFactories.put( factory.getOid(), factory );
     }
-    
+
 
     /**
      * {@inheritDoc}
      */
-    public ControlFactory<?,?> unregisterControl( String oid )
+    public ControlFactory<?, ?> unregisterControl( String oid )
     {
         return controlFactories.remove( oid );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -358,8 +373,8 @@ public class StandaloneLdapApiService im
     {
         return Collections.unmodifiableSet( controlFactories.keySet() ).iterator();
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -367,7 +382,7 @@ public class StandaloneLdapApiService im
     {
         return controlFactories.containsKey( oid );
     }
-    
+
 
     /**
      * {@inheritDoc}
@@ -377,16 +392,16 @@ public class StandaloneLdapApiService im
         return Collections.unmodifiableSet( extReqFactories.keySet() ).iterator();
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
-    public ExtendedRequestFactory<?, ?> registerExtendedRequest( ExtendedRequestFactory<?,?> factory )
+    public ExtendedRequestFactory<?, ?> registerExtendedRequest( ExtendedRequestFactory<?, ?> factory )
     {
         return extReqFactories.put( factory.getOid(), factory );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -395,7 +410,7 @@ public class StandaloneLdapApiService im
         return protocolCodecFactory;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -405,20 +420,20 @@ public class StandaloneLdapApiService im
         this.protocolCodecFactory = protocolCodecFactory;
         return old;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public CodecControl<? extends Control> newControl( String oid )
     {
-        ControlFactory<?,?> factory = controlFactories.get( oid );
-        
+        ControlFactory<?, ?> factory = controlFactories.get( oid );
+
         if ( factory == null )
         {
             return new BasicControlDecorator<Control>( this, new OpaqueControl( oid ) );
         }
-        
+
         return factory.newCodecControl();
     }
 
@@ -433,21 +448,21 @@ public class StandaloneLdapApiService im
         {
             throw new NullPointerException( "Control argument was null." );
         }
-        
+
         // protect agains being multiply decorated
         if ( control instanceof CodecControl )
         {
-            return (org.apache.directory.shared.ldap.codec.api.CodecControl<?> )control;
+            return ( org.apache.directory.shared.ldap.codec.api.CodecControl<?> ) control;
         }
-        
+
         @SuppressWarnings("rawtypes")
         ControlFactory factory = controlFactories.get( control.getOid() );
-        
+
         if ( factory == null )
         {
-            return new BasicControlDecorator<Control>( this, control ); 
+            return new BasicControlDecorator<Control>( this, control );
         }
-        
+
         return factory.newCodecControl( control );
     }
 
@@ -461,7 +476,7 @@ public class StandaloneLdapApiService im
         ByteBuffer bb = ByteBuffer.allocate( decorator.computeLength() );
         decorator.encode( bb );
         bb.flip();
-        BasicControl jndiControl = 
+        BasicControl jndiControl =
             new BasicControl( control.getOid(), control.isCritical(), bb.array() );
         return jndiControl;
     }
@@ -474,23 +489,23 @@ public class StandaloneLdapApiService im
     {
         @SuppressWarnings("rawtypes")
         ControlFactory factory = controlFactories.get( control.getID() );
-        
+
         if ( factory == null )
         {
             OpaqueControl ourControl = new OpaqueControl( control.getID() );
             ourControl.setCritical( control.isCritical() );
-            BasicControlDecorator<Control> decorator = 
+            BasicControlDecorator<Control> decorator =
                 new BasicControlDecorator<Control>( this, ourControl );
             decorator.setValue( control.getEncodedValue() );
             return decorator;
         }
-        
+
         @SuppressWarnings("unchecked")
         CodecControl<? extends Control> ourControl = factory.newCodecControl();
         ourControl.setCritical( control.isCritical() );
         ourControl.setValue( control.getEncodedValue() );
         ourControl.decode( control.getEncodedValue() );
-        
+
         return ourControl;
     }
 
@@ -529,13 +544,13 @@ public class StandaloneLdapApiService im
     {
         throw new NotImplementedException( "Figure out how to transform" );
     }
-    
+
 
     /**
      * {@inheritDoc}
      */
     public ExtendedResponse fromJndi( javax.naming.ldap.ExtendedResponse jndiResponse ) throws DecoderException
-    {   
+    {
         throw new NotImplementedException( "Figure out how to transform" );
     }
 
@@ -563,7 +578,7 @@ public class StandaloneLdapApiService im
      */
     public ExtendedRequest<?> fromJndi( javax.naming.ldap.ExtendedRequest jndiRequest ) throws DecoderException
     {
-        ExtendedRequestDecorator<?,?> decorator =
+        ExtendedRequestDecorator<?, ?> decorator =
             ( ExtendedRequestDecorator<?, ?> ) newExtendedRequest( jndiRequest.getID(), jndiRequest.getEncodedValue() );
         return decorator;
     }
@@ -576,7 +591,7 @@ public class StandaloneLdapApiService im
     {
         final String oid = modelRequest.getRequestName();
         final byte[] value;
-        
+
         if ( modelRequest instanceof ExtendedRequestDecorator )
         {
             ExtendedRequestDecorator<?, ?> decorator = ( ExtendedRequestDecorator<?, ?> ) modelRequest;
@@ -585,54 +600,59 @@ public class StandaloneLdapApiService im
         else
         {
             // have to ask the factory to decorate for us - can't do it ourselves
-            ExtendedRequestFactory<?,?> extendedRequestFactory = extReqFactories.get( modelRequest.getRequestName() );
+            ExtendedRequestFactory<?, ?> extendedRequestFactory = extReqFactories.get( modelRequest.getRequestName() );
             ExtendedRequestDecorator<?, ?> decorator = extendedRequestFactory.decorate( modelRequest );
             value = decorator.getRequestValue();
         }
-        
-        
+
         javax.naming.ldap.ExtendedRequest jndiRequest = new javax.naming.ldap.ExtendedRequest()
         {
             private static final long serialVersionUID = -4160980385909987475L;
 
+
             public String getID()
             {
                 return oid;
             }
 
+
             public byte[] getEncodedValue()
             {
                 return value;
             }
 
+
             public javax.naming.ldap.ExtendedResponse createExtendedResponse( String id, byte[] berValue, int offset,
                 int length ) throws NamingException
             {
-                ExtendedRequestFactory<?,?> factory = extReqFactories.get( modelRequest.getRequestName() );
-                
+                ExtendedRequestFactory<?, ?> factory = extReqFactories.get( modelRequest.getRequestName() );
+
                 try
                 {
-                    final ExtendedResponseDecorator<?> resp = ( ExtendedResponseDecorator<?> ) factory.newResponse( berValue );
+                    final ExtendedResponseDecorator<?> resp = ( ExtendedResponseDecorator<?> ) factory
+                        .newResponse( berValue );
                     javax.naming.ldap.ExtendedResponse jndiResponse = new javax.naming.ldap.ExtendedResponse()
                     {
                         private static final long serialVersionUID = -7686354122066100703L;
 
+
                         public String getID()
                         {
                             return oid;
                         }
 
+
                         public byte[] getEncodedValue()
                         {
                             return resp.getResponseValue();
                         }
                     };
-                    
+
                     return jndiResponse;
                 }
                 catch ( DecoderException e )
                 {
-                    NamingException ne = new NamingException( "Unable to decode encoded response value: " + 
+                    NamingException ne = new NamingException( "Unable to decode encoded response value: " +
                         Strings.dumpBytes( berValue ) );
                     ne.setRootCause( e );
                     throw ne;
@@ -649,26 +669,28 @@ public class StandaloneLdapApiService im
      * @throws DecoderException 
      */
     @SuppressWarnings("unchecked")
-    public <E extends ExtendedResponse> E newExtendedResponse( ExtendedRequest<E> req, byte[] serializedResponse ) throws DecoderException
+    public <E extends ExtendedResponse> E newExtendedResponse( ExtendedRequest<E> req, byte[] serializedResponse )
+        throws DecoderException
     {
         ExtendedResponseDecorator<ExtendedResponse> resp;
-        
-        ExtendedRequestFactory<?,?> extendedRequestFactory = extReqFactories.get( req.getRequestName() );
-        
+
+        ExtendedRequestFactory<?, ?> extendedRequestFactory = extReqFactories.get( req.getRequestName() );
+
         if ( extendedRequestFactory != null )
         {
-            resp = ( ExtendedResponseDecorator<ExtendedResponse> ) extendedRequestFactory.newResponse( serializedResponse );
+            resp = ( ExtendedResponseDecorator<ExtendedResponse> ) extendedRequestFactory
+                .newResponse( serializedResponse );
         }
         else
         {
-            resp = new ExtendedResponseDecorator<ExtendedResponse>( this, 
+            resp = new ExtendedResponseDecorator<ExtendedResponse>( this,
                 new ExtendedResponseImpl( req.getRequestName() ) );
             resp.setResponseValue( serializedResponse );
             resp.setResponseName( req.getRequestName() );
         }
-        
+
         resp.setMessageId( req.getMessageId() );
-        
+
         return ( E ) resp;
     }
 
@@ -679,9 +701,9 @@ public class StandaloneLdapApiService im
     public ExtendedRequest<?> newExtendedRequest( String oid, byte[] value )
     {
         ExtendedRequest<?> req = null;
-        
-        ExtendedRequestFactory<?,?> extendedRequestFactory = extReqFactories.get( oid );
-        
+
+        ExtendedRequestFactory<?, ?> extendedRequestFactory = extReqFactories.get( oid );
+
         if ( extendedRequestFactory != null )
         {
             if ( value == null )
@@ -695,14 +717,14 @@ public class StandaloneLdapApiService im
         }
         else
         {
-            ExtendedRequestDecorator<ExtendedRequest<ExtendedResponse>, ExtendedResponse> decorator = 
-                new ExtendedRequestDecorator<ExtendedRequest<ExtendedResponse>, ExtendedResponse>( this, 
+            ExtendedRequestDecorator<ExtendedRequest<ExtendedResponse>, ExtendedResponse> decorator =
+                new ExtendedRequestDecorator<ExtendedRequest<ExtendedResponse>, ExtendedResponse>( this,
                     new ExtendedRequestImpl() );
             decorator.setRequestName( oid );
             decorator.setRequestValue( value );
             req = decorator;
         }
-        
+
         return req;
     }
 
@@ -713,20 +735,20 @@ public class StandaloneLdapApiService im
     @SuppressWarnings("unchecked")
     public ExtendedRequestDecorator<?, ?> decorate( ExtendedRequest<?> decoratedMessage )
     {
-        ExtendedRequestDecorator<?,?> req = null;
-        
-        ExtendedRequestFactory<?,?> extendedRequestFactory = extReqFactories.get( decoratedMessage.getRequestName() );
-        
+        ExtendedRequestDecorator<?, ?> req = null;
+
+        ExtendedRequestFactory<?, ?> extendedRequestFactory = extReqFactories.get( decoratedMessage.getRequestName() );
+
         if ( extendedRequestFactory != null )
         {
             req = extendedRequestFactory.decorate( decoratedMessage );
         }
         else
         {
-            req = new ExtendedRequestDecorator<ExtendedRequest<ExtendedResponse>, ExtendedResponse>( this, 
-                    ( ExtendedRequest<ExtendedResponse> ) decoratedMessage );
+            req = new ExtendedRequestDecorator<ExtendedRequest<ExtendedResponse>, ExtendedResponse>( this,
+                ( ExtendedRequest<ExtendedResponse> ) decoratedMessage );
         }
-        
+
         return req;
     }
 
@@ -737,10 +759,11 @@ public class StandaloneLdapApiService im
     public ExtendedResponseDecorator<?> decorate( ExtendedResponse decoratedMessage )
     {
         ExtendedResponseDecorator<?> resp = null;
-        
-        UnsolicitedResponseFactory<?> unsolicitedResponseFactory = unsolicitedFactories.get( decoratedMessage.getResponseName() );
-        ExtendedRequestFactory<?,?> extendedRequestFactory = extReqFactories.get( decoratedMessage.getResponseName() );
-        
+
+        UnsolicitedResponseFactory<?> unsolicitedResponseFactory = unsolicitedFactories.get( decoratedMessage
+            .getResponseName() );
+        ExtendedRequestFactory<?, ?> extendedRequestFactory = extReqFactories.get( decoratedMessage.getResponseName() );
+
         if ( extendedRequestFactory != null )
         {
             resp = extendedRequestFactory.decorate( decoratedMessage );
@@ -753,7 +776,7 @@ public class StandaloneLdapApiService im
         {
             resp = new ExtendedResponseDecorator<ExtendedResponse>( this, decoratedMessage );
         }
-        
+
         return resp;
     }
 

Modified: directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/standalone/AbstractCodecServiceTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/standalone/AbstractCodecServiceTest.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/standalone/AbstractCodecServiceTest.java (original)
+++ directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/standalone/AbstractCodecServiceTest.java Tue Jan 24 17:27:00 2012
@@ -41,7 +41,7 @@ public abstract class AbstractCodecServi
     /** The encoder instance */
     protected static LdapEncoder encoder;
 
-    
+
     /**
      * Initialize the codec service
      */
@@ -49,31 +49,31 @@ public abstract class AbstractCodecServi
     public static void setupLdapApiService() throws Exception
     {
         // Load the extension points
-        System.setProperty( StandaloneLdapApiService.DEFAULT_CONTROLS_LIST, 
+        System.setProperty( StandaloneLdapApiService.DEFAULT_CONTROLS_LIST,
             "org.apache.directory.shared.ldap.codec.controls.cascade.CascadeFactory," +
-            "org.apache.directory.shared.ldap.codec.controls.manageDsaIT.ManageDsaITFactory," +
-            "org.apache.directory.shared.ldap.codec.controls.search.entryChange.EntryChangeFactory," +
-            "org.apache.directory.shared.ldap.codec.controls.search.pagedSearch.PagedResultsFactory," +
-            "org.apache.directory.shared.ldap.codec.controls.search.persistentSearch.PersistentSearchFactory," +
-            "org.apache.directory.shared.ldap.codec.controls.search.subentries.SubentriesFactory" );
+                "org.apache.directory.shared.ldap.codec.controls.manageDsaIT.ManageDsaITFactory," +
+                "org.apache.directory.shared.ldap.codec.controls.search.entryChange.EntryChangeFactory," +
+                "org.apache.directory.shared.ldap.codec.controls.search.pagedSearch.PagedResultsFactory," +
+                "org.apache.directory.shared.ldap.codec.controls.search.persistentSearch.PersistentSearchFactory," +
+                "org.apache.directory.shared.ldap.codec.controls.search.subentries.SubentriesFactory" );
 
-        System.setProperty( StandaloneLdapApiService.EXTRA_CONTROLS_LIST, 
+        System.setProperty( StandaloneLdapApiService.EXTRA_CONTROLS_LIST,
             "org.apache.directory.shared.ldap.extras.controls.ppolicy_impl.PasswordPolicyFactory," +
-            "org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncDoneValueFactory," +
-            "org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncInfoValueFactory," +
-            "org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncRequestValueFactory," +
-            "org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncStateValueFactory" );
-        
-        System.setProperty( StandaloneLdapApiService.DEFAULT_EXTENDED_OPERATION_REQUESTS_LIST, 
+                "org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncDoneValueFactory," +
+                "org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncInfoValueFactory," +
+                "org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncRequestValueFactory," +
+                "org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncStateValueFactory" );
+
+        System.setProperty( StandaloneLdapApiService.DEFAULT_EXTENDED_OPERATION_REQUESTS_LIST,
             "org.apache.directory.shared.ldap.extras.extended.ads_impl.cancel.CancelFactory," +
-            "org.apache.directory.shared.ldap.extras.extended.ads_impl.certGeneration.CertGenerationFactory," +
-            "org.apache.directory.shared.ldap.extras.extended.ads_impl.gracefulShutdown.GracefulShutdownFactory," +
-            "org.apache.directory.shared.ldap.extras.extended.ads_impl.storedProcedure.StoredProcedureFactory" );
+                "org.apache.directory.shared.ldap.extras.extended.ads_impl.certGeneration.CertGenerationFactory," +
+                "org.apache.directory.shared.ldap.extras.extended.ads_impl.gracefulShutdown.GracefulShutdownFactory," +
+                "org.apache.directory.shared.ldap.extras.extended.ads_impl.storedProcedure.StoredProcedureFactory" );
 
-        System.setProperty( StandaloneLdapApiService.DEFAULT_EXTENDED_OPERATION_RESPONSES_LIST, 
+        System.setProperty( StandaloneLdapApiService.DEFAULT_EXTENDED_OPERATION_RESPONSES_LIST,
             "org.apache.directory.shared.ldap.extras.extended.ads_impl.gracefulDisconnect.GracefulDisconnectFactory" );
-        
-        System.setProperty( StandaloneLdapApiService.EXTRA_EXTENDED_OPERATION_LIST, "" ); 
+
+        System.setProperty( StandaloneLdapApiService.EXTRA_EXTENDED_OPERATION_LIST, "" );
 
         codec = LdapApiServiceFactory.getSingleton();
         encoder = new LdapEncoder( codec );

Modified: directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/ACIItemSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/ACIItemSyntaxChecker.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/ACIItemSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/ACIItemSyntaxChecker.java Tue Jan 24 17:27:00 2012
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.shared.ldap.aci;
 
+
 import java.text.ParseException;
 
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
@@ -44,6 +45,7 @@ public class ACIItemSyntaxChecker extend
     /** An instance of ACI Item Checker */
     private ACIItemChecker aciItemChecker;
 
+
     /**
      * Creates a new instance of ACIItemSyntaxChecker
      */
@@ -65,14 +67,14 @@ public class ACIItemSyntaxChecker extend
             LOG.debug( "Syntax invalid for 'null'" );
             return false;
         }
-        
+
         if ( value instanceof String )
         {
             strValue = ( String ) value;
         }
         else if ( value instanceof byte[] )
         {
-            strValue = Strings.utf8ToString((byte[]) value);
+            strValue = Strings.utf8ToString( ( byte[] ) value );
         }
         else
         {
@@ -87,11 +89,11 @@ public class ACIItemSyntaxChecker extend
 
         try
         {
-            synchronized( aciItemChecker )
+            synchronized ( aciItemChecker )
             {
                 aciItemChecker.parse( strValue );
             }
-            
+
             LOG.debug( "Syntax valid for '{}'", value );
             return true;
         }

Modified: directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/ACITuple.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/ACITuple.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/ACITuple.java (original)
+++ directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/ACITuple.java Tue Jan 24 17:27:00 2012
@@ -68,12 +68,12 @@ public class ACITuple
      * @param precedence the precedence of this tuple (<tt>0</tt>-<tt>255</tt>)
      */
     public ACITuple(
-            Collection<UserClass> userClasses,
-            AuthenticationLevel authenticationLevel,
-            Collection<ProtectedItem> protectedItems,
-            Collection<MicroOperation> microOperations,
-            boolean grant,
-            Integer precedence )
+        Collection<UserClass> userClasses,
+        AuthenticationLevel authenticationLevel,
+        Collection<ProtectedItem> protectedItems,
+        Collection<MicroOperation> microOperations,
+        boolean grant,
+        Integer precedence )
     {
         if ( authenticationLevel == null )
         {

Modified: directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/GrantAndDenial.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/GrantAndDenial.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/GrantAndDenial.java (original)
+++ directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/GrantAndDenial.java Tue Jan 24 17:27:00 2012
@@ -30,86 +30,86 @@ public enum GrantAndDenial
     // Permissions that may be used in conjunction with any component of
     // <tt>ProtectedItem</tt>s.
     /** Grant for {@link MicroOperation#ADD} */
-    GRANT_ADD ( MicroOperation.ADD, 0, true ),
+    GRANT_ADD(MicroOperation.ADD, 0, true),
 
     /** Denial for {@link MicroOperation#ADD} */
-    DENY_ADD ( MicroOperation.ADD, 1, false ),
+    DENY_ADD(MicroOperation.ADD, 1, false),
 
     /** Grant for {@link MicroOperation#DISCLOSE_ON_ERROR} */
-    GRANT_DISCLOSE_ON_ERROR ( MicroOperation.DISCLOSE_ON_ERROR, 2, true ),
+    GRANT_DISCLOSE_ON_ERROR(MicroOperation.DISCLOSE_ON_ERROR, 2, true),
 
     /** Denial for {@link MicroOperation#DISCLOSE_ON_ERROR} */
-    DENY_DISCLOSE_ON_ERROR ( MicroOperation.DISCLOSE_ON_ERROR, 3, false ),
+    DENY_DISCLOSE_ON_ERROR(MicroOperation.DISCLOSE_ON_ERROR, 3, false),
 
     /** Grant for {@link MicroOperation#READ} */
-    GRANT_READ ( MicroOperation.READ, 4, true ),
+    GRANT_READ(MicroOperation.READ, 4, true),
 
     /** Denial for {@link MicroOperation#READ} */
-    DENY_READ ( MicroOperation.READ, 5, false ),
+    DENY_READ(MicroOperation.READ, 5, false),
 
     /** Grant for {@link MicroOperation#REMOVE} */
-    GRANT_REMOVE ( MicroOperation.REMOVE, 6, true ),
+    GRANT_REMOVE(MicroOperation.REMOVE, 6, true),
 
     /** Denial for {@link MicroOperation#REMOVE} */
-    DENY_REMOVE ( MicroOperation.REMOVE, 7, false ),
+    DENY_REMOVE(MicroOperation.REMOVE, 7, false),
 
     // Permissions that may be used only in conjunction with the entry
     // component.
     /** Grant for {@link MicroOperation#BROWSE} */
-    GRANT_BROWSE ( MicroOperation.BROWSE, 8, true ),
+    GRANT_BROWSE(MicroOperation.BROWSE, 8, true),
 
     /** Denial for {@link MicroOperation#BROWSE} */
-    DENY_BROWSE ( MicroOperation.BROWSE, 9, false ),
+    DENY_BROWSE(MicroOperation.BROWSE, 9, false),
 
     /** Grant for {@link MicroOperation#EXPORT} */
-    GRANT_EXPORT ( MicroOperation.EXPORT, 10, true ),
+    GRANT_EXPORT(MicroOperation.EXPORT, 10, true),
 
     /** Denial for {@link MicroOperation#EXPORT} */
-    DENY_EXPORT ( MicroOperation.EXPORT, 11, false ),
+    DENY_EXPORT(MicroOperation.EXPORT, 11, false),
 
     /** Grant for {@link MicroOperation#IMPORT} */
-    GRANT_IMPORT ( MicroOperation.IMPORT, 12, true ),
+    GRANT_IMPORT(MicroOperation.IMPORT, 12, true),
 
     /** Denial for {@link MicroOperation#IMPORT} */
-    DENY_IMPORT ( MicroOperation.IMPORT, 13, false ),
+    DENY_IMPORT(MicroOperation.IMPORT, 13, false),
 
     /** Grant for {@link MicroOperation#MODIFY} */
-    GRANT_MODIFY ( MicroOperation.MODIFY, 14, true ),
+    GRANT_MODIFY(MicroOperation.MODIFY, 14, true),
 
     /** Denial for {@link MicroOperation#MODIFY} */
-    DENY_MODIFY ( MicroOperation.MODIFY, 15, false ),
+    DENY_MODIFY(MicroOperation.MODIFY, 15, false),
 
     /** Grant for {@link MicroOperation#RENAME} */
-    GRANT_RENAME ( MicroOperation.RENAME, 16, true ),
+    GRANT_RENAME(MicroOperation.RENAME, 16, true),
 
     /** Denial for {@link MicroOperation#RENAME} */
-    DENY_RENAME ( MicroOperation.RENAME, 17, false ),
+    DENY_RENAME(MicroOperation.RENAME, 17, false),
 
     /** Grant for {@link MicroOperation#RETURN_DN} */
-    GRANT_RETURN_DN ( MicroOperation.RETURN_DN, 18, true ),
+    GRANT_RETURN_DN(MicroOperation.RETURN_DN, 18, true),
 
     /** Denial for {@link MicroOperation#RETURN_DN} */
-    DENY_RETURN_DN ( MicroOperation.RETURN_DN, 19, false ),
+    DENY_RETURN_DN(MicroOperation.RETURN_DN, 19, false),
 
     // Permissions that may be used in conjunction with any component,
     // except entry, of <tt>ProtectedItem</tt>s.
     /** Grant for {@link MicroOperation#COMPARE} */
-    GRANT_COMPARE ( MicroOperation.COMPARE, 20, true ),
+    GRANT_COMPARE(MicroOperation.COMPARE, 20, true),
 
     /** Deny for {@link MicroOperation#COMPARE} */
-    DENY_COMPARE ( MicroOperation.COMPARE, 21, false ),
+    DENY_COMPARE(MicroOperation.COMPARE, 21, false),
 
     /** Grant for {@link MicroOperation#FILTER_MATCH} */
-    GRANT_FILTER_MATCH ( MicroOperation.FILTER_MATCH, 22, true ),
+    GRANT_FILTER_MATCH(MicroOperation.FILTER_MATCH, 22, true),
 
     /** Denial for {@link MicroOperation#FILTER_MATCH} */
-    DENY_FILTER_MATCH ( MicroOperation.FILTER_MATCH, 23, false ),
+    DENY_FILTER_MATCH(MicroOperation.FILTER_MATCH, 23, false),
 
     /** Grant for {@link MicroOperation#INVOKE} */
-    GRANT_INVOKE ( MicroOperation.INVOKE, 24, true ),
+    GRANT_INVOKE(MicroOperation.INVOKE, 24, true),
 
     /** Denial for {@link MicroOperation#INVOKE} */
-    DENY_INVOKE ( MicroOperation.INVOKE, 25, false );
+    DENY_INVOKE(MicroOperation.INVOKE, 25, false);
 
     /** The micro operation. */
     private final MicroOperation microOperation;

Modified: directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/ItemFirstACIItem.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/ItemFirstACIItem.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/ItemFirstACIItem.java (original)
+++ directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/ItemFirstACIItem.java Tue Jan 24 17:27:00 2012
@@ -157,7 +157,7 @@ public class ItemFirstACIItem extends AC
             Set<GrantAndDenial> denials = itemPermission.getDenials();
             int precedence = itemPermission.getPrecedence() != null
                 ? itemPermission.getPrecedence()
-                    : this.getPrecedence();
+                : this.getPrecedence();
 
             if ( grants.size() > 0 )
             {

Modified: directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/UserFirstACIItem.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/UserFirstACIItem.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/UserFirstACIItem.java (original)
+++ directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/UserFirstACIItem.java Tue Jan 24 17:27:00 2012
@@ -178,7 +178,7 @@ public class UserFirstACIItem extends AC
             Set<GrantAndDenial> denials = userPermission.getDenials();
             int precedence = userPermission.getPrecedence() != null
                 ? userPermission.getPrecedence()
-                    : this.getPrecedence();
+                : this.getPrecedence();
 
             if ( grants.size() > 0 )
             {

Modified: directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/protectedItem/MaxValueCountElem.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/protectedItem/MaxValueCountElem.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/protectedItem/MaxValueCountElem.java (original)
+++ directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/protectedItem/MaxValueCountElem.java Tue Jan 24 17:27:00 2012
@@ -70,7 +70,6 @@ public class MaxValueCountElem
         return maxCount;
     }
 
-    
 
     /**
      * {@inheritDoc}
@@ -91,16 +90,16 @@ public class MaxValueCountElem
     @Override
     public boolean equals( Object o )
     {
-        if (o == null)
+        if ( o == null )
         {
             return false;
         }
-        
+
         if ( this == o )
         {
             return true;
         }
-        
+
         if ( o instanceof MaxValueCountElem )
         {
             MaxValueCountElem that = ( MaxValueCountElem ) o;

Modified: directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/protectedItem/RestrictedByElem.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/protectedItem/RestrictedByElem.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/protectedItem/RestrictedByElem.java (original)
+++ directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/protectedItem/RestrictedByElem.java Tue Jan 24 17:27:00 2012
@@ -90,16 +90,16 @@ public class RestrictedByElem
     @Override
     public boolean equals( Object o )
     {
-        if (o == null)
+        if ( o == null )
         {
             return false;
         }
-        
+
         if ( this == o )
         {
             return true;
         }
-        
+
         if ( o instanceof RestrictedByElem )
         {
             RestrictedByElem that = ( RestrictedByElem ) o;
@@ -120,7 +120,7 @@ public class RestrictedByElem
             }
             else
             {
-                if ( this.attributeType.equals( that.attributeType ))
+                if ( this.attributeType.equals( that.attributeType ) )
                 {
                     if ( this.valuesIn == null )
                     {

Modified: directory/shared/trunk/ldap/extras/aci/src/test/java/org/apache/directory/shared/ldap/aci/ProtectedItem_ClassesTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/aci/src/test/java/org/apache/directory/shared/ldap/aci/ProtectedItem_ClassesTest.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/aci/src/test/java/org/apache/directory/shared/ldap/aci/ProtectedItem_ClassesTest.java (original)
+++ directory/shared/trunk/ldap/extras/aci/src/test/java/org/apache/directory/shared/ldap/aci/ProtectedItem_ClassesTest.java Tue Jan 24 17:27:00 2012
@@ -55,7 +55,7 @@ public class ProtectedItem_ClassesTest
     public void initNames() throws Exception
     {
         ExprNode filterA = FilterParser.parse( "(&(cn=test)(sn=test))" );
-        ExprNode filterB = FilterParser.parse("(&(cn=test)(sn=test))");
+        ExprNode filterB = FilterParser.parse( "(&(cn=test)(sn=test))" );
         ExprNode filterC = FilterParser.parse( "(&(cn=sample)(sn=sample))" );
         classesA = new ClassesItem( filterA );
         classesACopy = new ClassesItem( filterA );

Modified: directory/shared/trunk/ldap/extras/aci/src/test/java/org/apache/directory/shared/ldap/aci/protectedItem/MaxValueCountItemTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/aci/src/test/java/org/apache/directory/shared/ldap/aci/protectedItem/MaxValueCountItemTest.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/aci/src/test/java/org/apache/directory/shared/ldap/aci/protectedItem/MaxValueCountItemTest.java (original)
+++ directory/shared/trunk/ldap/extras/aci/src/test/java/org/apache/directory/shared/ldap/aci/protectedItem/MaxValueCountItemTest.java Tue Jan 24 17:27:00 2012
@@ -62,22 +62,22 @@ public class MaxValueCountItemTest
     public void initNames() throws Exception
     {
         itemsA = new HashSet<MaxValueCountElem>();
-        itemsA.add( new MaxValueCountElem( new AttributeType("aa"), 1 ) );
-        itemsA.add( new MaxValueCountElem( new AttributeType("aa"), 2 ) );
-        itemsA.add( new MaxValueCountElem( new AttributeType("aa"), 3 ) );
+        itemsA.add( new MaxValueCountElem( new AttributeType( "aa" ), 1 ) );
+        itemsA.add( new MaxValueCountElem( new AttributeType( "aa" ), 2 ) );
+        itemsA.add( new MaxValueCountElem( new AttributeType( "aa" ), 3 ) );
         // Sets aren't ordered, so adding order must not matter
         itemsB = new HashSet<MaxValueCountElem>();
-        itemsB.add( new MaxValueCountElem( new AttributeType("aa"), 2 ) );
-        itemsB.add( new MaxValueCountElem( new AttributeType("aa"), 3 ) );
-        itemsB.add( new MaxValueCountElem( new AttributeType("aa"), 1 ) );
+        itemsB.add( new MaxValueCountElem( new AttributeType( "aa" ), 2 ) );
+        itemsB.add( new MaxValueCountElem( new AttributeType( "aa" ), 3 ) );
+        itemsB.add( new MaxValueCountElem( new AttributeType( "aa" ), 1 ) );
         itemsC = new HashSet<MaxValueCountElem>();
-        itemsC.add( new MaxValueCountElem( new AttributeType("aa"), 1 ) );
-        itemsC.add( new MaxValueCountElem( new AttributeType("bb"), 2 ) );
-        itemsC.add( new MaxValueCountElem( new AttributeType("aa"), 3 ) );
+        itemsC.add( new MaxValueCountElem( new AttributeType( "aa" ), 1 ) );
+        itemsC.add( new MaxValueCountElem( new AttributeType( "bb" ), 2 ) );
+        itemsC.add( new MaxValueCountElem( new AttributeType( "aa" ), 3 ) );
         itemsD = new HashSet<MaxValueCountElem>();
-        itemsD.add( new MaxValueCountElem( new AttributeType("aa"), 1 ) );
-        itemsD.add( new MaxValueCountElem( new AttributeType("aa"), 2 ) );
-        itemsD.add( new MaxValueCountElem( new AttributeType("aa"), 4 ) );
+        itemsD.add( new MaxValueCountElem( new AttributeType( "aa" ), 1 ) );
+        itemsD.add( new MaxValueCountElem( new AttributeType( "aa" ), 2 ) );
+        itemsD.add( new MaxValueCountElem( new AttributeType( "aa" ), 4 ) );
         maxValueCountItemA = new MaxValueCountItem( itemsA );
         maxValueCountItemACopy = new MaxValueCountItem( itemsA );
         maxValueCountItemB = new MaxValueCountItem( itemsB );

Modified: directory/shared/trunk/ldap/extras/aci/src/test/java/org/apache/directory/shared/ldap/aci/protectedItem/RestrictedByItemTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/aci/src/test/java/org/apache/directory/shared/ldap/aci/protectedItem/RestrictedByItemTest.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/aci/src/test/java/org/apache/directory/shared/ldap/aci/protectedItem/RestrictedByItemTest.java (original)
+++ directory/shared/trunk/ldap/extras/aci/src/test/java/org/apache/directory/shared/ldap/aci/protectedItem/RestrictedByItemTest.java Tue Jan 24 17:27:00 2012
@@ -62,22 +62,22 @@ public class RestrictedByItemTest
     public void initNames() throws Exception
     {
         elemsA = new HashSet<RestrictedByElem>();
-        elemsA.add( new RestrictedByElem( new AttributeType("aa"), new AttributeType("aa") ) );
-        elemsA.add( new RestrictedByElem( new AttributeType("aa"), new AttributeType("bb") ) );
-        elemsA.add( new RestrictedByElem( new AttributeType("aa"), new AttributeType("cc") ) );
+        elemsA.add( new RestrictedByElem( new AttributeType( "aa" ), new AttributeType( "aa" ) ) );
+        elemsA.add( new RestrictedByElem( new AttributeType( "aa" ), new AttributeType( "bb" ) ) );
+        elemsA.add( new RestrictedByElem( new AttributeType( "aa" ), new AttributeType( "cc" ) ) );
         // Sets aren't ordered, so adding order must not matter
         elemsB = new HashSet<RestrictedByElem>();
-        elemsB.add( new RestrictedByElem( new AttributeType("aa"), new AttributeType("bb") ) );
-        elemsB.add( new RestrictedByElem( new AttributeType("aa"), new AttributeType("cc") ) );
-        elemsB.add( new RestrictedByElem( new AttributeType("aa"), new AttributeType("aa") ) );
+        elemsB.add( new RestrictedByElem( new AttributeType( "aa" ), new AttributeType( "bb" ) ) );
+        elemsB.add( new RestrictedByElem( new AttributeType( "aa" ), new AttributeType( "cc" ) ) );
+        elemsB.add( new RestrictedByElem( new AttributeType( "aa" ), new AttributeType( "aa" ) ) );
         elemsC = new HashSet<RestrictedByElem>();
-        elemsC.add( new RestrictedByElem( new AttributeType("aa"), new AttributeType("aa") ) );
-        elemsC.add( new RestrictedByElem( new AttributeType("bb"), new AttributeType("bb") ) );
-        elemsC.add( new RestrictedByElem( new AttributeType("aa"), new AttributeType("cc") ) );
+        elemsC.add( new RestrictedByElem( new AttributeType( "aa" ), new AttributeType( "aa" ) ) );
+        elemsC.add( new RestrictedByElem( new AttributeType( "bb" ), new AttributeType( "bb" ) ) );
+        elemsC.add( new RestrictedByElem( new AttributeType( "aa" ), new AttributeType( "cc" ) ) );
         elemsD = new HashSet<RestrictedByElem>();
-        elemsD.add( new RestrictedByElem( new AttributeType("aa"), new AttributeType("aa") ) );
-        elemsD.add( new RestrictedByElem( new AttributeType("aa"), new AttributeType("bb") ) );
-        elemsD.add( new RestrictedByElem( new AttributeType("aa"), new AttributeType("dd") ) );
+        elemsD.add( new RestrictedByElem( new AttributeType( "aa" ), new AttributeType( "aa" ) ) );
+        elemsD.add( new RestrictedByElem( new AttributeType( "aa" ), new AttributeType( "bb" ) ) );
+        elemsD.add( new RestrictedByElem( new AttributeType( "aa" ), new AttributeType( "dd" ) ) );
         restrictedByItemA = new RestrictedByItem( elemsA );
         restrictedByItemACopy = new RestrictedByItem( elemsA );
         restrictedByItemB = new RestrictedByItem( elemsB );

Modified: directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/shared/ldap/extras/controls/SyncDoneValue.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/shared/ldap/extras/controls/SyncDoneValue.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/shared/ldap/extras/controls/SyncDoneValue.java (original)
+++ directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/shared/ldap/extras/controls/SyncDoneValue.java Tue Jan 24 17:27:00 2012
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.shared.ldap.extras.controls;
 
+
 import org.apache.directory.shared.ldap.model.message.Control;
 
 

Modified: directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/shared/ldap/extras/controls/SyncDoneValueImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/shared/ldap/extras/controls/SyncDoneValueImpl.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/shared/ldap/extras/controls/SyncDoneValueImpl.java (original)
+++ directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/shared/ldap/extras/controls/SyncDoneValueImpl.java Tue Jan 24 17:27:00 2012
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.shared.ldap.extras.controls;
 
+
 import java.util.Arrays;
 
 import org.apache.directory.shared.ldap.model.message.controls.AbstractControl;
@@ -105,14 +106,14 @@ public class SyncDoneValueImpl extends A
     {
         int h = 37;
 
-        h = h*17 + super.hashCode();
-        h = h*17 + ( refreshDeletes ? 1 : 0 );
+        h = h * 17 + super.hashCode();
+        h = h * 17 + ( refreshDeletes ? 1 : 0 );
 
         if ( cookie != null )
         {
             for ( byte b : cookie )
             {
-                h = h*17 + b;
+                h = h * 17 + b;
             }
         }
 
@@ -138,9 +139,9 @@ public class SyncDoneValueImpl extends A
 
         SyncDoneValue otherControl = ( SyncDoneValue ) o;
 
-        return  ( refreshDeletes == otherControl.isRefreshDeletes() ) &&
-                ( Arrays.equals( cookie, otherControl.getCookie() ) &&
-                ( isCritical() == otherControl.isCritical() ) );
+        return ( refreshDeletes == otherControl.isRefreshDeletes() ) &&
+            ( Arrays.equals( cookie, otherControl.getCookie() ) &&
+            ( isCritical() == otherControl.isCritical() ) );
     }
 
 



Mime
View raw message