directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1235364 [26/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/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncRequestValueControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncRequestValueControlTest.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncRequestValueControlTest.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncRequestValueControlTest.java Tue Jan 24 17:27:00 2012
@@ -57,22 +57,31 @@ public class SyncRequestValueControlTest
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x0D );
         bb.put( new byte[]
-            { 
-            0x30, 0x0B,                     // syncRequestValue ::= SEQUENCE {
-              0x0A, 0x01, 0x01,             //     mode ENUMERATED {
-                                            //         refreshOnly (1)
-                                            //     }
-              0x04, 0x03, 'a', 'b', 'c',    //     cookie syncCookie OPTIONAL,
-              0x01, 0x01, 0x00              //     reloadHint BOOLEAN DEFAULT FALSE
-            } );
+            {
+                0x30, 0x0B, // syncRequestValue ::= SEQUENCE {
+                0x0A,
+                0x01,
+                0x01, //     mode ENUMERATED {
+                      //         refreshOnly (1)
+                      //     }
+                0x04,
+                0x03,
+                'a',
+                'b',
+                'c', //     cookie syncCookie OPTIONAL,
+                0x01,
+                0x01,
+                0x00 //     reloadHint BOOLEAN DEFAULT FALSE
+        } );
         bb.flip();
 
         SyncRequestValue decorator = new SyncRequestValueDecorator( codec );
-        
-        SyncRequestValue syncRequestValue = (SyncRequestValue)((SyncRequestValueDecorator)decorator).decode( bb.array() );
+
+        SyncRequestValue syncRequestValue = ( SyncRequestValue ) ( ( SyncRequestValueDecorator ) decorator ).decode( bb
+            .array() );
 
         assertEquals( SynchronizationModeEnum.REFRESH_ONLY, syncRequestValue.getMode() );
-        assertEquals( "abc", Strings.utf8ToString(syncRequestValue.getCookie()) );
+        assertEquals( "abc", Strings.utf8ToString( syncRequestValue.getCookie() ) );
         assertEquals( false, syncRequestValue.isReloadHint() );
 
         // Check the encoding
@@ -80,17 +89,24 @@ public class SyncRequestValueControlTest
         {
             bb = ByteBuffer.allocate( 0x0A );
             bb.put( new byte[]
-                { 
-                0x30, 0x08,                     // syncRequestValue ::= SEQUENCE {
-                  0x0A, 0x01, 0x01,             //     mode ENUMERATED {
-                                                //         refreshOnly (1)
-                                                //     }
-                  0x04, 0x03, 'a', 'b', 'c'     //     cookie syncCookie OPTIONAL,
-                } );
+                {
+                    0x30, 0x08, // syncRequestValue ::= SEQUENCE {
+                    0x0A,
+                    0x01,
+                    0x01, //     mode ENUMERATED {
+                          //         refreshOnly (1)
+                          //     }
+                    0x04,
+                    0x03,
+                    'a',
+                    'b',
+                    'c' //     cookie syncCookie OPTIONAL,
+            } );
             bb.flip();
 
-            ByteBuffer buffer = ((SyncRequestValueDecorator)syncRequestValue).encode( ByteBuffer.allocate( ((SyncRequestValueDecorator)syncRequestValue).computeLength() ) );
-            String decoded = Strings.dumpBytes( bb.array()) ;
+            ByteBuffer buffer = ( ( SyncRequestValueDecorator ) syncRequestValue ).encode( ByteBuffer
+                .allocate( ( ( SyncRequestValueDecorator ) syncRequestValue ).computeLength() ) );
+            String decoded = Strings.dumpBytes( bb.array() );
             String expected = Strings.dumpBytes( buffer.array() );
             assertEquals( expected, decoded );
         }
@@ -109,22 +125,31 @@ public class SyncRequestValueControlTest
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x0D );
         bb.put( new byte[]
-            { 
-            0x30, 0x0B,                     // syncRequestValue ::= SEQUENCE {
-              0x0A, 0x01, 0x03,             //     mode ENUMERATED {
-                                            //         refreshAndPersist (3)
-                                            //     }
-              0x04, 0x03, 'a', 'b', 'c',    //     cookie syncCookie OPTIONAL,
-              0x01, 0x01, 0x00              //     reloadHint BOOLEAN DEFAULT FALSE
-            } );
+            {
+                0x30, 0x0B, // syncRequestValue ::= SEQUENCE {
+                0x0A,
+                0x01,
+                0x03, //     mode ENUMERATED {
+                      //         refreshAndPersist (3)
+                      //     }
+                0x04,
+                0x03,
+                'a',
+                'b',
+                'c', //     cookie syncCookie OPTIONAL,
+                0x01,
+                0x01,
+                0x00 //     reloadHint BOOLEAN DEFAULT FALSE
+        } );
         bb.flip();
 
         SyncRequestValue decorator = new SyncRequestValueDecorator( codec );
-        
-        SyncRequestValue syncRequestValue = (SyncRequestValue)((SyncRequestValueDecorator)decorator).decode( bb.array() );
+
+        SyncRequestValue syncRequestValue = ( SyncRequestValue ) ( ( SyncRequestValueDecorator ) decorator ).decode( bb
+            .array() );
 
         assertEquals( SynchronizationModeEnum.REFRESH_AND_PERSIST, syncRequestValue.getMode() );
-        assertEquals( "abc", Strings.utf8ToString(syncRequestValue.getCookie()) );
+        assertEquals( "abc", Strings.utf8ToString( syncRequestValue.getCookie() ) );
         assertEquals( false, syncRequestValue.isReloadHint() );
 
         // Check the encoding
@@ -132,16 +157,23 @@ public class SyncRequestValueControlTest
         {
             ByteBuffer buffer = ByteBuffer.allocate( 0x0A );
             buffer.put( new byte[]
-                { 
-                  0x30, 0x08,                        // syncRequestValue ::= SEQUENCE {
-                    0x0A, 0x01, 0x03,                //     mode ENUMERATED {
-                                                     //         refreshAndPersist (3)
-                                                     //     }
-                    0x04, 0x03, 'a', 'b', 'c'        //     cookie syncCookie OPTIONAL,
-                } );
+                {
+                    0x30, 0x08, // syncRequestValue ::= SEQUENCE {
+                    0x0A,
+                    0x01,
+                    0x03, //     mode ENUMERATED {
+                          //         refreshAndPersist (3)
+                          //     }
+                    0x04,
+                    0x03,
+                    'a',
+                    'b',
+                    'c' //     cookie syncCookie OPTIONAL,
+            } );
             buffer.flip();
 
-            bb = ((SyncRequestValueDecorator)syncRequestValue).encode( ByteBuffer.allocate( ((SyncRequestValueDecorator)syncRequestValue).computeLength() ) );
+            bb = ( ( SyncRequestValueDecorator ) syncRequestValue ).encode( ByteBuffer
+                .allocate( ( ( SyncRequestValueDecorator ) syncRequestValue ).computeLength() ) );
             String decoded = Strings.dumpBytes( bb.array() );
             String expected = Strings.dumpBytes( buffer.array() );
             assertEquals( expected, decoded );
@@ -161,18 +193,23 @@ public class SyncRequestValueControlTest
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x08 );
         bb.put( new byte[]
-            { 
-            0x30, 0x06,                     // syncRequestValue ::= SEQUENCE {
-              0x0A, 0x01, 0x03,             //     mode ENUMERATED {
-                                            //         refreshAndPersist (3)
-                                            //     }
-              0x01, 0x01, 0x00              //     reloadHint BOOLEAN DEFAULT FALSE
-            } );
+            {
+                0x30, 0x06, // syncRequestValue ::= SEQUENCE {
+                0x0A,
+                0x01,
+                0x03, //     mode ENUMERATED {
+                      //         refreshAndPersist (3)
+                      //     }
+                0x01,
+                0x01,
+                0x00 //     reloadHint BOOLEAN DEFAULT FALSE
+        } );
         bb.flip();
 
-        SyncRequestValue decorator = new SyncRequestValueDecorator(  codec );
-        
-        SyncRequestValue syncRequestValue = (SyncRequestValue)((SyncRequestValueDecorator)decorator).decode( bb.array() );
+        SyncRequestValue decorator = new SyncRequestValueDecorator( codec );
+
+        SyncRequestValue syncRequestValue = ( SyncRequestValue ) ( ( SyncRequestValueDecorator ) decorator ).decode( bb
+            .array() );
 
         assertEquals( SynchronizationModeEnum.REFRESH_AND_PERSIST, syncRequestValue.getMode() );
         assertNull( syncRequestValue.getCookie() );
@@ -183,15 +220,18 @@ public class SyncRequestValueControlTest
         {
             bb = ByteBuffer.allocate( 0x05 );
             bb.put( new byte[]
-                { 
-                0x30, 0x03,                     // syncRequestValue ::= SEQUENCE {
-                  0x0A, 0x01, 0x03              //     mode ENUMERATED {
-                                                //         refreshAndPersist (3)
-                                                //     }
-                } );
+                {
+                    0x30, 0x03, // syncRequestValue ::= SEQUENCE {
+                    0x0A,
+                    0x01,
+                    0x03 //     mode ENUMERATED {
+                         //         refreshAndPersist (3)
+                         //     }
+            } );
             bb.flip();
-            
-            ByteBuffer buffer = ((SyncRequestValueDecorator)syncRequestValue).encode( ByteBuffer.allocate( ((SyncRequestValueDecorator)syncRequestValue).computeLength() ) );
+
+            ByteBuffer buffer = ( ( SyncRequestValueDecorator ) syncRequestValue ).encode( ByteBuffer
+                .allocate( ( ( SyncRequestValueDecorator ) syncRequestValue ).computeLength() ) );
             String decoded = Strings.dumpBytes( buffer.array() );
             String expected = Strings.dumpBytes( bb.array() );
             assertEquals( expected, decoded );
