directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1235326 [25/28] - in /directory/apacheds/trunk: jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ jdbm-partitio...
Date Tue, 24 Jan 2012 16:15:29 GMT
Modified: directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/package-info.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/package-info.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/package-info.java (original)
+++ directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/package-info.java Tue Jan 24 16:15:05 2012
@@ -27,3 +27,5 @@
  */
 
 package org.apache.directory.server.kerberos.protocol;
+
+

Modified: directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamException.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamException.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamException.java (original)
+++ directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamException.java Tue Jan 24 16:15:05 2012
@@ -42,7 +42,7 @@ public class SamException extends Except
      *
      * @param type the type value for the SAM algorithm associated with this exception
      */
-    public SamException(SamType type)
+    public SamException( SamType type )
     {
         super();
 
@@ -56,7 +56,7 @@ public class SamException extends Except
      * @param type the type value for the SAM algorithm associated with this exception
      * @param message a message regarding the nature of the fault
      */
-    public SamException(SamType type, String message)
+    public SamException( SamType type, String message )
     {
         super( message );
 
@@ -71,7 +71,7 @@ public class SamException extends Except
      * @param type the type value for the SAM algorithm associated with this exception
      * @param cause the throwable that resulted in this exception being thrown
      */
-    public SamException(SamType type, Throwable cause)
+    public SamException( SamType type, Throwable cause )
     {
         super( cause );
 
@@ -88,7 +88,7 @@ public class SamException extends Except
      * @param message a message regarding the nature of the fault
      * @param cause the throwable that resulted in this exception being thrown
      */
-    public SamException(SamType type, String message, Throwable cause)
+    public SamException( SamType type, String message, Throwable cause )
     {
         super( message, cause );
 

Modified: directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/TimestampChecker.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/TimestampChecker.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/TimestampChecker.java (original)
+++ directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/TimestampChecker.java Tue Jan 24 16:15:05 2012
@@ -79,7 +79,7 @@ public class TimestampChecker implements
         {
             return false;
         }
-*/
+        */
         return false;
     }
 }

Modified: directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/package-info.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/package-info.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/package-info.java (original)
+++ directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/package-info.java Tue Jan 24 16:15:05 2012
@@ -28,3 +28,5 @@
  */
 
 package org.apache.directory.server.kerberos.sam;
+
+

Modified: directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractAuthenticationServiceTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractAuthenticationServiceTest.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractAuthenticationServiceTest.java (original)
+++ directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractAuthenticationServiceTest.java Tue Jan 24 16:15:05 2012
@@ -77,7 +77,8 @@ public abstract class AbstractAuthentica
 
         EncryptionKey clientKey = getEncryptionKey( clientPrincipal, passPhrase );
 
-        EncryptedData encryptedData = lockBox.seal( clientKey, encryptedTimeStamp, KeyUsage.AS_REQ_PA_ENC_TIMESTAMP_WITH_CKEY );
+        EncryptedData encryptedData = lockBox.seal( clientKey, encryptedTimeStamp,
+            KeyUsage.AS_REQ_PA_ENC_TIMESTAMP_WITH_CKEY );
 
         ByteBuffer buffer = ByteBuffer.allocate( encryptedData.computeLength() );
         byte[] encodedEncryptedData = encryptedData.encode( buffer ).array();
@@ -121,32 +122,36 @@ public abstract class AbstractAuthentica
     protected static class KrbDummySession extends DummySession
     {
         Object message;
-        
-        public KrbDummySession() 
+
+
+        public KrbDummySession()
         {
             super();
         }
-        
+
+
         public KrbDummySession( IoService service )
         {
             try
             {
-                ((AbstractIoSession) this).setAttributeMap(service
-                        .getSessionDataStructureFactory().getAttributeMap(this));
+                ( ( AbstractIoSession ) this ).setAttributeMap( service
+                    .getSessionDataStructureFactory().getAttributeMap( this ) );
             }
-            catch( Exception e ) 
+            catch ( Exception e )
             {
-                
+
             }
         }
 
+
         public WriteFuture write( Object message )
         {
             this.message = message;
-            
+
             return null;
         }
 
+
         protected Object getMessage()
         {
             return message;

Modified: directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractTicketGrantingServiceTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractTicketGrantingServiceTest.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractTicketGrantingServiceTest.java (original)
+++ directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractTicketGrantingServiceTest.java Tue Jan 24 16:15:05 2012
@@ -138,7 +138,8 @@ public abstract class AbstractTicketGran
         KerberosTime renewTill = new KerberosTime( now + KerberosTime.WEEK );
         encTicketPart.setRenewTill( renewTill );
 
-        EncryptedData encryptedTicketPart = lockBox.seal( serverKey, encTicketPart, KeyUsage.AS_OR_TGS_REP_TICKET_WITH_SRVKEY );
+        EncryptedData encryptedTicketPart = lockBox.seal( serverKey, encTicketPart,
+            KeyUsage.AS_OR_TGS_REP_TICKET_WITH_SRVKEY );
 
         Ticket ticket = new Ticket();
         ticket.setSName( new PrincipalName( serverPrincipal.getName(), serverPrincipal.getNameType() ) );
@@ -151,7 +152,8 @@ public abstract class AbstractTicketGran
     }
 
 
-    protected EncTicketPart getTicketArchetype( KerberosPrincipal clientPrincipal ) throws KerberosException, ParseException
+    protected EncTicketPart getTicketArchetype( KerberosPrincipal clientPrincipal ) throws KerberosException,
+        ParseException
     {
         EncTicketPart encTicketPart = new EncTicketPart();
 
@@ -181,7 +183,8 @@ public abstract class AbstractTicketGran
     protected Ticket getTicket( EncTicketPart encTicketPart, KerberosPrincipal serverPrincipal,
         EncryptionKey serverKey ) throws KerberosException, ParseException
     {
-        EncryptedData encryptedTicketPart = lockBox.seal( serverKey, encTicketPart, KeyUsage.AS_OR_TGS_REP_TICKET_WITH_SRVKEY );
+        EncryptedData encryptedTicketPart = lockBox.seal( serverKey, encTicketPart,
+            KeyUsage.AS_OR_TGS_REP_TICKET_WITH_SRVKEY );
 
         Ticket ticket = new Ticket();
         ticket.setTktVno( 5 );
@@ -214,18 +217,20 @@ public abstract class AbstractTicketGran
         sequenceNumber = random.nextInt();
         now = new KerberosTime();
 
-        EncryptedData authenticator = getAuthenticator( KerberosUtils.getKerberosPrincipal( tgt.getEncTicketPart().getCName(), tgt.getEncTicketPart().getCRealm() ), kdcReqBody, checksumType );
+        EncryptedData authenticator = getAuthenticator(
+            KerberosUtils.getKerberosPrincipal( tgt.getEncTicketPart().getCName(), tgt.getEncTicketPart().getCRealm() ),
+            kdcReqBody, checksumType );
 
         PaData[] paDatas = getPreAuthenticationData( tgt, authenticator );
 
         KdcReq message = new TgsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
         }
-        
+
         return message;
     }
 
@@ -245,7 +250,7 @@ public abstract class AbstractTicketGran
     {
         Authenticator authenticator = new Authenticator();
 
-        clientMicroSeconds = random.nextInt(999999);
+        clientMicroSeconds = random.nextInt( 999999 );
 
         authenticator.setVersionNumber( 5 );
         authenticator.setCName( new PrincipalName( clientPrincipal.getName(), clientPrincipal.getNameType() ) );
@@ -258,7 +263,8 @@ public abstract class AbstractTicketGran
         Checksum checksum = getBodyChecksum( requestBody, checksumType );
         authenticator.setCksum( checksum );
 
-        EncryptedData encryptedAuthenticator = lockBox.seal( sessionKey, authenticator, KeyUsage.TGS_REQ_PA_TGS_REQ_PADATA_AP_REQ_TGS_SESS_KEY );
+        EncryptedData encryptedAuthenticator = lockBox.seal( sessionKey, authenticator,
+            KeyUsage.TGS_REQ_PA_TGS_REQ_PADATA_AP_REQ_TGS_SESS_KEY );
 
         return encryptedAuthenticator;
     }
@@ -271,8 +277,9 @@ public abstract class AbstractTicketGran
         byte[] bodyBytes = kdcReqBody.encode( buffer ).array();
 
         ChecksumHandler checksumHandler = new ChecksumHandler();
-        
-        return checksumHandler.calculateChecksum( checksumType, bodyBytes, null, KeyUsage.TGS_REP_ENC_PART_TGS_SESS_KEY );
+
+        return checksumHandler
+            .calculateChecksum( checksumType, bodyBytes, null, KeyUsage.TGS_REP_ENC_PART_TGS_SESS_KEY );
     }
 
 

Modified: directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationEncryptionTypeTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationEncryptionTypeTest.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationEncryptionTypeTest.java (original)
+++ directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationEncryptionTypeTest.java Tue Jan 24 16:15:05 2012
@@ -90,8 +90,8 @@ public class AuthenticationEncryptionTyp
     {
         config.stop();
     }
-    
-    
+
+
     /**
      * Tests a basic request using DES-CBC-MD5.
      * 
@@ -123,7 +123,7 @@ public class AuthenticationEncryptionTyp
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -179,9 +179,9 @@ public class AuthenticationEncryptionTyp
         KerberosTime timeStamp = new KerberosTime();
         PaData[] paDatas = getPreAuthEncryptedTimeStamp( clientKey, timeStamp );
 
-        KdcReq message = new AsReq(); 
+        KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -242,7 +242,7 @@ public class AuthenticationEncryptionTyp
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -293,7 +293,7 @@ public class AuthenticationEncryptionTyp
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -315,7 +315,8 @@ public class AuthenticationEncryptionTyp
 
         PaEncTsEnc encryptedTimeStamp = new PaEncTsEnc( timeStamp, 0 );
 
-        EncryptedData encryptedData = lockBox.seal( clientKey, encryptedTimeStamp, KeyUsage.AS_REQ_PA_ENC_TIMESTAMP_WITH_CKEY );
+        EncryptedData encryptedData = lockBox.seal( clientKey, encryptedTimeStamp,
+            KeyUsage.AS_REQ_PA_ENC_TIMESTAMP_WITH_CKEY );
 
         ByteBuffer buffer = ByteBuffer.allocate( encryptedData.computeLength() );
         byte[] encodedEncryptedData = encryptedData.encode( buffer ).array();

Modified: directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationPolicyTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationPolicyTest.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationPolicyTest.java (original)
+++ directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationPolicyTest.java Tue Jan 24 16:15:05 2012
@@ -60,8 +60,8 @@ public class AuthenticationPolicyTest ex
         handler = new KerberosProtocolHandler( config, store );
         session = new KrbDummySession();
     }
-    
-    
+
+
     /**
      * Shutdown the Kerberos server
      */
@@ -70,8 +70,8 @@ public class AuthenticationPolicyTest ex
     {
         config.stop();
     }
-    
-    
+
+
     /**
      * Tests when forwardable tickets are disallowed that requests for
      * forwardable tickets fail with the correct error message.

Modified: directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationServiceTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationServiceTest.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationServiceTest.java (original)
+++ directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationServiceTest.java Tue Jan 24 16:15:05 2012
@@ -85,8 +85,8 @@ public class AuthenticationServiceTest e
     {
         config.stop();
     }
-    
-    
+
+
     /**
      * Tests the default minimum request, which consists of as little as the
      * client name, realm, till time, nonce, and encryption types.
@@ -112,7 +112,8 @@ public class AuthenticationServiceTest e
 
         KrbError error = ( KrbError ) session.getMessage();
 
-        assertEquals( "Additional pre-authentication required", ErrorType.KDC_ERR_PREAUTH_REQUIRED, error.getErrorCode() );
+        assertEquals( "Additional pre-authentication required", ErrorType.KDC_ERR_PREAUTH_REQUIRED,
+            error.getErrorCode() );
     }
 
 
@@ -137,7 +138,8 @@ public class AuthenticationServiceTest e
         Object msg = session.getMessage();
         assertEquals( "session.getMessage() instanceOf", KrbError.class, msg.getClass() );
         KrbError error = ( KrbError ) msg;
-        assertEquals( "Requested protocol version number not supported", ErrorType.KDC_ERR_BAD_PVNO, error.getErrorCode() );
+        assertEquals( "Requested protocol version number not supported", ErrorType.KDC_ERR_BAD_PVNO,
+            error.getErrorCode() );
     }
 
 
@@ -192,7 +194,8 @@ public class AuthenticationServiceTest e
         Object msg = session.getMessage();
         assertEquals( "session.getMessage() instanceOf", KrbError.class, msg.getClass() );
         KrbError error = ( KrbError ) msg;
-        assertEquals( "Client not found in Kerberos database", ErrorType.KDC_ERR_C_PRINCIPAL_UNKNOWN, error.getErrorCode() );
+        assertEquals( "Client not found in Kerberos database", ErrorType.KDC_ERR_C_PRINCIPAL_UNKNOWN,
+            error.getErrorCode() );
     }
 
 
@@ -232,7 +235,7 @@ public class AuthenticationServiceTest e
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -268,7 +271,7 @@ public class AuthenticationServiceTest e
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -279,7 +282,8 @@ public class AuthenticationServiceTest e
         Object msg = session.getMessage();
         assertEquals( "session.getMessage() instanceOf", KrbError.class, msg.getClass() );
         KrbError error = ( KrbError ) msg;
-        assertEquals( "Server not found in Kerberos database", ErrorType.KDC_ERR_S_PRINCIPAL_UNKNOWN, error.getErrorCode() );
+        assertEquals( "Server not found in Kerberos database", ErrorType.KDC_ERR_S_PRINCIPAL_UNKNOWN,
+            error.getErrorCode() );
     }
 
 
@@ -330,7 +334,7 @@ public class AuthenticationServiceTest e
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -380,7 +384,7 @@ public class AuthenticationServiceTest e
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -437,7 +441,7 @@ public class AuthenticationServiceTest e
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -494,7 +498,7 @@ public class AuthenticationServiceTest e
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -550,7 +554,7 @@ public class AuthenticationServiceTest e
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -561,7 +565,8 @@ public class AuthenticationServiceTest e
         Object msg = session.getMessage();
         assertEquals( "session.getMessage() instanceOf", KrbError.class, msg.getClass() );
         KrbError error = ( KrbError ) msg;
-        assertEquals( "Requested start time is later than end time", ErrorType.KDC_ERR_NEVER_VALID, error.getErrorCode() );
+        assertEquals( "Requested start time is later than end time", ErrorType.KDC_ERR_NEVER_VALID,
+            error.getErrorCode() );
     }
 
 
@@ -601,7 +606,7 @@ public class AuthenticationServiceTest e
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -612,7 +617,8 @@ public class AuthenticationServiceTest e
         Object msg = session.getMessage();
         assertEquals( "session.getMessage() instanceOf", KrbError.class, msg.getClass() );
         KrbError error = ( KrbError ) msg;
-        assertEquals( "Requested start time is later than end time", ErrorType.KDC_ERR_NEVER_VALID, error.getErrorCode() );
+        assertEquals( "Requested start time is later than end time", ErrorType.KDC_ERR_NEVER_VALID,
+            error.getErrorCode() );
     }
 
 
@@ -651,7 +657,7 @@ public class AuthenticationServiceTest e
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -713,7 +719,7 @@ public class AuthenticationServiceTest e
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -730,7 +736,8 @@ public class AuthenticationServiceTest e
         assertTrue( "POSTDATED flag", reply.getFlags().isPostdated() );
         assertTrue( "INVALID flag", reply.getFlags().isInvalid() );
 
-        assertTrue( "Requested start time", requestedStartTime.equals( reply.getTicket().getEncTicketPart().getStartTime() ) );
+        assertTrue( "Requested start time",
+            requestedStartTime.equals( reply.getTicket().getEncTicketPart().getStartTime() ) );
         assertTrue( "Requested end time", requestedEndTime.equals( reply.getEndTime() ) );
         assertTrue( "POSTDATED flag", reply.getTicket().getEncTicketPart().getFlags().isPostdated() );
         assertTrue( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().isInvalid() );
@@ -772,7 +779,7 @@ public class AuthenticationServiceTest e
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -824,7 +831,7 @@ public class AuthenticationServiceTest e
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -871,7 +878,7 @@ public class AuthenticationServiceTest e
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -919,7 +926,7 @@ public class AuthenticationServiceTest e
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -980,7 +987,7 @@ public class AuthenticationServiceTest e
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -1038,7 +1045,7 @@ public class AuthenticationServiceTest e
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -1091,7 +1098,7 @@ public class AuthenticationServiceTest e
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -1144,7 +1151,7 @@ public class AuthenticationServiceTest e
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -1203,7 +1210,7 @@ public class AuthenticationServiceTest e
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -1265,7 +1272,7 @@ public class AuthenticationServiceTest e
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -1319,7 +1326,7 @@ public class AuthenticationServiceTest e
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -1364,7 +1371,7 @@ public class AuthenticationServiceTest e
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -1409,7 +1416,7 @@ public class AuthenticationServiceTest e
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -1454,7 +1461,7 @@ public class AuthenticationServiceTest e
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -1499,7 +1506,7 @@ public class AuthenticationServiceTest e
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );

Modified: directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/EncTktInSkeyTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/EncTktInSkeyTest.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/EncTktInSkeyTest.java (original)
+++ directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/EncTktInSkeyTest.java Tue Jan 24 16:15:05 2012
@@ -85,8 +85,8 @@ public class EncTktInSkeyTest extends Ab
     {
         config.stop();
     }
-    
-    
+
+
     /**
      * If the ENC-TKT-IN-SKEY option has been specified and an additional ticket
      * has been included in the request, it indicates that the client is using

Modified: directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/PreAuthenticationTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/PreAuthenticationTest.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/PreAuthenticationTest.java (original)
+++ directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/PreAuthenticationTest.java Tue Jan 24 16:15:05 2012
@@ -72,12 +72,12 @@ public class PreAuthenticationTest exten
     {
         Set<EncryptionType> encryptionTypes = new HashSet<EncryptionType>();
         encryptionTypes.add( EncryptionType.AES128_CTS_HMAC_SHA1_96 );
-        
+
         config = new KdcServer();
-        
+
         config.setEncryptionTypes( encryptionTypes );
-        
-        store  = new MapPrincipalStoreImpl();
+
+        store = new MapPrincipalStoreImpl();
         handler = new KerberosProtocolHandler( config, store );
         session = new KrbDummySession();
         lockBox = new CipherTextHandler();
@@ -92,8 +92,8 @@ public class PreAuthenticationTest exten
     {
         config.stop();
     }
-    
-    
+
+
     /**
      * Tests when the KDC configuration requires pre-authentication by encrypted
      * timestamp that an AS_REQ without pre-authentication is rejected with the
@@ -121,7 +121,8 @@ public class PreAuthenticationTest exten
         Object msg = session.getMessage();
         assertEquals( "session.getMessage() instanceOf", KrbError.class, msg.getClass() );
         KrbError error = ( KrbError ) msg;
-        assertEquals( "Additional pre-authentication required", ErrorType.KDC_ERR_PREAUTH_REQUIRED, error.getErrorCode() );
+        assertEquals( "Additional pre-authentication required", ErrorType.KDC_ERR_PREAUTH_REQUIRED,
+            error.getErrorCode() );
     }
 
 
@@ -159,7 +160,7 @@ public class PreAuthenticationTest exten
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -170,7 +171,8 @@ public class PreAuthenticationTest exten
         Object msg = session.getMessage();
         assertEquals( "session.getMessage() instanceOf", KrbError.class, msg.getClass() );
         KrbError error = ( KrbError ) msg;
-        assertEquals( "Integrity check on decrypted field failed", ErrorType.KRB_AP_ERR_BAD_INTEGRITY, error.getErrorCode() );
+        assertEquals( "Integrity check on decrypted field failed", ErrorType.KRB_AP_ERR_BAD_INTEGRITY,
+            error.getErrorCode() );
     }
 
 
@@ -205,7 +207,7 @@ public class PreAuthenticationTest exten
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -217,7 +219,8 @@ public class PreAuthenticationTest exten
         assertEquals( "session.getMessage() instanceOf", KrbError.class, msg.getClass() );
         KrbError error = ( KrbError ) msg;
 
-        assertEquals( "Pre-authentication information was invalid", ErrorType.KDC_ERR_PREAUTH_FAILED, error.getErrorCode() );
+        assertEquals( "Pre-authentication information was invalid", ErrorType.KDC_ERR_PREAUTH_FAILED,
+            error.getErrorCode() );
     }
 
 
@@ -249,7 +252,7 @@ public class PreAuthenticationTest exten
 
         KdcReq message = new AsReq();
         message.setKdcReqBody( kdcReqBody );
-        
+
         for ( PaData paData : paDatas )
         {
             message.addPaData( paData );
@@ -306,7 +309,8 @@ public class PreAuthenticationTest exten
 
         EncryptionKey clientKey = getEncryptionKey( clientPrincipal, passPhrase );
 
-        EncryptedData encryptedData = lockBox.seal( clientKey, encryptedTimeStamp, KeyUsage.AS_REQ_PA_ENC_TIMESTAMP_WITH_CKEY );
+        EncryptedData encryptedData = lockBox.seal( clientKey, encryptedTimeStamp,
+            KeyUsage.AS_REQ_PA_ENC_TIMESTAMP_WITH_CKEY );
 
         ByteBuffer buffer = ByteBuffer.allocate( encryptedData.computeLength() );
         byte[] encodedEncryptedData = encryptedData.encode( buffer ).array();

Modified: directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/TicketGrantingEncryptionTypeTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/TicketGrantingEncryptionTypeTest.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/TicketGrantingEncryptionTypeTest.java (original)
+++ directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/TicketGrantingEncryptionTypeTest.java Tue Jan 24 16:15:05 2012
@@ -91,8 +91,8 @@ public class TicketGrantingEncryptionTyp
     {
         config.stop();
     }
-    
-    
+
+
     /**
      * Tests a basic request using DES-CBC-MD5.
      *
@@ -151,7 +151,7 @@ public class TicketGrantingEncryptionTyp
     public void testRequestAes128() throws Exception
     {
         EncryptionType[] configuredEncryptionTypes =
-                {EncryptionType.AES128_CTS_HMAC_SHA1_96};
+            { EncryptionType.AES128_CTS_HMAC_SHA1_96 };
         config.setEncryptionTypes( configuredEncryptionTypes );
 
         // Get the mutable ticket part.
@@ -192,7 +192,7 @@ public class TicketGrantingEncryptionTyp
 
         assertEquals( "Encryption type", EncryptionType.DES_CBC_MD5, reply.getEncPart().getEType() );
         assertEquals( "Encryption type", EncryptionType.AES128_CTS_HMAC_SHA1_96, reply.getTicket().getEncPart()
-                .getEType() );
+            .getEType() );
     }
 
 
@@ -206,7 +206,7 @@ public class TicketGrantingEncryptionTyp
     public void testRequestAes128TgtAndRequested() throws Exception
     {
         EncryptionType[] configuredEncryptionTypes =
-                {EncryptionType.AES128_CTS_HMAC_SHA1_96};
+            { EncryptionType.AES128_CTS_HMAC_SHA1_96 };
         config.setEncryptionTypes( configuredEncryptionTypes );
 
         // Get the mutable ticket part.
@@ -225,7 +225,7 @@ public class TicketGrantingEncryptionTyp
         preAuthEncryptionTypes.add( EncryptionType.AES128_CTS_HMAC_SHA1_96 );
 
         Map<EncryptionType, EncryptionKey> keyMap = KerberosKeyFactory.getKerberosKeys( principalName, passPhrase,
-                preAuthEncryptionTypes );
+            preAuthEncryptionTypes );
         EncryptionKey serverKey = keyMap.get( EncryptionType.AES128_CTS_HMAC_SHA1_96 );
 
         Ticket tgt = getTicket( encTicketPart, serverPrincipal, serverKey );
@@ -258,7 +258,7 @@ public class TicketGrantingEncryptionTyp
 
         assertEquals( "Encryption type", EncryptionType.AES128_CTS_HMAC_SHA1_96, reply.getEncPart().getEType() );
         assertEquals( "Encryption type", EncryptionType.AES128_CTS_HMAC_SHA1_96, reply.getTicket().getEncPart()
-                .getEType() );
+            .getEType() );
     }
 
 
@@ -271,7 +271,7 @@ public class TicketGrantingEncryptionTyp
     public void testNonce() throws Exception
     {
         EncryptionType[] configuredEncryptionTypes =
-                {EncryptionType.AES128_CTS_HMAC_SHA1_96};
+            { EncryptionType.AES128_CTS_HMAC_SHA1_96 };
         config.setEncryptionTypes( configuredEncryptionTypes );
 
         // Get the mutable ticket part.
@@ -290,7 +290,7 @@ public class TicketGrantingEncryptionTyp
         preAuthEncryptionTypes.add( EncryptionType.AES128_CTS_HMAC_SHA1_96 );
 
         Map<EncryptionType, EncryptionKey> keyMap = KerberosKeyFactory.getKerberosKeys( principalName, passPhrase,
-                preAuthEncryptionTypes );
+            preAuthEncryptionTypes );
         EncryptionKey serverKey = keyMap.get( EncryptionType.AES128_CTS_HMAC_SHA1_96 );
 
         Ticket tgt = getTicket( encTicketPart, serverPrincipal, serverKey );
@@ -324,7 +324,7 @@ public class TicketGrantingEncryptionTyp
 
         assertEquals( "Encryption type", EncryptionType.AES128_CTS_HMAC_SHA1_96, reply.getEncPart().getEType() );
         assertEquals( "Encryption type", EncryptionType.AES128_CTS_HMAC_SHA1_96, reply.getTicket().getEncPart()
-                .getEType() );
+            .getEType() );
 
         assertEquals( "Nonce", nonce, reply.getNonce() );
     }
@@ -339,7 +339,7 @@ public class TicketGrantingEncryptionTyp
     public void testDecryptWithSessionKey() throws Exception
     {
         EncryptionType[] configuredEncryptionTypes =
-                {EncryptionType.AES128_CTS_HMAC_SHA1_96};
+            { EncryptionType.AES128_CTS_HMAC_SHA1_96 };
         config.setEncryptionTypes( configuredEncryptionTypes );
 
         // Get the mutable ticket part.
@@ -358,7 +358,7 @@ public class TicketGrantingEncryptionTyp
         preAuthEncryptionTypes.add( EncryptionType.AES128_CTS_HMAC_SHA1_96 );
 
         Map<EncryptionType, EncryptionKey> keyMap = KerberosKeyFactory.getKerberosKeys( principalName, passPhrase,
-                preAuthEncryptionTypes );
+            preAuthEncryptionTypes );
         EncryptionKey serverKey = keyMap.get( EncryptionType.AES128_CTS_HMAC_SHA1_96 );
 
         Ticket tgt = getTicket( encTicketPart, serverPrincipal, serverKey );
@@ -391,7 +391,7 @@ public class TicketGrantingEncryptionTyp
 
         assertEquals( "Encryption type", EncryptionType.AES128_CTS_HMAC_SHA1_96, reply.getEncPart().getEType() );
         assertEquals( "Encryption type", EncryptionType.AES128_CTS_HMAC_SHA1_96, reply.getTicket().getEncPart()
-                .getEType() );
+            .getEType() );
     }
 
 
@@ -405,7 +405,7 @@ public class TicketGrantingEncryptionTyp
     public void testDecryptWithSubSessionKey() throws Exception
     {
         EncryptionType[] configuredEncryptionTypes =
-                {EncryptionType.AES128_CTS_HMAC_SHA1_96};
+            { EncryptionType.AES128_CTS_HMAC_SHA1_96 };
         config.setEncryptionTypes( configuredEncryptionTypes );
 
         // Get the mutable ticket part.
@@ -424,7 +424,7 @@ public class TicketGrantingEncryptionTyp
         preAuthEncryptionTypes.add( EncryptionType.AES128_CTS_HMAC_SHA1_96 );
 
         Map<EncryptionType, EncryptionKey> keyMap = KerberosKeyFactory.getKerberosKeys( principalName, passPhrase,
-                preAuthEncryptionTypes );
+            preAuthEncryptionTypes );
         EncryptionKey serverKey = keyMap.get( EncryptionType.AES128_CTS_HMAC_SHA1_96 );
 
         Ticket tgt = getTicket( encTicketPart, serverPrincipal, serverKey );
@@ -459,6 +459,6 @@ public class TicketGrantingEncryptionTyp
 
         assertEquals( "Encryption type", EncryptionType.DES_CBC_MD5, reply.getEncPart().getEType() );
         assertEquals( "Encryption type", EncryptionType.AES128_CTS_HMAC_SHA1_96, reply.getTicket().getEncPart()
-                .getEType() );
+            .getEType() );
     }
 }

Modified: directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/TicketGrantingPolicyTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/TicketGrantingPolicyTest.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/TicketGrantingPolicyTest.java (original)
+++ directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/TicketGrantingPolicyTest.java Tue Jan 24 16:15:05 2012
@@ -90,8 +90,8 @@ public class TicketGrantingPolicyTest ex
     {
         config.stop();
     }
-    
-    
+
+
     /**
      * Tests when forwardable tickets are disallowed that requests for
      * forwardable tickets fail with the correct error message.
@@ -214,7 +214,7 @@ public class TicketGrantingPolicyTest ex
         encTicketPart.setFlag( TicketFlag.FORWARDABLE );
 
         HostAddress[] address =
-                {new HostAddress( InetAddress.getByAddress( new byte[4] ) )};
+            { new HostAddress( InetAddress.getByAddress( new byte[4] ) ) };
         HostAddresses addresses = new HostAddresses( address );
         encTicketPart.setClientAddresses( addresses );
 
@@ -342,7 +342,7 @@ public class TicketGrantingPolicyTest ex
         kdcReqBody.setTill( requestedEndTime );
 
         HostAddress[] address =
-                {new HostAddress( InetAddress.getLocalHost() )};
+            { new HostAddress( InetAddress.getLocalHost() ) };
         HostAddresses addresses = new HostAddresses( address );
         kdcReqBody.setAddresses( addresses );
 
@@ -377,7 +377,7 @@ public class TicketGrantingPolicyTest ex
         encTicketPart.setFlag( TicketFlag.PROXIABLE );
 
         HostAddress[] address =
-                {new HostAddress( InetAddress.getByAddress( new byte[4] ) )};
+            { new HostAddress( InetAddress.getByAddress( new byte[4] ) ) };
         HostAddresses addresses = new HostAddresses( address );
         encTicketPart.setClientAddresses( addresses );
 

Modified: directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/TicketGrantingServiceTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/TicketGrantingServiceTest.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/TicketGrantingServiceTest.java (original)
+++ directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/TicketGrantingServiceTest.java Tue Jan 24 16:15:05 2012
@@ -58,6 +58,7 @@ import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
 
+
 public class TicketGrantingServiceTest extends AbstractTicketGrantingServiceTest
 {
     private KdcServer config;
@@ -95,8 +96,8 @@ public class TicketGrantingServiceTest e
     {
         config.stop();
     }
-    
-    
+
+
     /**
      * Tests the default minimum request, which consists of as little as the
      * client name, service name, realm, till time, nonce, and encryption types.
@@ -163,7 +164,8 @@ public class TicketGrantingServiceTest e
         Object msg = session.getMessage();
         assertEquals( "session.getMessage() instanceOf", KrbError.class, msg.getClass() );
         KrbError error = ( KrbError ) msg;
-        assertEquals( "Requested protocol version number not supported", ErrorType.KDC_ERR_BAD_PVNO, error.getErrorCode() );
+        assertEquals( "Requested protocol version number not supported", ErrorType.KDC_ERR_BAD_PVNO,
+            error.getErrorCode() );
     }
 
 
@@ -202,7 +204,8 @@ public class TicketGrantingServiceTest e
         Object msg = session.getMessage();
         assertEquals( "session.getMessage() instanceOf", KrbError.class, msg.getClass() );
         KrbError error = ( KrbError ) msg;
-        assertEquals( "Server not found in Kerberos database", ErrorType.KDC_ERR_S_PRINCIPAL_UNKNOWN, error.getErrorCode() );
+        assertEquals( "Server not found in Kerberos database", ErrorType.KDC_ERR_S_PRINCIPAL_UNKNOWN,
+            error.getErrorCode() );
     }
 
 
@@ -295,7 +298,8 @@ public class TicketGrantingServiceTest e
         Object msg = session.getMessage();
         assertEquals( "session.getMessage() instanceOf", KrbError.class, msg.getClass() );
         KrbError error = ( KrbError ) msg;
-        assertEquals( "Inappropriate type of checksum in message", ErrorType.KRB_AP_ERR_INAPP_CKSUM, error.getErrorCode() );
+        assertEquals( "Inappropriate type of checksum in message", ErrorType.KRB_AP_ERR_INAPP_CKSUM,
+            error.getErrorCode() );
     }
 
 
@@ -376,7 +380,8 @@ public class TicketGrantingServiceTest e
         Object msg = session.getMessage();
         assertEquals( "session.getMessage() instanceOf", KrbError.class, msg.getClass() );
         KrbError error = ( KrbError ) msg;
-        assertEquals( "Integrity check on decrypted field failed", ErrorType.KRB_AP_ERR_BAD_INTEGRITY, error.getErrorCode() );
+        assertEquals( "Integrity check on decrypted field failed", ErrorType.KRB_AP_ERR_BAD_INTEGRITY,
+            error.getErrorCode() );
     }
 
 
@@ -1140,7 +1145,8 @@ public class TicketGrantingServiceTest e
         Object msg = session.getMessage();
         assertEquals( "session.getMessage() instanceOf", KrbError.class, msg.getClass() );
         KrbError error = ( KrbError ) session.getMessage();
-        assertEquals( "Requested start time is later than end time", ErrorType.KDC_ERR_NEVER_VALID, error.getErrorCode() );
+        assertEquals( "Requested start time is later than end time", ErrorType.KDC_ERR_NEVER_VALID,
+            error.getErrorCode() );
     }
 
 
@@ -1195,7 +1201,8 @@ public class TicketGrantingServiceTest e
         Object msg = session.getMessage();
         assertEquals( "session.getMessage() instanceOf", KrbError.class, msg.getClass() );
         KrbError error = ( KrbError ) session.getMessage();
-        assertEquals( "Requested start time is later than end time", ErrorType.KDC_ERR_NEVER_VALID, error.getErrorCode() );
+        assertEquals( "Requested start time is later than end time", ErrorType.KDC_ERR_NEVER_VALID,
+            error.getErrorCode() );
     }
 
 
@@ -1321,7 +1328,8 @@ public class TicketGrantingServiceTest e
         assertTrue( "POSTDATED flag", reply.getFlags().isPostdated() );
         assertTrue( "INVALID flag", reply.getFlags().isInvalid() );
 
-        assertTrue( "Requested start time", requestedStartTime.equals( reply.getTicket().getEncTicketPart().getStartTime() ) );
+        assertTrue( "Requested start time",
+            requestedStartTime.equals( reply.getTicket().getEncTicketPart().getStartTime() ) );
         assertTrue( "Requested end time", requestedEndTime.equals( reply.getEndTime() ) );
         assertTrue( "POSTDATED flag", reply.getTicket().getEncTicketPart().getFlags().isPostdated() );
         assertTrue( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().isInvalid() );

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolConstants.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolConstants.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolConstants.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolConstants.java Tue Jan 24 16:15:05 2012
@@ -19,8 +19,8 @@
  */
 package org.apache.directory.server.ldap;
 
-import org.apache.directory.shared.ldap.model.message.Control;
 
+import org.apache.directory.shared.ldap.model.message.Control;
 
 
 /**

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java Tue Jan 24 16:15:05 2012
@@ -84,31 +84,31 @@ class LdapProtocolHandler extends Demuxi
         // First, create a new LdapSession and store it i the manager
         LdapSession ldapSession = new LdapSession( session );
         ldapServer.getLdapSessionManager().addLdapSession( ldapSession );
-        
+
         // Now, we have to store the DirectoryService instance into the session
         session.setAttribute( "maxPDUSize", ldapServer.getDirectoryService().getMaxPDUSize() );
-        
+
         // Last, store the message container
-        LdapMessageContainer<? extends MessageDecorator<Message>> ldapMessageContainer = 
-            new LdapMessageContainer<MessageDecorator<Message>>( 
-            ldapServer.getDirectoryService().getLdapCodecService(),
-            new BinaryAttributeDetector()
-            {
-                public boolean isBinary( String id )
+        LdapMessageContainer<? extends MessageDecorator<Message>> ldapMessageContainer =
+            new LdapMessageContainer<MessageDecorator<Message>>(
+                ldapServer.getDirectoryService().getLdapCodecService(),
+                new BinaryAttributeDetector()
                 {
-                    SchemaManager schemaManager = ldapServer.getDirectoryService().getSchemaManager();
-    
-                    try
-                    {
-                        AttributeType type = schemaManager.lookupAttributeTypeRegistry( id );
-                        return !type.getSyntax().isHumanReadable();
-                    }
-                    catch ( Exception e )
+                    public boolean isBinary( String id )
                     {
-                        return !Strings.isEmpty(id) && id.endsWith(";binary");
+                        SchemaManager schemaManager = ldapServer.getDirectoryService().getSchemaManager();
+
+                        try
+                        {
+                            AttributeType type = schemaManager.lookupAttributeTypeRegistry( id );
+                            return !type.getSyntax().isHumanReadable();
+                        }
+                        catch ( Exception e )
+                        {
+                            return !Strings.isEmpty( id ) && id.endsWith( ";binary" );
+                        }
                     }
-                }
-            } );
+                } );
 
         session.setAttribute( "messageContainer", ldapMessageContainer );
     }
@@ -191,15 +191,15 @@ class LdapProtocolHandler extends Demuxi
 
         if ( message == SslFilter.SESSION_SECURED )
         {
-            ExtendedRequest<?> req = 
-                LdapApiServiceFactory.getSingleton().newExtendedRequest( "1.3.6.1.4.1.1466.20037", 
+            ExtendedRequest<?> req =
+                LdapApiServiceFactory.getSingleton().newExtendedRequest( "1.3.6.1.4.1.1466.20037",
                     "SECURED".getBytes( "ISO-8859-1" ) );
             message = req;
         }
         else if ( message == SslFilter.SESSION_UNSECURED )
         {
-            ExtendedRequest<?> req = 
-                LdapApiServiceFactory.getSingleton().newExtendedRequest( "1.3.6.1.4.1.1466.20037", 
+            ExtendedRequest<?> req =
+                LdapApiServiceFactory.getSingleton().newExtendedRequest( "1.3.6.1.4.1.1466.20037",
                     "SECURED".getBytes( "ISO-8859-1" ) );
             message = req;
         }
@@ -217,7 +217,7 @@ class LdapProtocolHandler extends Demuxi
                     resp.getLdapResult().setDiagnosticMessage( "Unsupport critical control: " + control.getOid() );
                     resp.getLdapResult().setResultCode( ResultCodeEnum.UNAVAILABLE_CRITICAL_EXTENSION );
                     session.write( resp );
-                    
+
                     return;
                 }
             }
@@ -232,7 +232,7 @@ class LdapProtocolHandler extends Demuxi
      */
     public void exceptionCaught( IoSession session, Throwable cause )
     {
-        if ( cause.getCause() instanceof ResponseCarryingMessageException)
+        if ( cause.getCause() instanceof ResponseCarryingMessageException )
         {
             ResponseCarryingMessageException rcme = ( ResponseCarryingMessageException ) cause.getCause();
 

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolUtils.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolUtils.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolUtils.java Tue Jan 24 16:15:05 2012
@@ -29,6 +29,7 @@ import org.apache.directory.shared.util.
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+
 /**
  * Utility methods used by the LDAP protocol service.
  *
@@ -43,14 +44,15 @@ public class LdapProtocolUtils
     public static final String REPLICA_ID_PREFIX = "rid=";
 
     private static final int REPLICA_ID_PREFIX_LEN = REPLICA_ID_PREFIX.length();
-    
+
     /** the prefix for Csn value */
     public static final String CSN_PREFIX = "csn=";
 
     private static final int CSN_PREFIX_LEN = CSN_PREFIX.length();
-    
+
     private static final Logger LOG = LoggerFactory.getLogger( LdapProtocolUtils.class );
-    
+
+
     /**
      * Extracts request controls from a request to populate into an
      * OperationContext.
@@ -62,7 +64,8 @@ public class LdapProtocolUtils
     {
         if ( request.getControls() != null )
         {
-            opContext.addRequestControls( request.getControls().values().toArray( LdapProtocolConstants.EMPTY_CONTROLS ) );
+            opContext
+                .addRequestControls( request.getControls().values().toArray( LdapProtocolConstants.EMPTY_CONTROLS ) );
         }
     }
 
@@ -78,8 +81,8 @@ public class LdapProtocolUtils
     {
         response.addAllControls( opContext.getResponseControls() );
     }
-    
-    
+
+
     public static byte[] createCookie( int replicaId, String csn )
     {
         // the syncrepl cookie format (compatible with OpenLDAP)
@@ -99,18 +102,18 @@ public class LdapProtocolUtils
         {
             return false;
         }
-    
+
         int pos = cookieString.indexOf( COOKIE_DELIM );
-        
+
         // position should start from REPLICA_ID_PREFIX_LEN or higher cause a cookie can be
         // like "rid=0,csn={csn}" or "rid=11,csn={csn}"
-        if ( pos <= REPLICA_ID_PREFIX_LEN )  
+        if ( pos <= REPLICA_ID_PREFIX_LEN )
         {
             return false;
         }
-    
+
         String replicaId = cookieString.substring( REPLICA_ID_PREFIX_LEN, pos );
-        
+
         try
         {
             Integer.parseInt( replicaId );
@@ -120,14 +123,14 @@ public class LdapProtocolUtils
             LOG.debug( "Failed to parse the replica id {}", replicaId );
             return false;
         }
-    
+
         if ( pos == cookieString.length() )
         {
             return false;
         }
-    
+
         String csnString = cookieString.substring( pos + 1 + CSN_PREFIX_LEN );
-    
+
         return Csn.isValid( csnString );
     }
 
@@ -154,7 +157,7 @@ public class LdapProtocolUtils
     public static int getReplicaId( String cookieString )
     {
         String replicaId = cookieString.substring( REPLICA_ID_PREFIX_LEN, cookieString.indexOf( COOKIE_DELIM ) );
-        
+
         return Integer.parseInt( replicaId );
     }
 }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java Tue Jan 24 16:15:05 2012
@@ -228,7 +228,8 @@ public class LdapServer extends Director
         saslQop.add( SaslQoP.AUTH.getValue() );
         saslQop.add( SaslQoP.AUTH_INT.getValue() );
         saslQop.add( SaslQoP.AUTH_CONF.getValue() );
-        saslQopString = SaslQoP.AUTH.getValue() + ',' + SaslQoP.AUTH_INT.getValue() + ',' + SaslQoP.AUTH_CONF.getValue();
+        saslQopString = SaslQoP.AUTH.getValue() + ',' + SaslQoP.AUTH_INT.getValue() + ','
+            + SaslQoP.AUTH_CONF.getValue();
 
         saslRealms = new ArrayList<String>();
         saslRealms.add( "example.com" );
@@ -322,7 +323,7 @@ public class LdapServer extends Director
     @SuppressWarnings("PMD.EmptyCatchBlock")
     private void loadKeyStore() throws Exception
     {
-        if ( Strings.isEmpty(keystoreFile) )
+        if ( Strings.isEmpty( keystoreFile ) )
         {
             Provider provider = Security.getProvider( "SUN" );
             LOG.debug( "provider = {}", provider );
@@ -465,7 +466,7 @@ public class LdapServer extends Director
 
             startNetwork( transport, chain );
         }
-        
+
         /*
          * The server is now initialized, we can
          * install the default requests handlers, which need 
@@ -494,7 +495,7 @@ public class LdapServer extends Director
 
         LOG.info( "Ldap service started." );
     }
-    
+
 
     /**
      * Install the replication handler if we have one
@@ -774,7 +775,7 @@ public class LdapServer extends Director
      * request handler
      * @return the exnteded operation handler
      */
-    public ExtendedOperationHandler<ExtendedRequest<ExtendedResponse>,ExtendedResponse> 
+    public ExtendedOperationHandler<ExtendedRequest<ExtendedResponse>, ExtendedResponse>
         getExtendedOperationHandler( String oid )
     {
         for ( ExtendedOperationHandler<ExtendedRequest<ExtendedResponse>, ExtendedResponse> h : extendedOperationHandlers )
@@ -1138,7 +1139,8 @@ public class LdapServer extends Director
     /**
      * @param extendedHandler The ExtendedRequest handler
      */
-    @SuppressWarnings({ "unchecked", "rawtypes" })
+    @SuppressWarnings(
+        { "unchecked", "rawtypes" })
     public void setExtendedHandler( ExtendedHandler extendedHandler )
     {
         this.handler.removeReceivedMessageHandler( ExtendedRequest.class );

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapSession.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapSession.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapSession.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapSession.java Tue Jan 24 16:15:05 2012
@@ -48,45 +48,45 @@ public class LdapSession
 {
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( LdapSession.class );
-    
+
     /** A speedup for logs */
     private static final boolean IS_DEBUG = LOG.isDebugEnabled();
 
     /** The list of requests we can abandon */
-    private static final AbandonableRequest[] EMPTY_ABANDONABLES = new AbandonableRequest[0]; 
-    
+    private static final AbandonableRequest[] EMPTY_ABANDONABLES = new AbandonableRequest[0];
+
     /** A lock to protect the abandonableRequests against concurrent access */
     private final String outstandingLock;
-    
+
     /**
      * The associated IoSession. Usually, a LdapSession is established
      * at the user request, which means we have a IoSession.
      */
     private final IoSession ioSession;
-    
+
     /** The CoreSession */
     private CoreSession coreSession;
-    
+
     /** A reference on the LdapServer instance */
     private LdapServer ldapServer;
-    
+
     /** A map of all the running requests */
     private Map<Integer, AbandonableRequest> outstandingRequests;
-    
+
     /** The current Bind status */
     private BindStatus bindStatus;
-    
+
     /** The current mechanism used to authenticate the user */
     private String currentMechanism;
-    
+
     /**
      * A Map containing Objects used during the SASL negotiation
      */
     private Map<String, Object> saslProperties;
-    
+
     /** A map containing all the paged search context */
     private Map<Integer, PagedSearchContext> pagedSearchContexts;
-    
+
 
     /**
      * Creates a new instance of LdapSession associated with the underlying
@@ -103,8 +103,8 @@ public class LdapSession
         saslProperties = new HashMap<String, Object>();
         pagedSearchContexts = new ConcurrentHashMap<Integer, PagedSearchContext>();
     }
-    
-    
+
+
     /**
      * Check if the session is authenticated. There are two conditions for
      * a session to be authenticated :<br>
@@ -117,8 +117,8 @@ public class LdapSession
     {
         return ( coreSession != null ) && bindStatus == BindStatus.AUTHENTICATED;
     }
-    
-    
+
+
     /**
      * Check if the session is authenticated. There are two conditions for
      * a session to be authenticated :<br>
@@ -131,8 +131,8 @@ public class LdapSession
     {
         return bindStatus == BindStatus.ANONYMOUS;
     }
-    
-    
+
+
     /**
      * Check if the session is processing a BindRequest, either Simple
      * or SASL
@@ -142,10 +142,10 @@ public class LdapSession
     public boolean isAuthPending()
     {
         return ( bindStatus == BindStatus.SIMPLE_AUTH_PENDING ) ||
-               ( bindStatus == BindStatus.SASL_AUTH_PENDING );
+            ( bindStatus == BindStatus.SASL_AUTH_PENDING );
     }
-    
-    
+
+
     /**
      * Check if the session is processing a Simple BindRequest
      * 
@@ -155,8 +155,8 @@ public class LdapSession
     {
         return ( bindStatus == BindStatus.SIMPLE_AUTH_PENDING );
     }
-    
-    
+
+
     /**
      * Check if the session is processing a SASL BindRequest
      * 
@@ -166,8 +166,8 @@ public class LdapSession
     {
         return ( bindStatus == BindStatus.SASL_AUTH_PENDING );
     }
-    
-    
+
+
     /**
      * Gets the MINA IoSession associated with this LdapSession.
      *
@@ -177,8 +177,8 @@ public class LdapSession
     {
         return ioSession;
     }
-    
-    
+
+
     /**
      * Gets the logical core DirectoryService session associated with this 
      * LdapSession.
@@ -189,8 +189,8 @@ public class LdapSession
     {
         return coreSession;
     }
-    
-    
+
+
     /**
      * Sets the logical core DirectoryService session. 
      * 
@@ -200,8 +200,8 @@ public class LdapSession
     {
         this.coreSession = coreSession;
     }
-    
-    
+
+
     /**
      * Abandons all outstanding requests associated with this session.
      */
@@ -210,14 +210,14 @@ public class LdapSession
         synchronized ( outstandingLock )
         {
             AbandonableRequest[] abandonables = outstandingRequests.values().toArray( EMPTY_ABANDONABLES );
-            
+
             for ( AbandonableRequest abandonable : abandonables )
             {
                 abandonOutstandingRequest( abandonable.getMessageId() );
             }
         }
     }
-    
+
 
     /**
      * Abandons a specific request by messageId.
@@ -227,7 +227,7 @@ public class LdapSession
     public AbandonableRequest abandonOutstandingRequest( int messageId )
     {
         AbandonableRequest request = null;
-        
+
         synchronized ( outstandingLock )
         {
             request = outstandingRequests.remove( messageId );
@@ -238,7 +238,7 @@ public class LdapSession
             LOG.warn( "AbandonableRequest with messageId {} not found in outstandingRequests.", messageId );
             return null;
         }
-        
+
         if ( request.isAbandoned() )
         {
             LOG.info( "AbandonableRequest with messageId {} has already been abandoned", messageId );
@@ -246,16 +246,16 @@ public class LdapSession
         }
 
         request.abandon();
-        
+
         if ( IS_DEBUG )
         {
             LOG.debug( "AbandonRequest on AbandonableRequest wth messageId {} was successful.", messageId );
         }
-        
+
         return request;
     }
 
-    
+
     /**
      * Registers an outstanding request which can be abandoned later.
      *
@@ -263,13 +263,13 @@ public class LdapSession
      */
     public void registerOutstandingRequest( AbandonableRequest request )
     {
-        synchronized( outstandingLock )
+        synchronized ( outstandingLock )
         {
             outstandingRequests.put( request.getMessageId(), request );
         }
     }
 
-    
+
     /**
      * Unregisters an outstanding request.
      *
@@ -277,19 +277,19 @@ public class LdapSession
      */
     public void unregisterOutstandingRequest( AbandonableRequest request )
     {
-        synchronized( outstandingLock )
+        synchronized ( outstandingLock )
         {
             outstandingRequests.remove( request.getMessageId() );
         }
     }
-    
-    
+
+
     /**
      * @return A list of all the abandonable requests for this session. 
      */
     public Map<Integer, AbandonableRequest> getOutstandingRequests()
     {
-        synchronized( outstandingLock )
+        synchronized ( outstandingLock )
         {
             return Collections.unmodifiableMap( outstandingRequests );
         }
@@ -303,8 +303,8 @@ public class LdapSession
     {
         return bindStatus;
     }
-    
-    
+
+
     /**
      * Set the current BindStatus to Simple authentication pending
      */
@@ -312,8 +312,8 @@ public class LdapSession
     {
         bindStatus = BindStatus.SIMPLE_AUTH_PENDING;
     }
-    
-    
+
+
     /**
      * Set the current BindStatus to SASL authentication pending
      */
@@ -330,7 +330,7 @@ public class LdapSession
     {
         bindStatus = BindStatus.ANONYMOUS;
     }
-    
+
 
     /**
      * Set the current BindStatus to authenticated
@@ -339,8 +339,8 @@ public class LdapSession
     {
         bindStatus = BindStatus.AUTHENTICATED;
     }
-    
-    
+
+
     /**
      * Get the mechanism selected by a user during a SASL Bind negotiation.
      * 
@@ -362,8 +362,8 @@ public class LdapSession
     {
         saslProperties.put( property, value );
     }
-    
-    
+
+
     /**
      * Get a Sasl property's value
      * 
@@ -374,8 +374,8 @@ public class LdapSession
     {
         return saslProperties.get( property );
     }
-    
-    
+
+
     /**
      * Clear all the Sasl values stored into the Map
      */
@@ -383,8 +383,8 @@ public class LdapSession
     {
         saslProperties.clear();
     }
-    
-    
+
+
     /**
      * Remove a property from the SaslProperty map
      *
@@ -414,8 +414,8 @@ public class LdapSession
     {
         this.ldapServer = ldapServer;
     }
-    
-    
+
+
     /**
      * Add a new Paged Search context into the stored context. If some
      * context with the same id already exists, it will be closed and 
@@ -426,12 +426,12 @@ public class LdapSession
     public void addPagedSearchContext( PagedSearchContext context ) throws Exception
     {
         PagedSearchContext oldContext = pagedSearchContexts.put( context.getCookieValue(), context );
-        
+
         if ( oldContext != null )
         {
             // ??? Very unlikely to happen ...
             EntryFilteringCursor cursor = oldContext.getCursor();
-            
+
             if ( cursor != null )
             {
                 try
@@ -445,8 +445,8 @@ public class LdapSession
             }
         }
     }
-    
-    
+
+
     /**
      * Remove a Paged Search context from the map storing all of them.
      * 
@@ -457,8 +457,8 @@ public class LdapSession
     {
         return pagedSearchContexts.remove( contextId );
     }
-    
-    
+
+
     /**
      * Get paged search context associated with an ID 
      * @param contextId The id for teh context we want to get 
@@ -466,12 +466,12 @@ public class LdapSession
      */
     public PagedSearchContext getPagedSearchContext( int contextId )
     {
-        PagedSearchContext ctx =  pagedSearchContexts.get( contextId );
-        
+        PagedSearchContext ctx = pagedSearchContexts.get( contextId );
+
         return ctx;
     }
-    
-    
+
+
     /**
      * The principal and remote address associated with this session.
      * @see Object#toString()
@@ -482,20 +482,20 @@ public class LdapSession
         {
             return "LdapSession : No Ldap session ...";
         }
-        
+
         StringBuilder sb = new StringBuilder();
-        
-        LdapPrincipal principal = coreSession.getAuthenticatedPrincipal(); 
+
+        LdapPrincipal principal = coreSession.getAuthenticatedPrincipal();
         SocketAddress address = coreSession.getClientAddress();
-        
+
         sb.append( "LdapSession : <" );
-        
+
         if ( principal != null )
         {
             sb.append( principal.getName() );
             sb.append( "," );
         }
-        
+
         if ( address != null )
         {
             sb.append( address );
@@ -504,9 +504,9 @@ public class LdapSession
         {
             sb.append( "..." );
         }
-        
+
         sb.append( ">" );
-        
+
         return sb.toString();
     }
 }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapSessionManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapSessionManager.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapSessionManager.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapSessionManager.java Tue Jan 24 16:15:05 2012
@@ -40,7 +40,7 @@ public class LdapSessionManager
     /** Concurrent hashMap backing for IoSession to LdapSession mapping */
     private Map<IoSession, LdapSession> ldapSessions = new ConcurrentHashMap<IoSession, LdapSession>( 100 );
 
-    
+
     /**
      * Gets the active sessions managed by the LdapServer.
      */
@@ -48,7 +48,7 @@ public class LdapSessionManager
     {
         return ldapSessions.values().toArray( new LdapSession[0] );
     }
-    
+
 
     /**
      * Adds a new LdapSession to the LdapServer.
@@ -62,8 +62,8 @@ public class LdapSessionManager
             ldapSessions.put( ldapSession.getIoSession(), ldapSession );
         }
     }
-    
-    
+
+
     /**
      * Removes an LdapSession managed by the {@link LdapServer}.  This method
      * has no side effects: meaning it does not perform cleanup tasks after
@@ -79,8 +79,8 @@ public class LdapSessionManager
             return ldapSessions.remove( session );
         }
     }
-    
-    
+
+
     /**
      * Gets the LdapSession associated with the MINA session.
      *

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/AddHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/AddHandler.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/AddHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/AddHandler.java Tue Jan 24 16:15:05 2012
@@ -39,12 +39,12 @@ public class AddHandler extends LdapRequ
 {
     /** The logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( AddHandler.class );
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
-    public void handle( LdapSession session, AddRequest req ) 
+    public void handle( LdapSession session, AddRequest req )
     {
         LOG.debug( "Handling request: {}", req );
         LdapResult result = req.getResultResponse().getLdapResult();
@@ -57,7 +57,7 @@ public class AddHandler extends LdapRequ
 
             // If success, here now, otherwise, we would have an exception.
             result.setResultCode( ResultCodeEnum.SUCCESS );
-            
+
             // Write the AddResponse message
             session.getIoSession().write( req.getResultResponse() );
         }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java Tue Jan 24 16:15:05 2012
@@ -151,7 +151,8 @@ public class BindHandler extends LdapReq
             {
                 LOG.info( "The {} principalDN cannot be found in the server : bind failure.", bindRequest.getName() );
             }
-            else if ( ( ( ClonedServerEntry ) principalEntry ).getOriginalEntry().contains( SchemaConstants.OBJECT_CLASS_AT,
+            else if ( ( ( ClonedServerEntry ) principalEntry ).getOriginalEntry().contains(
+                SchemaConstants.OBJECT_CLASS_AT,
                 SchemaConstants.REFERRAL_OC ) )
             {
                 LOG.info( "Bind principalDn points to referral." );
@@ -203,7 +204,7 @@ public class BindHandler extends LdapReq
                 code = ResultCodeEnum.UNWILLING_TO_PERFORM;
                 result.setResultCode( code );
             }
-            else if ( e instanceof LdapInvalidDnException)
+            else if ( e instanceof LdapInvalidDnException )
             {
                 code = ResultCodeEnum.INVALID_DN_SYNTAX;
                 result.setResultCode( code );
@@ -224,7 +225,7 @@ public class BindHandler extends LdapReq
 
             Dn dn = null;
 
-            if ( e instanceof LdapAuthenticationException)
+            if ( e instanceof LdapAuthenticationException )
             {
                 dn = ( ( LdapAuthenticationException ) e ).getResolvedDn();
             }
@@ -454,7 +455,7 @@ public class BindHandler extends LdapReq
         String saslMechanism = bindRequest.getSaslMechanism();
 
         // The empty mechanism is also a request for a new Bind session
-        if ( Strings.isEmpty(saslMechanism)
+        if ( Strings.isEmpty( saslMechanism )
             || !ldapSession.getSaslProperty( SaslConstants.SASL_MECH ).equals( saslMechanism ) )
         {
             sendAuthMethNotSupported( ldapSession, bindRequest );
@@ -538,28 +539,28 @@ public class BindHandler extends LdapReq
             {
                 // get out !
                 sendAuthMethNotSupported( ldapSession, bindRequest );
-                
+
                 return;
             }
-            
+
             // Store the mechanism in the ldap session
             ldapSession.putSaslProperty( SaslConstants.SASL_MECH, saslMechanism );
-            
+
             // Get the handler for this mechanism
             MechanismHandler mechanismHandler = handlers.get( saslMechanism );
-            
+
             // Store the mechanism handler in the salsProperties
             ldapSession.putSaslProperty( SaslConstants.SASL_MECH_HANDLER, mechanismHandler );
-            
+
             // Initialize the mechanism specific data
             mechanismHandler.init( ldapSession );
-            
+
             // Get the SaslServer instance which manage the C/R exchange
             SaslServer ss = mechanismHandler.handleMechanism( ldapSession, bindRequest );
-            
+
             // We have to generate a challenge
             generateSaslChallengeOrComplete( ldapSession, ss, bindRequest );
-            
+
             // And get back
             return;
         }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/CompareHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/CompareHandler.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/CompareHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/CompareHandler.java Tue Jan 24 16:15:05 2012
@@ -38,7 +38,7 @@ public class CompareHandler extends Ldap
 {
     private static final Logger LOG = LoggerFactory.getLogger( CompareHandler.class );
 
-    
+
     /**
      * @see LdapRequestHandler#handle(LdapSession, org.apache.directory.shared.ldap.model.message.Request)
      */
@@ -47,7 +47,7 @@ public class CompareHandler extends Ldap
     {
         LOG.debug( "Handling compare request while ignoring referrals: {}", req );
         LdapResult result = req.getResultResponse().getLdapResult();
-        
+
         try
         {
             if ( session.getCoreSession().compare( req ) )

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/DeleteHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/DeleteHandler.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/DeleteHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/DeleteHandler.java Tue Jan 24 16:15:05 2012
@@ -53,10 +53,10 @@ public class DeleteHandler extends LdapR
             // Call the underlying layer to delete the entry 
             CoreSession coreSession = session.getCoreSession();
             coreSession.delete( req );
-            
+
             // If success, here now, otherwise, we would have an exception.
             result.setResultCode( ResultCodeEnum.SUCCESS );
-            
+
             // Write the DeleteResponse message
             session.getIoSession().write( req.getResultResponse() );
         }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ExtendedHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ExtendedHandler.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ExtendedHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ExtendedHandler.java Tue Jan 24 16:15:05 2012
@@ -38,7 +38,8 @@ public class ExtendedHandler extends Lda
 {
     public void handle( LdapSession session, ExtendedRequest<ExtendedResponse> req ) throws Exception
     {
-        ExtendedOperationHandler<ExtendedRequest<ExtendedResponse>, ExtendedResponse> handler = getLdapServer().getExtendedOperationHandler( req.getRequestName() );
+        ExtendedOperationHandler<ExtendedRequest<ExtendedResponse>, ExtendedResponse> handler = getLdapServer()
+            .getExtendedOperationHandler( req.getRequestName() );
 
         if ( handler == null )
         {

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/LdapRequestHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/LdapRequestHandler.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/LdapRequestHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/LdapRequestHandler.java Tue Jan 24 16:15:05 2012
@@ -272,7 +272,7 @@ public abstract class LdapRequestHandler
 
         result.setDiagnosticMessage( msg );
 
-        if ( e instanceof LdapOperationException)
+        if ( e instanceof LdapOperationException )
         {
             LdapOperationException ne = ( LdapOperationException ) e;
 
@@ -282,7 +282,7 @@ public abstract class LdapRequestHandler
 
             if ( ( ne.getResolvedDn() != null ) && setMatchedDn )
             {
-                result.setMatchedDn( (Dn) ne.getResolvedDn() );
+                result.setMatchedDn( ( Dn ) ne.getResolvedDn() );
             }
 
             // Add the referrals if necessary
@@ -292,7 +292,7 @@ public abstract class LdapRequestHandler
 
                 do
                 {
-                    String ref = ( (LdapReferralException) e ).getReferralInfo();
+                    String ref = ( ( LdapReferralException ) e ).getReferralInfo();
                     referrals.addLdapUrl( ref );
                 }
                 while ( ( ( LdapReferralException ) e ).skipReferral() );

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyDnHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyDnHandler.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyDnHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyDnHandler.java Tue Jan 24 16:15:05 2012
@@ -19,7 +19,7 @@
  */
 package org.apache.directory.server.ldap.handlers;
 
- 
+
 import org.apache.directory.server.core.api.CoreSession;
 import org.apache.directory.server.ldap.LdapSession;
 import org.apache.directory.shared.ldap.model.message.LdapResult;
@@ -40,7 +40,7 @@ public class ModifyDnHandler extends Lda
 {
     private static final Logger LOG = LoggerFactory.getLogger( ModifyDnHandler.class );
 
-    
+
     /**
      * Deal with a ModifyDN request received from a client.
      *
@@ -71,19 +71,19 @@ public class ModifyDnHandler extends Lda
             session.getIoSession().write( req.getResultResponse() );
             return;
         }
-        
+
         try
         {
             SchemaManager schemaManager = session.getCoreSession().getDirectoryService().getSchemaManager();
             Dn newRdn = new Dn( schemaManager, req.getNewRdn().getName() );
-            
+
             Dn oldRdn = new Dn( schemaManager, req.getName().getRdn().getName() );
-            
-            boolean rdnChanged = req.getNewRdn() != null && 
-                ! newRdn.getNormName().equals( oldRdn.getNormName() );
-            
+
+            boolean rdnChanged = req.getNewRdn() != null &&
+                !newRdn.getNormName().equals( oldRdn.getNormName() );
+
             CoreSession coreSession = session.getCoreSession();
-            
+
             if ( rdnChanged )
             {
                 if ( req.getNewSuperior() != null )

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyHandler.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyHandler.java Tue Jan 24 16:15:05 2012
@@ -53,10 +53,10 @@ public class ModifyHandler extends LdapR
             // Call the underlying layer to delete the entry
             CoreSession coreSession = session.getCoreSession();
             coreSession.modify( req );
-            
+
             // If success, here now, otherwise, we would have an exception.
             result.setResultCode( ResultCodeEnum.SUCCESS );
-            
+
             // Write the DeleteResponse message
             session.getIoSession().write( req.getResultResponse() );
         }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchAbandonListener.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchAbandonListener.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchAbandonListener.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchAbandonListener.java Tue Jan 24 16:15:05 2012
@@ -43,33 +43,33 @@ public class SearchAbandonListener imple
     private final LdapServer ldapServer;
     private EntryFilteringCursor cursor;
     private DirectoryListener listener;
-    
-    
+
+
     public SearchAbandonListener( LdapServer ldapServer, EntryFilteringCursor cursor, DirectoryListener listener )
     {
         if ( ldapServer == null )
         {
             throw new IllegalArgumentException( "ldapServer" );
         }
-        
+
         this.ldapServer = ldapServer;
         this.cursor = cursor;
         this.listener = listener;
     }
-    
-    
+
+
     public SearchAbandonListener( LdapServer ldapServer, DirectoryListener listener )
     {
-        this ( ldapServer, null, listener );
+        this( ldapServer, null, listener );
     }
-    
-    
+
+
     public SearchAbandonListener( LdapServer ldapServer, EntryFilteringCursor cursor )
     {
-        this ( ldapServer, cursor, null );
+        this( ldapServer, cursor, null );
     }
-    
-    
+
+
     public void requestAbandoned( AbandonableRequest req )
     {
         if ( listener != null )
@@ -97,5 +97,3 @@ public class SearchAbandonListener imple
         }
     }
 }
-
-



Mime
View raw message