@@ -212,18 +252,23 @@ public class SyncRequestValueControlTest
     {
         ByteBuffer buffer = ByteBuffer.allocate( 0x08 );
         buffer.put( new byte[]
-            { 
-            0x30, 0x06,                     // syncRequestValue ::= SEQUENCE {
-              0x0A, 0x01, 0x03,             //     mode ENUMERATED {
-                                            //         refreshAndPersist (3)
-                                            //     }
-              0x01, 0x01, (byte)0xFF        //     reloadHint BOOLEAN DEFAULT FALSE
-            } );
+            {
+                0x30, 0x06, // syncRequestValue ::= SEQUENCE {
+                0x0A,
+                0x01,
+                0x03, //     mode ENUMERATED {
+                      //         refreshAndPersist (3)
+                      //     }
+                0x01,
+                0x01,
+                ( byte ) 0xFF //     reloadHint BOOLEAN DEFAULT FALSE
+        } );
         buffer.flip();
 
         SyncRequestValue decorator = new SyncRequestValueDecorator( codec );
-        
-        SyncRequestValue syncRequestValue = (SyncRequestValue)((SyncRequestValueDecorator)decorator).decode( buffer.array() );
+
+        SyncRequestValue syncRequestValue = ( SyncRequestValue ) ( ( SyncRequestValueDecorator ) decorator )
+            .decode( buffer.array() );
 
         assertEquals( SynchronizationModeEnum.REFRESH_AND_PERSIST, syncRequestValue.getMode() );
         assertNull( syncRequestValue.getCookie() );
@@ -232,7 +277,8 @@ public class SyncRequestValueControlTest
         // Check the encoding
         try
         {
-            ByteBuffer bb = ((SyncRequestValueDecorator)syncRequestValue).encode( ByteBuffer.allocate( ((SyncRequestValueDecorator)syncRequestValue).computeLength() ) );
+            ByteBuffer bb = ( ( SyncRequestValueDecorator ) syncRequestValue ).encode( ByteBuffer
+                .allocate( ( ( SyncRequestValueDecorator ) syncRequestValue ).computeLength() ) );
             String decoded = Strings.dumpBytes( bb.array() );
             String expected = Strings.dumpBytes( buffer.array() );
             assertEquals( expected, decoded );
@@ -253,17 +299,20 @@ public class SyncRequestValueControlTest
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x05 );
         bb.put( new byte[]
-            { 
-            0x30, 0x03,                     // syncRequestValue ::= SEQUENCE {
-              0x0A, 0x01, 0x03              //     mode ENUMERATED {
-                                            //         refreshAndPersist (3)
-                                            //     }
-            } );
+            {
+                0x30, 0x03, // syncRequestValue ::= SEQUENCE {
+                0x0A,
+                0x01,
+                0x03 //     mode ENUMERATED {
+                     //         refreshAndPersist (3)
+                     //     }
+        } );
         bb.flip();
 
         SyncRequestValue decorator = new SyncRequestValueDecorator( codec );
-        
-        SyncRequestValue syncRequestValue = (SyncRequestValue)((SyncRequestValueDecorator)decorator).decode( bb.array() );
+
+        SyncRequestValue syncRequestValue = ( SyncRequestValue ) ( ( SyncRequestValueDecorator ) decorator ).decode( bb
+            .array() );
 
         assertEquals( SynchronizationModeEnum.REFRESH_AND_PERSIST, syncRequestValue.getMode() );
         assertNull( syncRequestValue.getCookie() );
@@ -272,7 +321,8 @@ public class SyncRequestValueControlTest
         // Check the encoding
         try
         {
-            ByteBuffer buffer = ((SyncRequestValueDecorator)syncRequestValue).encode( ByteBuffer.allocate( ((SyncRequestValueDecorator)syncRequestValue).computeLength() ) );
+            ByteBuffer buffer = ( ( SyncRequestValueDecorator ) syncRequestValue ).encode( ByteBuffer
+                .allocate( ( ( SyncRequestValueDecorator ) syncRequestValue ).computeLength() ) );
             String decoded = Strings.dumpBytes( buffer.array() );
             String expected = Strings.dumpBytes( bb.array() );
             assertEquals( expected, decoded );
@@ -292,27 +342,35 @@ public class SyncRequestValueControlTest
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x0A );
         bb.put( new byte[]
-            { 
-            0x30, 0x08,                     // syncRequestValue ::= SEQUENCE {
-              0x0A, 0x01, 0x03,             //     mode ENUMERATED {
-                                            //         refreshAndPersist (3)
-                                            //     }
-              0x04, 0x03, 'a', 'b', 'c'     //     cookie syncCookie OPTIONAL,
-            } );
+            {
+                0x30, 0x08, // syncRequestValue ::= SEQUENCE {
+                0x0A,
+                0x01,
+                0x03, //     mode ENUMERATED {
+                      //         refreshAndPersist (3)
+                      //     }
+                0x04,
+                0x03,
+                'a',
+                'b',
+                'c' //     cookie syncCookie OPTIONAL,
+        } );
         bb.flip();
 
         SyncRequestValue decorator = new SyncRequestValueDecorator( codec );
-        
-        SyncRequestValue syncRequestValue = (SyncRequestValue)((SyncRequestValueDecorator)decorator).decode( bb.array() );
+
+        SyncRequestValue syncRequestValue = ( SyncRequestValue ) ( ( SyncRequestValueDecorator ) decorator ).decode( bb
+            .array() );
 
         assertEquals( SynchronizationModeEnum.REFRESH_AND_PERSIST, syncRequestValue.getMode() );
-        assertEquals( "abc", Strings.utf8ToString(syncRequestValue.getCookie()) );
+        assertEquals( "abc", Strings.utf8ToString( syncRequestValue.getCookie() ) );
         assertEquals( false, syncRequestValue.isReloadHint() );
 
         // Check the encoding
         try
         {
-            ByteBuffer buffer = ((SyncRequestValueDecorator)syncRequestValue).encode( ByteBuffer.allocate( ((SyncRequestValueDecorator)syncRequestValue).computeLength() ) );
+            ByteBuffer buffer = ( ( SyncRequestValueDecorator ) syncRequestValue ).encode( ByteBuffer
+                .allocate( ( ( SyncRequestValueDecorator ) syncRequestValue ).computeLength() ) );
             String decoded = Strings.dumpBytes( buffer.array() );
             String expected = Strings.dumpBytes( bb.array() );
             assertEquals( expected, decoded );
@@ -332,21 +390,25 @@ public class SyncRequestValueControlTest
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x07 );
         bb.put( new byte[]
-            { 
-            0x30, 0x05,                     // syncRequestValue ::= SEQUENCE {
-              0x0A, 0x01, 0x03,             //     mode ENUMERATED {
-                                            //         refreshAndPersist (3)
-                                            //     }
-              0x04, 0x00,                   //     cookie syncCookie OPTIONAL,
+            {
+                0x30, 0x05, // syncRequestValue ::= SEQUENCE {
+                0x0A,
+                0x01,
+                0x03, //     mode ENUMERATED {
+                      //         refreshAndPersist (3)
+                      //     }
+                0x04,
+                0x00, //     cookie syncCookie OPTIONAL,
             } );
         bb.flip();
 
         SyncRequestValue decorator = new SyncRequestValueDecorator( codec );
-        
-        SyncRequestValue syncRequestValue = (SyncRequestValue)((SyncRequestValueDecorator)decorator).decode( bb.array() );
+
+        SyncRequestValue syncRequestValue = ( SyncRequestValue ) ( ( SyncRequestValueDecorator ) decorator ).decode( bb
+            .array() );
 
         assertEquals( SynchronizationModeEnum.REFRESH_AND_PERSIST, syncRequestValue.getMode() );
-        assertEquals( "", Strings.utf8ToString(syncRequestValue.getCookie()) );
+        assertEquals( "", Strings.utf8ToString( syncRequestValue.getCookie() ) );
         assertEquals( false, syncRequestValue.isReloadHint() );
 
         // Check the encoding
@@ -354,15 +416,18 @@ public class SyncRequestValueControlTest
         {
             bb = ByteBuffer.allocate( 0x05 );
             bb.put( new byte[]
-                { 
-                0x30, 0x03,                     // syncRequestValue ::= SEQUENCE {
-                  0x0A, 0x01, 0x03              //     mode ENUMERATED {
-                                                //         refreshAndPersist (3)
-                                                //     }
-                } );
+                {
+                    0x30, 0x03, // syncRequestValue ::= SEQUENCE {
+                    0x0A,
+                    0x01,
+                    0x03 //     mode ENUMERATED {
+                         //         refreshAndPersist (3)
+                         //     }
+            } );
             bb.flip();
 
-            ByteBuffer buffer = ((SyncRequestValueDecorator)syncRequestValue).encode( ByteBuffer.allocate( ((SyncRequestValueDecorator)syncRequestValue).computeLength() ) );
+            ByteBuffer buffer = ( ( SyncRequestValueDecorator ) syncRequestValue ).encode( ByteBuffer
+                .allocate( ( ( SyncRequestValueDecorator ) syncRequestValue ).computeLength() ) );
             String decoded = Strings.dumpBytes( buffer.array() );
             String expected = Strings.dumpBytes( bb.array() );
             assertEquals( expected, decoded );
@@ -382,16 +447,16 @@ public class SyncRequestValueControlTest
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x02 );
         bb.put( new byte[]
-            { 
-            0x30, 0x00                      // syncRequestValue ::= SEQUENCE {
-            } );
+            {
+                0x30, 0x00 // syncRequestValue ::= SEQUENCE {
+        } );
         bb.flip();
 
         SyncRequestValue decorator = new SyncRequestValueDecorator( codec );
-        
+
         try
         {
-            ((SyncRequestValueDecorator)decorator).decode( bb.array() );
+            ( ( SyncRequestValueDecorator ) decorator ).decode( bb.array() );
             fail( "we should not get there" );
         }
         catch ( DecoderException de )
@@ -409,17 +474,21 @@ public class SyncRequestValueControlTest
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x07 );
         bb.put( new byte[]
-            { 
-            0x30, 0x05,                     // syncRequestValue ::= SEQUENCE {
-              0x04, 0x03, 'a', 'b', 'c'     //     cookie syncCookie OPTIONAL,
-            } );
+            {
+                0x30, 0x05, // syncRequestValue ::= SEQUENCE {
+                0x04,
+                0x03,
+                'a',
+                'b',
+                'c' //     cookie syncCookie OPTIONAL,
+        } );
         bb.flip();
 
         SyncRequestValue decorator = new SyncRequestValueDecorator( codec );
-        
+
         try
         {
-            ((SyncRequestValueDecorator)decorator).decode( bb.array() );
+            ( ( SyncRequestValueDecorator ) decorator ).decode( bb.array() );
             fail( "we should not get there" );
         }
         catch ( DecoderException de )

Modified: directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueControlTest.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueControlTest.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueControlTest.java Tue Jan 24 17:27:00 2012
@@ -56,28 +56,41 @@ public class SyncStateValueControlTest e
     {
         ByteBuffer bb = ByteBuffer.allocate( 16 );
         bb.put( new byte[]
-            { 
-              0x30, ( byte ) 14,               // SyncStateValue ::= SEQUENCE {
-                0x0A, 0x01, 0x00,              //     state ENUMERATED {
-                                               //         present (0)
-                                               //     }
-                0x04, 0x03, 'a', 'b', 'c',     //     entryUUID syncUUID OPTIONAL,
-                0x04, 0x04, 'x', 'k', 'c', 'd' //     cookie syncCookie OPTIONAL,
-            } );
+            {
+                0x30, ( byte ) 14, // SyncStateValue ::= SEQUENCE {
+                0x0A,
+                0x01,
+                0x00, //     state ENUMERATED {
+                      //         present (0)
+                      //     }
+                0x04,
+                0x03,
+                'a',
+                'b',
+                'c', //     entryUUID syncUUID OPTIONAL,
+                0x04,
+                0x04,
+                'x',
+                'k',
+                'c',
+                'd' //     cookie syncCookie OPTIONAL,
+        } );
         bb.flip();
 
         SyncStateValue decorator = new SyncStateValueDecorator( codec );
 
-        SyncStateValue syncStateValue = (SyncStateValue)((SyncStateValueDecorator)decorator).decode( bb.array() );
+        SyncStateValue syncStateValue = ( SyncStateValue ) ( ( SyncStateValueDecorator ) decorator )
+            .decode( bb.array() );
 
         assertEquals( SyncStateTypeEnum.PRESENT, syncStateValue.getSyncStateType() );
-        assertEquals( "abc", Strings.utf8ToString(syncStateValue.getEntryUUID()) );
-        assertEquals( "xkcd", Strings.utf8ToString(syncStateValue.getCookie()) );
+        assertEquals( "abc", Strings.utf8ToString( syncStateValue.getEntryUUID() ) );
+        assertEquals( "xkcd", Strings.utf8ToString( syncStateValue.getCookie() ) );
 
         // Check the encoding
         try
         {
-            ByteBuffer encoded = ((SyncStateValueDecorator)syncStateValue).encode( ByteBuffer.allocate( ((SyncStateValueDecorator)syncStateValue).computeLength() ) );
+            ByteBuffer encoded = ( ( SyncStateValueDecorator ) syncStateValue ).encode( ByteBuffer
+                .allocate( ( ( SyncStateValueDecorator ) syncStateValue ).computeLength() ) );
             assertEquals( Strings.dumpBytes( bb.array() ), Strings.dumpBytes( encoded.array() ) );
         }
         catch ( EncoderException ee )
@@ -95,26 +108,34 @@ public class SyncStateValueControlTest e
     {
         ByteBuffer bb = ByteBuffer.allocate( 10 );
         bb.put( new byte[]
-            { 0x30, 0x08,                 // SyncStateValue ::= SEQUENCE {
-                0x0A, 0x01, 0x01,         //     state ENUMERATED {
-                                          //         add (1)
-                                          //     }
-                0x04, 0x03, 'a', 'b', 'c' //     entryUUID syncUUID OPTIONAL
-            } );
+            { 0x30, 0x08, // SyncStateValue ::= SEQUENCE {
+                0x0A,
+                0x01,
+                0x01, //     state ENUMERATED {
+                      //         add (1)
+                      //     }
+                0x04,
+                0x03,
+                'a',
+                'b',
+                'c' //     entryUUID syncUUID OPTIONAL
+        } );
         bb.flip();
 
         SyncStateValue decorator = new SyncStateValueDecorator( codec );
 
-        SyncStateValue syncStateValue = (SyncStateValue)((SyncStateValueDecorator)decorator).decode( bb.array() );
+        SyncStateValue syncStateValue = ( SyncStateValue ) ( ( SyncStateValueDecorator ) decorator )
+            .decode( bb.array() );
 
         assertEquals( SyncStateTypeEnum.ADD, syncStateValue.getSyncStateType() );
-        assertEquals( "abc", Strings.utf8ToString(syncStateValue.getEntryUUID()) );
+        assertEquals( "abc", Strings.utf8ToString( syncStateValue.getEntryUUID() ) );
         assertNull( syncStateValue.getCookie() );
 
         // Check the encoding
         try
         {
-            ByteBuffer encoded = ((SyncStateValueDecorator)syncStateValue).encode( ByteBuffer.allocate( ((SyncStateValueDecorator)syncStateValue).computeLength() ) );
+            ByteBuffer encoded = ( ( SyncStateValueDecorator ) syncStateValue ).encode( ByteBuffer
+                .allocate( ( ( SyncStateValueDecorator ) syncStateValue ).computeLength() ) );
             assertEquals( Strings.dumpBytes( bb.array() ), Strings.dumpBytes( encoded.array() ) );
         }
         catch ( EncoderException ee )
@@ -132,37 +153,52 @@ public class SyncStateValueControlTest e
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x0C );
         bb.put( new byte[]
-            { 0x30, 0x0A,                  // SyncStateValue ::= SEQUENCE {
-                0x0A, 0x01, 0x02,          //     state ENUMERATED {
-                                           //         modify (2)
-                                           //     }
-                0x04, 0x03, 'a', 'b', 'c', //     entryUUID syncUUID OPTIONAL
-                0x04, 0x00                 //     cookie syncCookie OPTIONAL,
-            } );
+            { 0x30, 0x0A, // SyncStateValue ::= SEQUENCE {
+                0x0A,
+                0x01,
+                0x02, //     state ENUMERATED {
+                      //         modify (2)
+                      //     }
+                0x04,
+                0x03,
+                'a',
+                'b',
+                'c', //     entryUUID syncUUID OPTIONAL
+                0x04,
+                0x00 //     cookie syncCookie OPTIONAL,
+        } );
         bb.flip();
 
         SyncStateValue decorator = new SyncStateValueDecorator( codec );
 
-        SyncStateValue syncStateValue = (SyncStateValue)((SyncStateValueDecorator)decorator).decode( bb.array() );
+        SyncStateValue syncStateValue = ( SyncStateValue ) ( ( SyncStateValueDecorator ) decorator )
+            .decode( bb.array() );
 
         assertEquals( SyncStateTypeEnum.MODIFY, syncStateValue.getSyncStateType() );
-        assertEquals( "abc", Strings.utf8ToString(syncStateValue.getEntryUUID()) );
-        assertEquals( "", Strings.utf8ToString(syncStateValue.getCookie()) );
+        assertEquals( "abc", Strings.utf8ToString( syncStateValue.getEntryUUID() ) );
+        assertEquals( "", Strings.utf8ToString( syncStateValue.getCookie() ) );
 
         // Check the encoding
         try
         {
             bb = ByteBuffer.allocate( 0x0A );
             bb.put( new byte[]
-                { 0x30, 0x08,                  // SyncStateValue ::= SEQUENCE {
-                    0x0A, 0x01, 0x02,          //     state ENUMERATED {
-                                               //         modify (2)
-                                               //     }
-                    0x04, 0x03, 'a', 'b', 'c'  //     entryUUID syncUUID OPTIONAL
-                } );
+                { 0x30, 0x08, // SyncStateValue ::= SEQUENCE {
+                    0x0A,
+                    0x01,
+                    0x02, //     state ENUMERATED {
+                          //         modify (2)
+                          //     }
+                    0x04,
+                    0x03,
+                    'a',
+                    'b',
+                    'c' //     entryUUID syncUUID OPTIONAL
+            } );
             bb.flip();
 
-            ByteBuffer encoded = ((SyncStateValueDecorator)syncStateValue).encode( ByteBuffer.allocate( ((SyncStateValueDecorator)syncStateValue).computeLength() ) );
+            ByteBuffer encoded = ( ( SyncStateValueDecorator ) syncStateValue ).encode( ByteBuffer
+                .allocate( ( ( SyncStateValueDecorator ) syncStateValue ).computeLength() ) );
             assertEquals( Strings.dumpBytes( bb.array() ), Strings.dumpBytes( encoded.array() ) );
         }
         catch ( EncoderException ee )
@@ -175,64 +211,70 @@ public class SyncStateValueControlTest e
     /**
      * Test the decoding of a SyncStateValue control with an empty sequence
      */
-    @Test( expected = DecoderException.class )
+    @Test(expected = DecoderException.class)
     public void testDecodeSyncStateValueControlEmptySequence() throws Exception
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x02 );
         bb.put( new byte[]
-            { 
-              0x30, 0x00 // SyncStateValue ::= SEQUENCE {
-            } );
+            {
+                0x30, 0x00 // SyncStateValue ::= SEQUENCE {
+        } );
         bb.flip();
 
         SyncStateValue decorator = new SyncStateValueDecorator( codec );
 
-        ((SyncStateValueDecorator)decorator).decode( bb.array() );
+        ( ( SyncStateValueDecorator ) decorator ).decode( bb.array() );
     }
 
 
     /**
      * Test the decoding of a SyncStateValue control with no syncState
      */
-    @Test( expected=DecoderException.class )
+    @Test(expected = DecoderException.class)
     public void testDecodeSyncStateValueControlNoSyancState() throws Exception
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x07 );
         bb.put( new byte[]
-            { 
-              0x30, 0x05,                 // SyncStateValue ::= SEQUENCE {
-                0x04, 0x03, 'a', 'b', 'c' //     cookie syncCookie OPTIONAL,
-            } );
+            {
+                0x30, 0x05, // SyncStateValue ::= SEQUENCE {
+                0x04,
+                0x03,
+                'a',
+                'b',
+                'c' //     cookie syncCookie OPTIONAL,
+        } );
         bb.flip();
 
         SyncStateValue decorator = new SyncStateValueDecorator( codec );
 
-        ((SyncStateValueDecorator)decorator).decode( bb.array() );
+        ( ( SyncStateValueDecorator ) decorator ).decode( bb.array() );
     }
 
 
     /**
      * Test the decoding of a SyncStateValue control with no syncUUID
      */
-    @Test( expected=DecoderException.class )
+    @Test(expected = DecoderException.class)
     public void testDecodeSyncStateValueControlNoSyncUUID() throws Exception
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x05 );
         bb.put( new byte[]
-            { 
-              0x30, 0x03,                  // SyncStateValue ::= SEQUENCE {
-                0x0A, 0x01, 0x02,          //     state ENUMERATED {
-                                           //         modify (2)
-                                           //     }
+            {
+                0x30, 0x03, // SyncStateValue ::= SEQUENCE {
+                0x0A,
+                0x01,
+                0x02, //     state ENUMERATED {
+                      //         modify (2)
+                      //     }
             } );
         bb.flip();
 
         SyncStateValue decorator = new SyncStateValueDecorator( codec );
 
-        ((SyncStateValueDecorator)decorator).decode( bb.array() );
+        ( ( SyncStateValueDecorator ) decorator ).decode( bb.array() );
     }
-    
-    
+
+
     /**
      * Test the decoding of a SyncStateValue control with a refreshOnly mode
      * and MODDN state type
@@ -242,28 +284,41 @@ public class SyncStateValueControlTest e
     {
         ByteBuffer bb = ByteBuffer.allocate( 16 );
         bb.put( new byte[]
-            { 
-              0x30, ( byte ) 14,               // SyncStateValue ::= SEQUENCE {
-                0x0A, 0x01, 0x04,              //     state ENUMERATED {
-                                               //         present (0)
-                                               //     }
-                0x04, 0x03, 'a', 'b', 'c',     //     entryUUID syncUUID OPTIONAL,
-                0x04, 0x04, 'x', 'k', 'c', 'd' //     cookie syncCookie OPTIONAL,
-            } );
+            {
+                0x30, ( byte ) 14, // SyncStateValue ::= SEQUENCE {
+                0x0A,
+                0x01,
+                0x04, //     state ENUMERATED {
+                      //         present (0)
+                      //     }
+                0x04,
+                0x03,
+                'a',
+                'b',
+                'c', //     entryUUID syncUUID OPTIONAL,
+                0x04,
+                0x04,
+                'x',
+                'k',
+                'c',
+                'd' //     cookie syncCookie OPTIONAL,
+        } );
         bb.flip();
 
         SyncStateValue decorator = new SyncStateValueDecorator( codec );
 
-        SyncStateValue syncStateValue = (SyncStateValue)((SyncStateValueDecorator)decorator).decode( bb.array() );
+        SyncStateValue syncStateValue = ( SyncStateValue ) ( ( SyncStateValueDecorator ) decorator )
+            .decode( bb.array() );
 
         assertEquals( SyncStateTypeEnum.MODDN, syncStateValue.getSyncStateType() );
-        assertEquals( "abc", Strings.utf8ToString(syncStateValue.getEntryUUID()) );
-        assertEquals( "xkcd", Strings.utf8ToString(syncStateValue.getCookie()) );
+        assertEquals( "abc", Strings.utf8ToString( syncStateValue.getEntryUUID() ) );
+        assertEquals( "xkcd", Strings.utf8ToString( syncStateValue.getCookie() ) );
 
         // Check the encoding
         try
         {
-            ByteBuffer encoded = ((SyncStateValueDecorator)syncStateValue).encode( ByteBuffer.allocate( ((SyncStateValueDecorator)syncStateValue).computeLength() ) );
+            ByteBuffer encoded = ( ( SyncStateValueDecorator ) syncStateValue ).encode( ByteBuffer
+                .allocate( ( ( SyncStateValueDecorator ) syncStateValue ).computeLength() ) );
             assertEquals( Strings.dumpBytes( bb.array() ), Strings.dumpBytes( encoded.array() ) );
         }
         catch ( EncoderException ee )

Modified: directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/CancelRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/CancelRequestTest.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/CancelRequestTest.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/CancelRequestTest.java Tue Jan 24 17:27:00 2012
@@ -64,10 +64,10 @@ public class CancelRequestTest
         stream.put( new byte[]
             {
                 0x30, 0x03,
-                    0x02, 0x01, 0x01
-            } ).flip();
+                0x02, 0x01, 0x01
+        } ).flip();
 
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        String decodedPdu = Strings.dumpBytes( stream.array() );
 
         // Allocate a Cancel Container
         Asn1Container cancelContainer = new CancelContainer();
@@ -92,7 +92,7 @@ public class CancelRequestTest
         {
             ByteBuffer bb = cancel.encode();
 
-            String encodedPdu = Strings.dumpBytes(bb.array());
+            String encodedPdu = Strings.dumpBytes( bb.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -103,7 +103,7 @@ public class CancelRequestTest
         }
     }
 
-    
+
     /**
      * Test a Cancel message with no cancelId
      */
@@ -117,11 +117,11 @@ public class CancelRequestTest
         stream.put( new byte[]
             {
                 0x30, 0x00
-            } ).flip();
+        } ).flip();
 
         // Allocate a Cancel Container
         Asn1Container cancelContainer = new CancelContainer();
-        
+
         // Decode a Cancel message
         try
         {
@@ -134,7 +134,7 @@ public class CancelRequestTest
         }
     }
 
-    
+
     /**
      * Test a Cancel message with an empty cancelId
      */
@@ -148,8 +148,8 @@ public class CancelRequestTest
         stream.put( new byte[]
             {
                 0x30, 0x02,
-                  0x02, 0x00
-            } ).flip();
+                0x02, 0x00
+        } ).flip();
 
         // Allocate a Cancel Container
         Asn1Container cancelContainer = new CancelContainer();
@@ -166,7 +166,7 @@ public class CancelRequestTest
         }
     }
 
-    
+
     /**
      * Test a Cancel message with a bad cancelId
      */
@@ -180,8 +180,8 @@ public class CancelRequestTest
         stream.put( new byte[]
             {
                 0x30, 0x06,
-                  0x02, 0x04, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF
-            } ).flip();
+                0x02, 0x04, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF
+        } ).flip();
 
         // Allocate a Cancel Container
         Asn1Container cancelContainer = new CancelContainer();
@@ -198,7 +198,7 @@ public class CancelRequestTest
         }
     }
 
-    
+
     /**
      * Test a Cancel message with more than one cancelId
      */
@@ -212,9 +212,9 @@ public class CancelRequestTest
         stream.put( new byte[]
             {
                 0x30, 0x06,
-                  0x02, 0x01, 0x01,
-                  0x02, 0x01, 0x02
-            } ).flip();
+                0x02, 0x01, 0x01,
+                0x02, 0x01, 0x02
+        } ).flip();
 
         // Allocate a Cancel Container
         Asn1Container cancelContainer = new CancelContainer();

Modified: directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/CertGenerationRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/CertGenerationRequestTest.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/CertGenerationRequestTest.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/CertGenerationRequestTest.java Tue Jan 24 17:27:00 2012
@@ -107,7 +107,7 @@ public class CertGenerationRequestTest
             fail( e.getMessage() );
         }
 
-        CertGenerationRequestDecorator req = new CertGenerationRequestDecorator( 
+        CertGenerationRequestDecorator req = new CertGenerationRequestDecorator(
             LdapApiServiceFactory.getSingleton(), new CertGenerationRequestImpl() );
         req = container.getCertGenerationObject();
         assertEquals( dn, req.getTargetDN() );
@@ -142,7 +142,9 @@ public class CertGenerationRequestTest
 
         bb.put( new byte[]
             { 0x30, 0x03, // CertGenerateObject ::= SEQUENCE {
-              0x04, 0x01, ' ' } ); // empty targetDN value
+                0x04,
+                0x01,
+                ' ' } ); // empty targetDN value
 
         bb.flip();
 
@@ -157,14 +159,19 @@ public class CertGenerationRequestTest
         {
             assertTrue( true );
         }
-                
+
         String dn = "=sys";
 
         bb = ByteBuffer.allocate( dn.length() + 2 + 2 );
 
         bb.put( new byte[]
-            { 0x30, ( byte )( dn.length() + 2 ), // CertGenerateObject ::= SEQUENCE {
-              0x04, ( byte ) dn.length(), '=', 's', 'y', 's' } ); // empty targetDN value
+            { 0x30, ( byte ) ( dn.length() + 2 ), // CertGenerateObject ::= SEQUENCE {
+                0x04,
+                ( byte ) dn.length(),
+                '=',
+                's',
+                'y',
+                's' } ); // empty targetDN value
 
         bb.flip();
 
@@ -179,19 +186,26 @@ public class CertGenerationRequestTest
         }
 
     }
-    
-    
+
+
     @Test
     public void testCertGenerationDecodeIssuerDN()
     {
         Asn1Decoder decoder = new Asn1Decoder();
-        
+
         ByteBuffer bb = ByteBuffer.allocate( 11 );
 
         bb.put( new byte[]
             { 0x30, 0x09, // CertGenerateObject ::= SEQUENCE {
-              0x04, 0x04, 'c', 'n', '=', 'x', // target Dn string
-              0x04, 0x01, ' '} ); // empty issuer Dn
+                0x04,
+                0x04,
+                'c',
+                'n',
+                '=',
+                'x', // target Dn string
+                0x04,
+                0x01,
+                ' ' } ); // empty issuer Dn
 
         CertGenerationContainer container = new CertGenerationContainer();
         bb.flip();
@@ -206,13 +220,20 @@ public class CertGenerationRequestTest
             assertTrue( true );
         }
 
-
         bb = ByteBuffer.allocate( 12 );
 
         bb.put( new byte[]
-                         { 0x30, 0x10, // CertGenerateObject ::= SEQUENCE {
-                           0x04, 0x04, 'c', 'n', '=', 'x', // target Dn string
-                           0x04, 0x02, '=', 'x' } ); // empty issuer Dn
+            { 0x30, 0x10, // CertGenerateObject ::= SEQUENCE {
+                0x04,
+                0x04,
+                'c',
+                'n',
+                '=',
+                'x', // target Dn string
+                0x04,
+                0x02,
+                '=',
+                'x' } ); // empty issuer Dn
 
         bb.flip();
 
@@ -232,14 +253,26 @@ public class CertGenerationRequestTest
     public void testCertGenerationDecodeWithoutSubjectDN()
     {
         Asn1Decoder decoder = new Asn1Decoder();
-        
+
         ByteBuffer bb = ByteBuffer.allocate( 17 );
 
         bb.put( new byte[]
             { 0x30, 0x15, // CertGenerateObject ::= SEQUENCE {
-              0x04, 0x04, 'c', 'n', '=', 'x', // target Dn string
-              0x04, 0x04, 'c', 'n', '=', 'x', // issuer Dn
-              0x04, 0x01, ' ' } ); // empty subject Dn
+                0x04,
+                0x04,
+                'c',
+                'n',
+                '=',
+                'x', // target Dn string
+                0x04,
+                0x04,
+                'c',
+                'n',
+                '=',
+                'x', // issuer Dn
+                0x04,
+                0x01,
+                ' ' } ); // empty subject Dn
 
         CertGenerationContainer container = new CertGenerationContainer();
         bb.flip();
@@ -254,14 +287,26 @@ public class CertGenerationRequestTest
             assertTrue( true );
         }
 
-
         bb = ByteBuffer.allocate( 18 );
 
         bb.put( new byte[]
-                         { 0x30, 0x16, // CertGenerateObject ::= SEQUENCE {
-                           0x04, 0x04, 'c', 'n', '=', 'x', // target Dn string
-                           0x04, 0x04, 'c', 'n', '=', 'x', // issuer Dn
-                           0x04, 0x02, '=', 'x' } ); // invalid subject Dn
+            { 0x30, 0x16, // CertGenerateObject ::= SEQUENCE {
+                0x04,
+                0x04,
+                'c',
+                'n',
+                '=',
+                'x', // target Dn string
+                0x04,
+                0x04,
+                'c',
+                'n',
+                '=',
+                'x', // issuer Dn
+                0x04,
+                0x02,
+                '=',
+                'x' } ); // invalid subject Dn
 
         bb.flip();
 
@@ -275,17 +320,17 @@ public class CertGenerationRequestTest
             assertTrue( true );
         }
     }
-    
-    
+
+
     @Test
     public void testDecodeEmptySequence()
     {
         Asn1Decoder decoder = new Asn1Decoder();
-        
+
         ByteBuffer bb = ByteBuffer.allocate( 2 );
 
         bb.put( new byte[]
-            { 0x30, 0x00 }); // CertGenerateObject ::= SEQUENCE {
+            { 0x30, 0x00 } ); // CertGenerateObject ::= SEQUENCE {
 
         CertGenerationContainer container = new CertGenerationContainer();
         bb.flip();

Modified: directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/GracefulDisconnectTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/GracefulDisconnectTest.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/GracefulDisconnectTest.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/GracefulDisconnectTest.java Tue Jan 24 17:27:00 2012
@@ -59,19 +59,121 @@ public class GracefulDisconnectTest
         ByteBuffer stream = ByteBuffer.allocate( 0x70 );
         stream.put( new byte[]
             { 0x30, 0x6E, // GracefulDisconnec ::= SEQUENCE {
-                0x02, 0x01, 0x01, // timeOffline INTEGER (0..720) DEFAULT 0,
-                ( byte ) 0x80, 0x01, 0x01, // delay INTEGER (0..86400) DEFAULT
-                                            // 0
+                0x02,
+                0x01,
+                0x01, // timeOffline INTEGER (0..720) DEFAULT 0,
+                ( byte ) 0x80,
+                0x01,
+                0x01, // delay INTEGER (0..86400) DEFAULT
+                      // 0
                 // replicatedContexts Referral OPTIONAL
-                0x30, 0x66, 0x04, 0x1F, 'l', 'd', 'a', 'p', ':', '/', '/', 'd', 'i', 'r', 'e', 'c', 't', 'o', 'r', 'y',
-                '.', 'a', 'p', 'a', 'c', 'h', 'e', '.', 'o', 'r', 'g', ':', '8', '0', '/', 0x04, 0x43, 'l', 'd', 'a',
-                'p', ':', '/', '/', 'l', 'd', 'a', 'p', '.', 'n', 'e', 't', 's', 'c', 'a', 'p', 'e', '.', 'c', 'o',
-                'm', '/', 'o', '=', 'B', 'a', 'b', 's', 'c', 'o', ',', 'c', '=', 'U', 'S', '?', '?', '?', '(', 'i',
-                'n', 't', '=', '%', '5', 'c', '0', '0', '%', '5', 'c', '0', '0', '%', '5', 'c', '0', '0', '%', '5',
-                'c', '0', '4', ')'
+                0x30,
+                0x66,
+                0x04,
+                0x1F,
+                'l',
+                'd',
+                'a',
+                'p',
+                ':',
+                '/',
+                '/',
+                'd',
+                'i',
+                'r',
+                'e',
+                'c',
+                't',
+                'o',
+                'r',
+                'y',
+                '.',
+                'a',
+                'p',
+                'a',
+                'c',
+                'h',
+                'e',
+                '.',
+                'o',
+                'r',
+                'g',
+                ':',
+                '8',
+                '0',
+                '/',
+                0x04,
+                0x43,
+                'l',
+                'd',
+                'a',
+                'p',
+                ':',
+                '/',
+                '/',
+                'l',
+                'd',
+                'a',
+                'p',
+                '.',
+                'n',
+                'e',
+                't',
+                's',
+                'c',
+                'a',
+                'p',
+                'e',
+                '.',
+                'c',
+                'o',
+                'm',
+                '/',
+                'o',
+                '=',
+                'B',
+                'a',
+                'b',
+                's',
+                'c',
+                'o',
+                ',',
+                'c',
+                '=',
+                'U',
+                'S',
+                '?',
+                '?',
+                '?',
+                '(',
+                'i',
+                'n',
+                't',
+                '=',
+                '%',
+                '5',
+                'c',
+                '0',
+                '0',
+                '%',
+                '5',
+                'c',
+                '0',
+                '0',
+                '%',
+                '5',
+                'c',
+                '0',
+                '0',
+                '%',
+                '5',
+                'c',
+                '0',
+                '4',
+                ')'
             // }
-            } );
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        } );
+        String decodedPdu = Strings.dumpBytes( stream.array() );
         stream.flip();
 
         GracefulDisconnectContainer container = new GracefulDisconnectContainer();
@@ -102,7 +204,7 @@ public class GracefulDisconnectTest
         {
             ByteBuffer bb = gracefulDisconnect.encode();
 
-            String encodedPdu = Strings.dumpBytes(bb.array());
+            String encodedPdu = Strings.dumpBytes( bb.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -124,10 +226,12 @@ public class GracefulDisconnectTest
         ByteBuffer bb = ByteBuffer.allocate( 0x05 );
         bb.put( new byte[]
             { 0x30, 0x03, // GracefulDisconnect ::= SEQUENCE {
-                0x02, 0x01, 0x01 // timeOffline INTEGER (0..720) DEFAULT 0,
-            } );
+                0x02,
+                0x01,
+                0x01 // timeOffline INTEGER (0..720) DEFAULT 0,
+        } );
 
-        String decodedPdu = Strings.dumpBytes(bb.array());
+        String decodedPdu = Strings.dumpBytes( bb.array() );
         bb.flip();
 
         GracefulDisconnectContainer container = new GracefulDisconnectContainer();
@@ -155,7 +259,7 @@ public class GracefulDisconnectTest
         {
             ByteBuffer bb1 = gracefulDisconnect.encode();
 
-            String encodedPdu = Strings.dumpBytes(bb1.array());
+            String encodedPdu = Strings.dumpBytes( bb1.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -177,11 +281,13 @@ public class GracefulDisconnectTest
         ByteBuffer bb = ByteBuffer.allocate( 0x05 );
         bb.put( new byte[]
             { 0x30, 0x03, // GracefulDisconnect ::= SEQUENCE {
-                ( byte ) 0x80, 0x01, 0x01 // delay INTEGER (0..86400) DEFAULT
-                                            // 0
-            } );
+                ( byte ) 0x80,
+                0x01,
+                0x01 // delay INTEGER (0..86400) DEFAULT
+                     // 0
+        } );
 
-        String decodedPdu = Strings.dumpBytes(bb.array());
+        String decodedPdu = Strings.dumpBytes( bb.array() );
         bb.flip();
 
         GracefulDisconnectContainer container = new GracefulDisconnectContainer();
@@ -209,7 +315,7 @@ public class GracefulDisconnectTest
         {
             ByteBuffer bb1 = gracefulDisconnect.encode();
 
-            String encodedPdu = Strings.dumpBytes(bb1.array());
+            String encodedPdu = Strings.dumpBytes( bb1.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -231,12 +337,16 @@ public class GracefulDisconnectTest
         ByteBuffer bb = ByteBuffer.allocate( 0x08 );
         bb.put( new byte[]
             { 0x30, 0x06, // GracefulDisconnect ::= SEQUENCE {
-                0x02, 0x01, 0x01, // timeOffline INTEGER (0..720) DEFAULT 0,
-                ( byte ) 0x80, 0x01, 0x01, // timeOffline INTEGER (0..720)
-                                            // DEFAULT 0,
+                0x02,
+                0x01,
+                0x01, // timeOffline INTEGER (0..720) DEFAULT 0,
+                ( byte ) 0x80,
+                0x01,
+                0x01, // timeOffline INTEGER (0..720)
+                      // DEFAULT 0,
             } );
 
-        String decodedPdu = Strings.dumpBytes(bb.array());
+        String decodedPdu = Strings.dumpBytes( bb.array() );
         bb.flip();
 
         GracefulDisconnectContainer container = new GracefulDisconnectContainer();
@@ -264,7 +374,7 @@ public class GracefulDisconnectTest
         {
             ByteBuffer bb2 = gracefulDisconnect.encode();
 
-            String encodedPdu = Strings.dumpBytes(bb2.array());
+            String encodedPdu = Strings.dumpBytes( bb2.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -286,19 +396,114 @@ public class GracefulDisconnectTest
         ByteBuffer stream = ByteBuffer.allocate( 0x6A );
         stream.put( new byte[]
             {
-            0x30, 0x68,             // GracefulDisconnec ::= SEQUENCE {
-              0x30, 0x66,           // replicatedContexts Referral OPTIONAL
-                0x04, 0x1F,
-                  'l', 'd', 'a', 'p', ':', '/', '/', 'd', 'i', 'r', 'e', 'c', 't', 'o', 'r', 'y', '.', 'a',
-                  'p', 'a', 'c', 'h', 'e', '.', 'o', 'r', 'g', ':', '8', '0', '/',
-                0x04, 0x43,
-                  'l', 'd', 'a', 'p', ':', '/', '/', 'l', 'd', 'a', 'p', '.', 'n', 'e', 't', 's', 'c', 'a',
-                  'p', 'e', '.', 'c', 'o', 'm', '/', 'o', '=', 'B', 'a', 'b', 's', 'c', 'o', ',', 'c', '=',
-                  'U', 'S', '?', '?', '?', '(', 'i', 'n', 't', '=', '%', '5', 'c', '0', '0', '%', '5', 'c',
-                  '0', '0', '%', '5', 'c', '0', '0', '%', '5', 'c', '0', '4', ')'
-            } );
+                0x30, 0x68, // GracefulDisconnec ::= SEQUENCE {
+                0x30,
+                0x66, // replicatedContexts Referral OPTIONAL
+                0x04,
+                0x1F,
+                'l',
+                'd',
+                'a',
+                'p',
+                ':',
+                '/',
+                '/',
+                'd',
+                'i',
+                'r',
+                'e',
+                'c',
+                't',
+                'o',
+                'r',
+                'y',
+                '.',
+                'a',
+                'p',
+                'a',
+                'c',
+                'h',
+                'e',
+                '.',
+                'o',
+                'r',
+                'g',
+                ':',
+                '8',
+                '0',
+                '/',
+                0x04,
+                0x43,
+                'l',
+                'd',
+                'a',
+                'p',
+                ':',
+                '/',
+                '/',
+                'l',
+                'd',
+                'a',
+                'p',
+                '.',
+                'n',
+                'e',
+                't',
+                's',
+                'c',
+                'a',
+                'p',
+                'e',
+                '.',
+                'c',
+                'o',
+                'm',
+                '/',
+                'o',
+                '=',
+                'B',
+                'a',
+                'b',
+                's',
+                'c',
+                'o',
+                ',',
+                'c',
+                '=',
+                'U',
+                'S',
+                '?',
+                '?',
+                '?',
+                '(',
+                'i',
+                'n',
+                't',
+                '=',
+                '%',
+                '5',
+                'c',
+                '0',
+                '0',
+                '%',
+                '5',
+                'c',
+                '0',
+                '0',
+                '%',
+                '5',
+                'c',
+                '0',
+                '0',
+                '%',
+                '5',
+                'c',
+                '0',
+                '4',
+                ')'
+        } );
 
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        String decodedPdu = Strings.dumpBytes( stream.array() );
         stream.flip();
 
         GracefulDisconnectContainer container = new GracefulDisconnectContainer();
@@ -329,7 +534,7 @@ public class GracefulDisconnectTest
         {
             ByteBuffer bb = gracefulDisconnect.encode();
 
-            String encodedPdu = Strings.dumpBytes(bb.array());
+            String encodedPdu = Strings.dumpBytes( bb.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -351,9 +556,9 @@ public class GracefulDisconnectTest
         ByteBuffer bb = ByteBuffer.allocate( 0x02 );
         bb.put( new byte[]
             { 0x30, 0x00 // GracefulDisconnect ::= SEQUENCE {
-            } );
+        } );
 
-        String decodedPdu = Strings.dumpBytes(bb.array());
+        String decodedPdu = Strings.dumpBytes( bb.array() );
         bb.flip();
 
         GracefulDisconnectContainer container = new GracefulDisconnectContainer();
@@ -381,7 +586,7 @@ public class GracefulDisconnectTest
         {
             ByteBuffer bb1 = gracefulDisconnect.encode();
 
-            String encodedPdu = Strings.dumpBytes(bb1.array());
+            String encodedPdu = Strings.dumpBytes( bb1.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -405,9 +610,12 @@ public class GracefulDisconnectTest
         ByteBuffer bb = ByteBuffer.allocate( 0x0b );
         bb.put( new byte[]
             { 0x30, 0x04, // GracefulDisconnect ::= SEQUENCE {
-                0x02, 0x02, 0x03, ( byte ) 0xE8 // timeOffline INTEGER (0..720)
-                                                // DEFAULT 0,
-            } );
+                0x02,
+                0x02,
+                0x03,
+                ( byte ) 0xE8 // timeOffline INTEGER (0..720)
+                              // DEFAULT 0,
+        } );
         bb.flip();
 
         GracefulDisconnectContainer container = new GracefulDisconnectContainer();
@@ -436,12 +644,16 @@ public class GracefulDisconnectTest
         ByteBuffer bb = ByteBuffer.allocate( 0x0b );
         bb.put( new byte[]
             { 0x30, 0x05, // GracefulDisconnect ::= SEQUENCE {
-                ( byte ) 0x80, 0x03, 0x01, ( byte ) 0x86, ( byte ) 0xA0 // delay
-                                                                        // INTEGER
-                                                                        // (0..86400)
-                                                                        // DEFAULT
-                                                                        // 0
-            } );
+                ( byte ) 0x80,
+                0x03,
+                0x01,
+                ( byte ) 0x86,
+                ( byte ) 0xA0 // delay
+                              // INTEGER
+                              // (0..86400)
+                              // DEFAULT
+                              // 0
+        } );
         bb.flip();
 
         GracefulDisconnectContainer container = new GracefulDisconnectContainer();
@@ -470,8 +682,9 @@ public class GracefulDisconnectTest
         ByteBuffer bb = ByteBuffer.allocate( 0x0b );
         bb.put( new byte[]
             { 0x30, 0x02, // GracefulDisconnect ::= SEQUENCE {
-                0x02, 0x00 // timeOffline INTEGER (0..720) DEFAULT 0,
-            } );
+                0x02,
+                0x00 // timeOffline INTEGER (0..720) DEFAULT 0,
+        } );
         bb.flip();
 
         GracefulDisconnectContainer container = new GracefulDisconnectContainer();
@@ -500,8 +713,9 @@ public class GracefulDisconnectTest
         ByteBuffer bb = ByteBuffer.allocate( 0x0b );
         bb.put( new byte[]
             { 0x30, 0x02, // GracefulDisconnect ::= SEQUENCE {
-                ( byte ) 0x80, 0x00 // delay INTEGER (0..86400) DEFAULT 0
-            } );
+                ( byte ) 0x80,
+                0x00 // delay INTEGER (0..86400) DEFAULT 0
+        } );
         bb.flip();
 
         GracefulDisconnectContainer container = new GracefulDisconnectContainer();
@@ -531,8 +745,9 @@ public class GracefulDisconnectTest
         ByteBuffer bb = ByteBuffer.allocate( 0x04 );
         bb.put( new byte[]
             { 0x30, 0x02, // GracefulDisconnect ::= SEQUENCE {
-                0x30, 0x00 // replicatedContexts Referral OPTIONAL
-            } );
+                0x30,
+                0x00 // replicatedContexts Referral OPTIONAL
+        } );
         bb.flip();
 
         GracefulDisconnectContainer container = new GracefulDisconnectContainer();
@@ -562,8 +777,10 @@ public class GracefulDisconnectTest
         ByteBuffer bb = ByteBuffer.allocate( 0x06 );
         bb.put( new byte[]
             { 0x30, 0x04, // GracefulDisconnect ::= SEQUENCE {
-                0x30, 0x02, // replicatedContexts Referral OPTIONAL
-                0x04, 0x00 } );
+                0x30,
+                0x02, // replicatedContexts Referral OPTIONAL
+                0x04,
+                0x00 } );
         bb.flip();
 
         GracefulDisconnectContainer container = new GracefulDisconnectContainer();

Modified: directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/GracefulShutdownTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/GracefulShutdownTest.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/GracefulShutdownTest.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/GracefulShutdownTest.java Tue Jan 24 17:27:00 2012
@@ -58,13 +58,17 @@ public class GracefulShutdownTest
         ByteBuffer bb = ByteBuffer.allocate( 0x08 );
         bb.put( new byte[]
             { 0x30, 0x06, // GracefulShutdown ::= SEQUENCE {
-                0x02, 0x01, 0x01, // timeOffline INTEGER (0..720) DEFAULT 0,
-                ( byte ) 0x80, 0x01, 0x01 // delay INTEGER (0..86400) DEFAULT
-                                            // 0
+                0x02,
+                0x01,
+                0x01, // timeOffline INTEGER (0..720) DEFAULT 0,
+                ( byte ) 0x80,
+                0x01,
+                0x01 // delay INTEGER (0..86400) DEFAULT
+                     // 0
             // }
-            } );
+        } );
 
-        String decodedPdu = Strings.dumpBytes(bb.array());
+        String decodedPdu = Strings.dumpBytes( bb.array() );
         bb.flip();
 
         GracefulShutdownContainer container = new GracefulShutdownContainer();
@@ -91,7 +95,7 @@ public class GracefulShutdownTest
         {
             ByteBuffer bb1 = gracefulShutdown.encode();
 
-            String encodedPdu = Strings.dumpBytes(bb1.array());
+            String encodedPdu = Strings.dumpBytes( bb1.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -113,10 +117,12 @@ public class GracefulShutdownTest
         ByteBuffer bb = ByteBuffer.allocate( 0x05 );
         bb.put( new byte[]
             { 0x30, 0x03, // GracefulShutdown ::= SEQUENCE {
-                0x02, 0x01, 0x01 // timeOffline INTEGER (0..720) DEFAULT 0,
-            } );
+                0x02,
+                0x01,
+                0x01 // timeOffline INTEGER (0..720) DEFAULT 0,
+        } );
 
-        String decodedPdu = Strings.dumpBytes(bb.array());
+        String decodedPdu = Strings.dumpBytes( bb.array() );
         bb.flip();
 
         GracefulShutdownContainer container = new GracefulShutdownContainer();
@@ -143,7 +149,7 @@ public class GracefulShutdownTest
         {
             ByteBuffer bb1 = gracefulShutdown.encode();
 
-            String encodedPdu = Strings.dumpBytes(bb1.array());
+            String encodedPdu = Strings.dumpBytes( bb1.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -165,11 +171,13 @@ public class GracefulShutdownTest
         ByteBuffer bb = ByteBuffer.allocate( 0x05 );
         bb.put( new byte[]
             { 0x30, 0x03, // GracefulShutdown ::= SEQUENCE {
-                ( byte ) 0x80, 0x01, 0x01 // delay INTEGER (0..86400) DEFAULT
-                                            // 0
-            } );
+                ( byte ) 0x80,
+                0x01,
+                0x01 // delay INTEGER (0..86400) DEFAULT
+                     // 0
+        } );
 
-        String decodedPdu = Strings.dumpBytes(bb.array());
+        String decodedPdu = Strings.dumpBytes( bb.array() );
         bb.flip();
 
         GracefulShutdownContainer container = new GracefulShutdownContainer();
@@ -196,7 +204,7 @@ public class GracefulShutdownTest
         {
             ByteBuffer bb1 = gracefulShutdown.encode();
 
-            String encodedPdu = Strings.dumpBytes(bb1.array());
+            String encodedPdu = Strings.dumpBytes( bb1.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -218,9 +226,9 @@ public class GracefulShutdownTest
         ByteBuffer bb = ByteBuffer.allocate( 0x02 );
         bb.put( new byte[]
             { 0x30, 0x00 // GracefulShutdown ::= SEQUENCE {
-            } );
+        } );
 
-        String decodedPdu = Strings.dumpBytes(bb.array());
+        String decodedPdu = Strings.dumpBytes( bb.array() );
         bb.flip();
 
         GracefulShutdownContainer container = new GracefulShutdownContainer();
@@ -247,7 +255,7 @@ public class GracefulShutdownTest
         {
             ByteBuffer bb1 = gracefulShutdown.encode();
 
-            String encodedPdu = Strings.dumpBytes(bb1.array());
+            String encodedPdu = Strings.dumpBytes( bb1.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -269,12 +277,15 @@ public class GracefulShutdownTest
         ByteBuffer bb = ByteBuffer.allocate( 0x06 );
         bb.put( new byte[]
             { 0x30, 0x04, // GracefulShutdown ::= SEQUENCE {
-                ( byte ) 0x80, 0x02, 0x01, ( byte ) 0xF4 // delay INTEGER
-                                                            // (0..86400)
-                                                            // DEFAULT 0
-            } );
+                ( byte ) 0x80,
+                0x02,
+                0x01,
+                ( byte ) 0xF4 // delay INTEGER
+                              // (0..86400)
+                              // DEFAULT 0
+        } );
 
-        String decodedPdu = Strings.dumpBytes(bb.array());
+        String decodedPdu = Strings.dumpBytes( bb.array() );
         bb.flip();
 
         GracefulShutdownContainer container = new GracefulShutdownContainer();
@@ -301,7 +312,7 @@ public class GracefulShutdownTest
         {
             ByteBuffer bb1 = gracefulShutdown.encode();
 
-            String encodedPdu = Strings.dumpBytes(bb1.array());
+            String encodedPdu = Strings.dumpBytes( bb1.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -323,12 +334,15 @@ public class GracefulShutdownTest
         ByteBuffer bb = ByteBuffer.allocate( 0x06 );
         bb.put( new byte[]
             { 0x30, 0x04, // GracefulShutdown ::= SEQUENCE {
-                ( byte ) 0x80, 0x02, 0x7F, ( byte ) 0xFF // delay INTEGER
-                                                            // (0..86400)
-                                                            // DEFAULT 0
-            } );
+                ( byte ) 0x80,
+                0x02,
+                0x7F,
+                ( byte ) 0xFF // delay INTEGER
+                              // (0..86400)
+                              // DEFAULT 0
+        } );
 
-        String decodedPdu = Strings.dumpBytes(bb.array());
+        String decodedPdu = Strings.dumpBytes( bb.array() );
         bb.flip();
 
         GracefulShutdownContainer container = new GracefulShutdownContainer();
@@ -355,7 +369,7 @@ public class GracefulShutdownTest
         {
             ByteBuffer bb1 = gracefulShutdown.encode();
 
-            String encodedPdu = Strings.dumpBytes(bb1.array());
+            String encodedPdu = Strings.dumpBytes( bb1.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -377,14 +391,18 @@ public class GracefulShutdownTest
         ByteBuffer bb = ByteBuffer.allocate( 0x07 );
         bb.put( new byte[]
             { 0x30, 0x05, // GracefulShutdown ::= SEQUENCE {
-                ( byte ) 0x80, 0x03, 0x00, ( byte ) 0x80, ( byte ) 0x00 // delay
-                                                                        // INTEGER
-                                                                        // (0..86400)
-                                                                        // DEFAULT
-                                                                        // 0
-            } );
+                ( byte ) 0x80,
+                0x03,
+                0x00,
+                ( byte ) 0x80,
+                ( byte ) 0x00 // delay
+                              // INTEGER
+                              // (0..86400)
+                              // DEFAULT
+                              // 0
+        } );
 
-        String decodedPdu = Strings.dumpBytes(bb.array());
+        String decodedPdu = Strings.dumpBytes( bb.array() );
         bb.flip();
 
         GracefulShutdownContainer container = new GracefulShutdownContainer();
@@ -411,7 +429,7 @@ public class GracefulShutdownTest
         {
             ByteBuffer bb1 = gracefulShutdown.encode();
 
-            String encodedPdu = Strings.dumpBytes(bb1.array());
+            String encodedPdu = Strings.dumpBytes( bb1.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -435,9 +453,12 @@ public class GracefulShutdownTest
         ByteBuffer bb = ByteBuffer.allocate( 0x06 );
         bb.put( new byte[]
             { 0x30, 0x04, // GracefulShutdown ::= SEQUENCE {
-                0x02, 0x02, 0x03, ( byte ) 0xE8 // timeOffline INTEGER (0..720)
-                                                // DEFAULT 0,
-            } );
+                0x02,
+                0x02,
+                0x03,
+                ( byte ) 0xE8 // timeOffline INTEGER (0..720)
+                              // DEFAULT 0,
+        } );
         bb.flip();
 
         GracefulShutdownContainer container = new GracefulShutdownContainer();
@@ -466,12 +487,16 @@ public class GracefulShutdownTest
         ByteBuffer bb = ByteBuffer.allocate( 0x0b );
         bb.put( new byte[]
             { 0x30, 0x05, // GracefulShutdown ::= SEQUENCE {
-                ( byte ) 0x80, 0x03, 0x01, ( byte ) 0x86, ( byte ) 0xA0 // delay
-                                                                        // INTEGER
-                                                                        // (0..86400)
-                                                                        // DEFAULT
-                                                                        // 0
-            } );
+                ( byte ) 0x80,
+                0x03,
+                0x01,
+                ( byte ) 0x86,
+                ( byte ) 0xA0 // delay
+                              // INTEGER
+                              // (0..86400)
+                              // DEFAULT
+                              // 0
+        } );
         bb.flip();
 
         GracefulShutdownContainer container = new GracefulShutdownContainer();
@@ -500,8 +525,9 @@ public class GracefulShutdownTest
         ByteBuffer bb = ByteBuffer.allocate( 0x0b );
         bb.put( new byte[]
             { 0x30, 0x02, // GracefulShutdown ::= SEQUENCE {
-                0x02, 0x00 // timeOffline INTEGER (0..720) DEFAULT 0,
-            } );
+                0x02,
+                0x00 // timeOffline INTEGER (0..720) DEFAULT 0,
+        } );
         bb.flip();
 
         GracefulShutdownContainer container = new GracefulShutdownContainer();
@@ -530,8 +556,9 @@ public class GracefulShutdownTest
         ByteBuffer bb = ByteBuffer.allocate( 0x0b );
         bb.put( new byte[]
             { 0x30, 0x02, // GracefulShutdown ::= SEQUENCE {
-                ( byte ) 0x80, 0x00 // delay INTEGER (0..86400) DEFAULT 0
-            } );
+                ( byte ) 0x80,
+                0x00 // delay INTEGER (0..86400) DEFAULT 0
+        } );
         bb.flip();
 
         GracefulShutdownContainer container = new GracefulShutdownContainer();

Modified: directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/StoredProcedureTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/StoredProcedureTest.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/StoredProcedureTest.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/StoredProcedureTest.java Tue Jan 24 17:27:00 2012
@@ -21,7 +21,7 @@
 package org.apache.directory.shared.ldap.extras.extended.ads_impl;
 
 
-import static org.junit.Assert.assertEquals; 
+import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
 import java.nio.ByteBuffer;
@@ -62,21 +62,21 @@ public class StoredProcedureTest
         stream.put( new byte[]
             {
                 0x30, 0x42,
-                    0x04, 0x04, 'J', 'a', 'v', 'a',
-                    0x04, 0x07, 'e', 'x', 'e', 'c', 'u', 't', 'e',
-                    0x30, 0x31,
-                      0x30, 0x08,
-                        0x04, 0x03, 'i', 'n', 't', 
-                        0x04, 0x01, 0x01,
-                      0x30, 0x0F,
-                        0x04, 0x07, 'b', 'o', 'o', 'l', 'e', 'a', 'n', 
-                        0x04, 0x04, 't', 'r', 'u', 'e',
-                      0x30, 0x14,
-                        0x04, 0x06, 'S', 't', 'r', 'i', 'n', 'g', 
-                        0x04, 0x0A, 'p', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '3' 
-            } );
+                0x04, 0x04, 'J', 'a', 'v', 'a',
+                0x04, 0x07, 'e', 'x', 'e', 'c', 'u', 't', 'e',
+                0x30, 0x31,
+                0x30, 0x08,
+                0x04, 0x03, 'i', 'n', 't',
+                0x04, 0x01, 0x01,
+                0x30, 0x0F,
+                0x04, 0x07, 'b', 'o', 'o', 'l', 'e', 'a', 'n',
+                0x04, 0x04, 't', 'r', 'u', 'e',
+                0x30, 0x14,
+                0x04, 0x06, 'S', 't', 'r', 'i', 'n', 'g',
+                0x04, 0x0A, 'p', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '3'
+        } );
 
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        String decodedPdu = Strings.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a StoredProcedure Container
@@ -95,8 +95,8 @@ public class StoredProcedureTest
 
         StoredProcedureRequestDecorator storedProcedure = storedProcedureContainer.getStoredProcedure();
 
-        assertEquals("Java", storedProcedure.getLanguage());
-        
+        assertEquals( "Java", storedProcedure.getLanguage() );
+
         assertEquals( "execute", storedProcedure.getProcedureSpecification() );
 
         assertEquals( 3, storedProcedure.size() );
@@ -108,7 +108,7 @@ public class StoredProcedureTest
         assertEquals( "true", Strings.utf8ToString( ( byte[] ) storedProcedure.getParameterValue( 1 ) ) );
 
         assertEquals( "String", Strings.utf8ToString( ( byte[] ) storedProcedure.getParameterType( 2 ) ) );
-        assertEquals( "parameter3", Strings.utf8ToString( ( byte [] ) storedProcedure.getParameterValue( 2 ) ) );
+        assertEquals( "parameter3", Strings.utf8ToString( ( byte[] ) storedProcedure.getParameterValue( 2 ) ) );
 
         // Check the encoding
         try
@@ -124,6 +124,7 @@ public class StoredProcedureTest
         }
     }
 
+
     @Test
     public void testDecodeStoredProcedureNoParam()
     {
@@ -134,12 +135,12 @@ public class StoredProcedureTest
         stream.put( new byte[]
             {
                 0x30, 0x11,
-                    0x04, 0x04, 'J', 'a', 'v', 'a',
-                    0x04, 0x07, 'e', 'x', 'e', 'c', 'u', 't', 'e',
-                    0x30, 0x00
-            } );
+                0x04, 0x04, 'J', 'a', 'v', 'a',
+                0x04, 0x07, 'e', 'x', 'e', 'c', 'u', 't', 'e',
+                0x30, 0x00
+        } );
 
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        String decodedPdu = Strings.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a StoredProcedure Container
@@ -158,18 +159,18 @@ public class StoredProcedureTest
 
         StoredProcedureRequestDecorator storedProcedure = storedProcedureContainer.getStoredProcedure();
 
-        assertEquals("Java", storedProcedure.getLanguage());
-        
+        assertEquals( "Java", storedProcedure.getLanguage() );
+
         assertEquals( "execute", storedProcedure.getProcedureSpecification() );
 
         assertEquals( 0, storedProcedure.size() );
-        
+
         // Check the encoding
         try
         {
             ByteBuffer bb = storedProcedure.encode();
 
-            String encodedPdu = Strings.dumpBytes(bb.array());
+            String encodedPdu = Strings.dumpBytes( bb.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }
@@ -180,7 +181,7 @@ public class StoredProcedureTest
         }
     }
 
-    
+
     @Test
     public void testDecodeStoredProcedureOneParam() throws IntegerDecoderException
     {
@@ -191,15 +192,15 @@ public class StoredProcedureTest
         stream.put( new byte[]
             {
                 0x30, 0x1B,
-                  0x04, 0x04, 'J', 'a', 'v', 'a',
-                  0x04, 0x07, 'e', 'x', 'e', 'c', 'u', 't', 'e',
-                  0x30, 0x0A,
-                      0x30, 0x08,
-                        0x04, 0x03, 'i', 'n', 't', 
-                        0x04, 0x01, 0x01,
-            } );
+                0x04, 0x04, 'J', 'a', 'v', 'a',
+                0x04, 0x07, 'e', 'x', 'e', 'c', 'u', 't', 'e',
+                0x30, 0x0A,
+                0x30, 0x08,
+                0x04, 0x03, 'i', 'n', 't',
+                0x04, 0x01, 0x01,
+        } );
 
-        String decodedPdu = Strings.dumpBytes(stream.array());
+        String decodedPdu = Strings.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a StoredProcedure Container
@@ -218,21 +219,21 @@ public class StoredProcedureTest
 
         StoredProcedureRequestDecorator storedProcedure = storedProcedureContainer.getStoredProcedure();
 
-        assertEquals("Java", storedProcedure.getLanguage());
-        
+        assertEquals( "Java", storedProcedure.getLanguage() );
+
         assertEquals( "execute", storedProcedure.getProcedureSpecification() );
 
         assertEquals( 1, storedProcedure.size() );
 
         assertEquals( "int", Strings.utf8ToString( ( byte[] ) storedProcedure.getParameterType( 0 ) ) );
-        assertEquals( 1, IntegerDecoder.parse( new Value( ( byte [] ) storedProcedure.getParameterValue( 0 ) ) ) );
+        assertEquals( 1, IntegerDecoder.parse( new Value( ( byte[] ) storedProcedure.getParameterValue( 0 ) ) ) );
 
         // Check the encoding
         try
         {
             ByteBuffer bb = storedProcedure.encode();
 
-            String encodedPdu = Strings.dumpBytes(bb.array());
+            String encodedPdu = Strings.dumpBytes( bb.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }

Modified: directory/shared/trunk/ldap/extras/sp/src/main/java/org/apache/directory/shared/ldap/sp/LdapContextParameter.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/sp/src/main/java/org/apache/directory/shared/ldap/sp/LdapContextParameter.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/sp/src/main/java/org/apache/directory/shared/ldap/sp/LdapContextParameter.java (original)
+++ directory/shared/trunk/ldap/extras/sp/src/main/java/org/apache/directory/shared/ldap/sp/LdapContextParameter.java Tue Jan 24 17:27:00 2012
@@ -20,8 +20,8 @@
 
 package org.apache.directory.shared.ldap.sp;
 
-import java.io.Serializable;
 
+import java.io.Serializable;
 
 
 /**
@@ -32,14 +32,16 @@ import java.io.Serializable;
 public class LdapContextParameter implements Serializable
 {
     private static final long serialVersionUID = -8703671542595407603L;
-    
+
     private String name;
 
+
     public LdapContextParameter( String name )
     {
         this.name = name;
     }
-    
+
+
     public String getValue()
     {
         return name;

Modified: directory/shared/trunk/ldap/extras/trigger/src/main/java/org/apache/directory/shared/ldap/trigger/ActionTime.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/trigger/src/main/java/org/apache/directory/shared/ldap/trigger/ActionTime.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/trigger/src/main/java/org/apache/directory/shared/ldap/trigger/ActionTime.java (original)
+++ directory/shared/trunk/ldap/extras/trigger/src/main/java/org/apache/directory/shared/ldap/trigger/ActionTime.java Tue Jan 24 17:27:00 2012
@@ -36,7 +36,6 @@ public final class ActionTime
 
     //public static final ActionTime INSTEADOF = new ActionTime( "INSTEADOF" );
 
-    
     /** The name. */
     private final String name;
 
@@ -76,7 +75,7 @@ public final class ActionTime
     {
         int h = 37;
         h = h * 17 + ( ( name == null ) ? 0 : name.hashCode() );
-        
+
         return h;
     }
 

Modified: directory/shared/trunk/ldap/extras/trigger/src/main/java/org/apache/directory/shared/ldap/trigger/LdapOperation.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/trigger/src/main/java/org/apache/directory/shared/ldap/trigger/LdapOperation.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/trigger/src/main/java/org/apache/directory/shared/ldap/trigger/LdapOperation.java (original)
+++ directory/shared/trunk/ldap/extras/trigger/src/main/java/org/apache/directory/shared/ldap/trigger/LdapOperation.java Tue Jan 24 17:27:00 2012
@@ -28,21 +28,20 @@ package org.apache.directory.shared.ldap
  */
 public enum LdapOperation
 {
-    MODIFY( "Modify" ),
+    MODIFY("Modify"),
 
-    ADD( "Add" ),
+    ADD("Add"),
 
-    DELETE( "Delete" ),
+    DELETE("Delete"),
 
-    MODIFYDN( "ModifyDN" ),
-    
-    MODIFYDN_RENAME( "ModifyDN.Rename" ),
-    
-    MODIFYDN_EXPORT( "ModifyDN.Export" ),
-    
-    MODIFYDN_IMPORT( "ModifyDN.Import" );
+    MODIFYDN("ModifyDN"),
+
+    MODIFYDN_RENAME("ModifyDN.Rename"),
+
+    MODIFYDN_EXPORT("ModifyDN.Export"),
+
+    MODIFYDN_IMPORT("ModifyDN.Import");
 
-    
     private final String name;
 
 

Modified: directory/shared/trunk/ldap/extras/trigger/src/main/java/org/apache/directory/shared/ldap/trigger/ReusableAntlrTriggerSpecificationParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/trigger/src/main/java/org/apache/directory/shared/ldap/trigger/ReusableAntlrTriggerSpecificationParser.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/trigger/src/main/java/org/apache/directory/shared/ldap/trigger/ReusableAntlrTriggerSpecificationParser.java (original)
+++ directory/shared/trunk/ldap/extras/trigger/src/main/java/org/apache/directory/shared/ldap/trigger/ReusableAntlrTriggerSpecificationParser.java Tue Jan 24 17:27:00 2012
@@ -42,7 +42,7 @@ class ReusableAntlrTriggerSpecificationP
     /**
      * Creates a ReusableAntlrTriggerSpecificationParser instance.
      */
-    public ReusableAntlrTriggerSpecificationParser(TokenStream lexer)
+    public ReusableAntlrTriggerSpecificationParser( TokenStream lexer )
     {
         super( lexer );
     }

Modified: directory/shared/trunk/ldap/extras/trigger/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureOption.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/trigger/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureOption.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/trigger/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureOption.java (original)
+++ directory/shared/trunk/ldap/extras/trigger/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureOption.java Tue Jan 24 17:27:00 2012
@@ -21,7 +21,6 @@
 package org.apache.directory.shared.ldap.trigger;
 
 
-
 /**
  * Just a marker interface for Stored Procedure Options.
  * 



Mime
View raw message