directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1235326 [13/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/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/ETypeInfo2Entry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/ETypeInfo2Entry.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/ETypeInfo2Entry.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/ETypeInfo2Entry.java Tue Jan 24 16:15:05 2012
@@ -59,11 +59,11 @@ public class ETypeInfo2Entry extends Abs
 
     /** The encryption type */
     private EncryptionType etype;
-    
+
     /** The salt */
     private String salt;
     private byte[] saltBytes;
-    
+
     /** The s2k params */
     private byte[] s2kparams;
 
@@ -73,6 +73,7 @@ public class ETypeInfo2Entry extends Abs
     private int s2kparamsTagLength;
     private int etypeInfo2EntrySeqLength;
 
+
     /**
      * Creates a new instance of ETypeInfo2Entry.
      */
@@ -100,7 +101,7 @@ public class ETypeInfo2Entry extends Abs
         this.salt = salt;
     }
 
-    
+
     /**
      * Returns the s2kparams.
      *
@@ -120,7 +121,7 @@ public class ETypeInfo2Entry extends Abs
         this.s2kparams = s2kparams;
     }
 
-    
+
     /**
      * Returns the {@link EncryptionType}.
      *
@@ -179,7 +180,7 @@ public class ETypeInfo2Entry extends Abs
         // Compute the salt
         if ( salt != null )
         {
-            saltBytes = Strings.getBytesUtf8(salt);
+            saltBytes = Strings.getBytesUtf8( salt );
             saltTagLength = 1 + TLV.getNbBytes( saltBytes.length ) + saltBytes.length;
             etypeInfo2EntrySeqLength += 1 + TLV.getNbBytes( saltTagLength ) + saltTagLength;
         }
@@ -236,7 +237,7 @@ public class ETypeInfo2Entry extends Abs
                 // The tag
                 buffer.put( ( byte ) KerberosConstants.ETYPE_INFO2_ENTRY_SALT_TAG );
                 buffer.put( TLV.getBytes( saltTagLength ) );
-                
+
                 // The value
                 buffer.put( UniversalTag.GENERAL_STRING.getValue() );
                 buffer.put( TLV.getBytes( saltBytes.length ) );
@@ -260,14 +261,14 @@ public class ETypeInfo2Entry extends Abs
 
         if ( IS_DEBUG )
         {
-            LOG.debug( "ETYPE-INFO2-ENTRY encoding : {}", Strings.dumpBytes(buffer.array()) );
+            LOG.debug( "ETYPE-INFO2-ENTRY encoding : {}", Strings.dumpBytes( buffer.array() ) );
             LOG.debug( "ETYPE-INFO2-ENTRY initial value : {}", toString() );
         }
 
         return buffer;
     }
 
-    
+
     /**
      * @see Object#toString()
      */
@@ -285,7 +286,7 @@ public class ETypeInfo2Entry extends Abs
 
         if ( salt != null )
         {
-            sb.append( "    s2kparams: " ).append( Strings.dumpBytes(s2kparams) ).append( '\n' );
+            sb.append( "    s2kparams: " ).append( Strings.dumpBytes( s2kparams ) ).append( '\n' );
         }
 
         sb.append( "}\n" );

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/ETypeInfoEntry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/ETypeInfoEntry.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/ETypeInfoEntry.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/ETypeInfoEntry.java Tue Jan 24 16:15:05 2012
@@ -58,7 +58,7 @@ public class ETypeInfoEntry extends Abst
 
     /** The encryption type */
     private EncryptionType etype;
-    
+
     /** The salt */
     private byte[] salt;
 
@@ -67,6 +67,7 @@ public class ETypeInfoEntry extends Abst
     private int saltTagLength;
     private int etypeInfoEntrySeqLength;
 
+
     /**
      * Creates a new instance of ETypeInfoEntry.
      * 
@@ -107,7 +108,7 @@ public class ETypeInfoEntry extends Abst
         this.salt = salt;
     }
 
-    
+
     /**
      * Returns the {@link EncryptionType}.
      *
@@ -218,14 +219,14 @@ public class ETypeInfoEntry extends Abst
 
         if ( IS_DEBUG )
         {
-            LOG.debug( "ETYPE-INFO-ENTRY encoding : {}", Strings.dumpBytes(buffer.array()) );
+            LOG.debug( "ETYPE-INFO-ENTRY encoding : {}", Strings.dumpBytes( buffer.array() ) );
             LOG.debug( "ETYPE-INFO-ENTRY initial value : {}", toString() );
         }
 
         return buffer;
     }
 
-    
+
     /**
      * @see Object#toString()
      */
@@ -238,7 +239,7 @@ public class ETypeInfoEntry extends Abst
 
         if ( salt != null )
         {
-            sb.append( "    salt: " ).append( Strings.dumpBytes(salt) ).append( '\n' );
+            sb.append( "    salt: " ).append( Strings.dumpBytes( salt ) ).append( '\n' );
         }
 
         sb.append( "}\n" );

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncKdcRepPart.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncKdcRepPart.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncKdcRepPart.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncKdcRepPart.java Tue Jan 24 16:15:05 2012
@@ -70,37 +70,37 @@ public class EncKdcRepPart extends Abstr
 
     /** The encryption key */
     private EncryptionKey key;
-    
+
     /** The time of the last request */
     private LastReq lastReq;
-    
+
     /** The nonce */
     private int nonce;
-    
+
     /** The KeyExpiration */
     private KerberosTime keyExpiration; //optional
-    
+
     /** The Ticket flags */
     private TicketFlags flags = new TicketFlags();
-    
+
     /** The initial Authentication time */
     private KerberosTime authTime;
-    
+
     /** The ticket's start time */
     private KerberosTime startTime; //optional
-    
+
     /** The Ticket expiration time */
     private KerberosTime endTime;
-    
+
     /** Maximum endtime in a renewal */
     private KerberosTime renewTill; //optional
-    
+
     /** The server's realm */
     private String srealm;
-    
+
     /** The server's principal */
     private PrincipalName sname;
-    
+
     /** The client addresses */
     private HostAddresses caddr; //optional
 
@@ -115,6 +115,7 @@ public class EncKdcRepPart extends Abstr
     private int caddrLength;
     private int encKdcRepPartSeqLength;
 
+
     /**
      * Creates a new instance of EncKdcRepPart.
      */
@@ -452,7 +453,7 @@ public class EncKdcRepPart extends Abstr
         // The last-req
         lastReqLength = lastReq.computeLength();
         encKdcRepPartSeqLength += 1 + TLV.getNbBytes( lastReqLength ) + lastReqLength;
-        
+
         // The nonce
         nonceLength = Value.getNbBytes( nonce );
         nonceLength = 1 + TLV.getNbBytes( nonceLength ) + nonceLength;
@@ -467,7 +468,7 @@ public class EncKdcRepPart extends Abstr
         // The flags
         flagsLength = 1 + 1 + 5;
         encKdcRepPartSeqLength += 1 + TLV.getNbBytes( flagsLength ) + flagsLength;
-        
+
         // The authtime
         encKdcRepPartSeqLength += 1 + 1 + 0x11;
 
@@ -476,7 +477,7 @@ public class EncKdcRepPart extends Abstr
         {
             encKdcRepPartSeqLength += 1 + 1 + 0x11;
         }
-        
+
         // The endtime
         encKdcRepPartSeqLength += 1 + 1 + 0x11;
 
@@ -504,8 +505,8 @@ public class EncKdcRepPart extends Abstr
 
         return 1 + TLV.getNbBytes( encKdcRepPartSeqLength ) + encKdcRepPartSeqLength;
     }
-    
-    
+
+
     /**
      * Encode the EncKdcRepPart message to a PDU. 
      * 
@@ -525,7 +526,7 @@ public class EncKdcRepPart extends Abstr
             // The EncKdcRepPart sequence
             buffer.put( UniversalTag.SEQUENCE.getValue() );
             buffer.put( TLV.getBytes( encKdcRepPartSeqLength ) );
-            
+
             // The Key
             buffer.put( ( byte ) KerberosConstants.ENC_KDC_REP_PART_KEY_TAG );
             buffer.put( TLV.getBytes( keyLength ) );
@@ -537,37 +538,37 @@ public class EncKdcRepPart extends Abstr
             lastReq.encode( buffer );
 
             // The nonce
-            buffer.put( ( byte )KerberosConstants.ENC_KDC_REP_PART_NONCE_TAG );
+            buffer.put( ( byte ) KerberosConstants.ENC_KDC_REP_PART_NONCE_TAG );
             buffer.put( TLV.getBytes( nonceLength ) );
             Value.encode( buffer, nonce );
-            
+
             // The key-expiration, if any
             if ( keyExpiration != null )
             {
-                buffer.put( ( byte )KerberosConstants.ENC_KDC_REP_PART_KEY_EXPIRATION_TAG );
+                buffer.put( ( byte ) KerberosConstants.ENC_KDC_REP_PART_KEY_EXPIRATION_TAG );
                 buffer.put( TLV.getBytes( 0x11 ) );
-                
+
                 buffer.put( ( byte ) UniversalTag.GENERALIZED_TIME.getValue() );
                 buffer.put( ( byte ) 0x0F );
                 buffer.put( keyExpiration.getBytes() );
             }
-            
+
             // The flags
-            buffer.put( ( byte )KerberosConstants.ENC_KDC_REP_PART_FLAGS_TAG );
+            buffer.put( ( byte ) KerberosConstants.ENC_KDC_REP_PART_FLAGS_TAG );
             buffer.put( TLV.getBytes( 0x07 ) );
             Value.encode( buffer, flags );
-            
+
             // The authtime
-            buffer.put( ( byte )KerberosConstants.ENC_KDC_REP_PART_AUTH_TIME_TAG );
+            buffer.put( ( byte ) KerberosConstants.ENC_KDC_REP_PART_AUTH_TIME_TAG );
             buffer.put( TLV.getBytes( 0x11 ) );
             buffer.put( ( byte ) UniversalTag.GENERALIZED_TIME.getValue() );
             buffer.put( ( byte ) 0x0F );
             buffer.put( authTime.getBytes() );
-            
+
             // The starttime if any
             if ( startTime != null )
             {
-                buffer.put( ( byte )KerberosConstants.ENC_KDC_REP_PART_START_TIME_TAG );
+                buffer.put( ( byte ) KerberosConstants.ENC_KDC_REP_PART_START_TIME_TAG );
                 buffer.put( TLV.getBytes( 0x11 ) );
                 buffer.put( ( byte ) UniversalTag.GENERALIZED_TIME.getValue() );
                 buffer.put( ( byte ) 0x0F );
@@ -575,38 +576,38 @@ public class EncKdcRepPart extends Abstr
             }
 
             // The endtime
-            buffer.put( ( byte )KerberosConstants.ENC_KDC_REP_PART_END_TIME_TAG );
+            buffer.put( ( byte ) KerberosConstants.ENC_KDC_REP_PART_END_TIME_TAG );
             buffer.put( TLV.getBytes( 0x11 ) );
             buffer.put( ( byte ) UniversalTag.GENERALIZED_TIME.getValue() );
             buffer.put( ( byte ) 0x0F );
             buffer.put( endTime.getBytes() );
-            
+
             // The renew-till if any
             if ( renewTill != null )
             {
-                buffer.put( ( byte )KerberosConstants.ENC_KDC_REP_PART_RENEW_TILL_TAG );
+                buffer.put( ( byte ) KerberosConstants.ENC_KDC_REP_PART_RENEW_TILL_TAG );
                 buffer.put( TLV.getBytes( 0x11 ) );
                 buffer.put( ( byte ) UniversalTag.GENERALIZED_TIME.getValue() );
                 buffer.put( ( byte ) 0x0F );
                 buffer.put( renewTill.getBytes() );
             }
-            
+
             // The srealm
-            buffer.put( ( byte )KerberosConstants.ENC_KDC_REP_PART_SREALM_TAG );
+            buffer.put( ( byte ) KerberosConstants.ENC_KDC_REP_PART_SREALM_TAG );
             buffer.put( TLV.getBytes( srealmLength ) );
             buffer.put( UniversalTag.GENERAL_STRING.getValue() );
             buffer.put( TLV.getBytes( srealmBytes.length ) );
             buffer.put( srealmBytes );
-            
+
             // The sname
-            buffer.put( ( byte )KerberosConstants.ENC_KDC_REP_PART_SNAME_TAG );
+            buffer.put( ( byte ) KerberosConstants.ENC_KDC_REP_PART_SNAME_TAG );
             buffer.put( TLV.getBytes( snameLength ) );
             sname.encode( buffer );
 
             // The caddr if any
             if ( caddr != null )
             {
-                buffer.put( ( byte )KerberosConstants.ENC_KDC_REP_PART_CADDR_TAG );
+                buffer.put( ( byte ) KerberosConstants.ENC_KDC_REP_PART_CADDR_TAG );
                 buffer.put( TLV.getBytes( caddrLength ) );
                 caddr.encode( buffer );
             }
@@ -620,34 +621,34 @@ public class EncKdcRepPart extends Abstr
 
         if ( IS_DEBUG )
         {
-            log.debug( "EncKdcRepPart encoding : {}", Strings.dumpBytes(buffer.array()) );
+            log.debug( "EncKdcRepPart encoding : {}", Strings.dumpBytes( buffer.array() ) );
             log.debug( "EncKdcRepPart initial value : {}", toString() );
         }
 
         return buffer;
     }
-        
-    
+
+
     /**
      * @see Object#toString()
      */
     public String toString()
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( "EncKdcRepPart : \n" );
         sb.append( "    key : " ).append( key ).append( "\n" );
         sb.append( "    last-req : " ).append( lastReq ).append( "\n" );
         sb.append( "    nonce : " ).append( nonce ).append( "\n" );
-        
+
         if ( keyExpiration != null )
         {
             sb.append( "    key-expiration : " ).append( keyExpiration ).append( "\n" );
         }
-        
+
         sb.append( "    flags : " ).append( flags ).append( "\n" );
         sb.append( "    authtime : " ).append( authTime ).append( "\n" );
-        
+
         if ( startTime != null )
         {
             sb.append( "    starttime : " ).append( startTime ).append( "\n" );
@@ -659,10 +660,10 @@ public class EncKdcRepPart extends Abstr
         {
             sb.append( "    renew-till : " ).append( renewTill ).append( "\n" );
         }
-        
+
         sb.append( "    srealm : " ).append( srealm ).append( "\n" );
         sb.append( "    sname : " ).append( sname ).append( "\n" );
-        
+
         if ( caddr != null )
         {
             sb.append( "    caddr : " ).append( caddr ).append( "\n" );

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncKrbCredPart.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncKrbCredPart.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncKrbCredPart.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncKrbCredPart.java Tue Jan 24 16:15:05 2012
@@ -225,7 +225,7 @@ public class EncKrbCredPart extends Abst
                 // timestamp tag and value
                 buffer.put( ( byte ) KerberosConstants.ENC_KRB_CRED_PART_TIMESTAMP_TAG );
                 buffer.put( TLV.getBytes( timestampLen ) );
-                
+
                 buffer.put( UniversalTag.GENERALIZED_TIME.getValue() );
                 buffer.put( ( byte ) 0x0F );
                 buffer.put( timestampBytes );
@@ -264,7 +264,7 @@ public class EncKrbCredPart extends Abst
 
         if ( IS_DEBUG )
         {
-            log.debug( "EncKrbCredPart encoding : {}", Strings.dumpBytes(buffer.array()) );
+            log.debug( "EncKrbCredPart encoding : {}", Strings.dumpBytes( buffer.array() ) );
             log.debug( "EncKrbCredPart initial value : {}", toString() );
         }
 

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncKrbPrivPart.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncKrbPrivPart.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncKrbPrivPart.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncKrbPrivPart.java Tue Jan 24 16:15:05 2012
@@ -20,6 +20,7 @@
 
 package org.apache.directory.shared.kerberos.components;
 
+
 import java.nio.BufferOverflowException;
 import java.nio.ByteBuffer;
 
@@ -35,6 +36,7 @@ import org.apache.directory.shared.util.
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+
 /**
  * The EncKrbPrivPart structure is used to store a EncKrbPrivPart associated to a type.
  * 
@@ -88,6 +90,7 @@ public class EncKrbPrivPart extends Abst
     private int encKrbPrivPartSeqLen;
     private int encKrbPrivPartLen;
 
+
     /**
      * @return the userData
      */
@@ -277,7 +280,7 @@ public class EncKrbPrivPart extends Abst
         }
 
         encKrbPrivPartLen = 1 + TLV.getNbBytes( encKrbPrivPartSeqLen ) + encKrbPrivPartSeqLen;
-        
+
         return 1 + TLV.getNbBytes( encKrbPrivPartLen ) + encKrbPrivPartLen;
     }
 
@@ -297,7 +300,7 @@ public class EncKrbPrivPart extends Abst
         {
             buffer.put( ( byte ) KerberosConstants.ENC_KRB_PRIV_PART_TAG );
             buffer.put( TLV.getBytes( encKrbPrivPartLen ) );
-            
+
             buffer.put( UniversalTag.SEQUENCE.getValue() );
             buffer.put( TLV.getBytes( encKrbPrivPartSeqLen ) );
 
@@ -356,14 +359,14 @@ public class EncKrbPrivPart extends Abst
 
         if ( IS_DEBUG )
         {
-            log.debug( "EncKrbPrivPart encoding : {}", Strings.dumpBytes(buffer.array()) );
+            log.debug( "EncKrbPrivPart encoding : {}", Strings.dumpBytes( buffer.array() ) );
             log.debug( "EncKrbPrivPart initial value : {}", toString() );
         }
 
         return buffer;
     }
 
-    
+
     /**
      * @see Object#toString()
      */
@@ -372,7 +375,7 @@ public class EncKrbPrivPart extends Abst
         StringBuilder sb = new StringBuilder();
 
         sb.append( "EncKrbPrivPart : {\n" );
-        sb.append( "    user-data: " ).append( Strings.dumpBytes(userData) ).append( '\n' );
+        sb.append( "    user-data: " ).append( Strings.dumpBytes( userData ) ).append( '\n' );
 
         if ( timestamp != null )
         {

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncTicketPart.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncTicketPart.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncTicketPart.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncTicketPart.java Tue Jan 24 16:15:05 2012
@@ -97,7 +97,6 @@ public class EncTicketPart extends Abstr
     /** the authorization data */
     private AuthorizationData authorizationData;
 
-
     private int flagsLen;
     private int keyLen;
     private int cRealmLen;
@@ -117,6 +116,7 @@ public class EncTicketPart extends Abstr
     private int encTikcetPartSeqLen;
     private int encTikcetPartLen;
 
+
     /**
      * compute length for EncTicketPart:
      * <pre>
@@ -180,7 +180,7 @@ public class EncTicketPart extends Abstr
         keyLen = key.computeLength();
         encTikcetPartSeqLen += 1 + TLV.getNbBytes( keyLen ) + keyLen;
 
-        cRealmBytes = Strings.getBytesUtf8(cRealm);
+        cRealmBytes = Strings.getBytesUtf8( cRealm );
         cRealmLen = 1 + TLV.getNbBytes( cRealmBytes.length ) + cRealmBytes.length;
         encTikcetPartSeqLen += 1 + TLV.getNbBytes( cRealmLen ) + cRealmLen;
 
@@ -333,7 +333,7 @@ public class EncTicketPart extends Abstr
 
         if ( IS_DEBUG )
         {
-            log.debug( "EncTicketPart encoding : {}", Strings.dumpBytes(buffer.array()) );
+            log.debug( "EncTicketPart encoding : {}", Strings.dumpBytes( buffer.array() ) );
             log.debug( "EncTicketPart initial value : {}", toString() );
         }
 
@@ -552,11 +552,11 @@ public class EncTicketPart extends Abstr
         {
             flags = new TicketFlags();
         }
-        
+
         flags.setFlag( flag.getValue() );
     }
-    
-    
+
+
     /**
      * @see Object#toString()
      */

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncryptedData.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncryptedData.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncryptedData.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncryptedData.java Tue Jan 24 16:15:05 2012
@@ -76,6 +76,7 @@ public class EncryptedData extends Abstr
     private int cipherTagLength;
     private int encryptedDataSeqLength;
 
+
     /**
      * Creates a new instance of EncryptedData.
      */
@@ -83,7 +84,8 @@ public class EncryptedData extends Abstr
     {
         hasKvno = !HAS_KVNO;
     }
-    
+
+
     /**
      * Creates a new instance of EncryptedData.
      *
@@ -135,6 +137,7 @@ public class EncryptedData extends Abstr
         this.eType = eType;
     }
 
+
     /**
      * Returns the key version.
      *
@@ -145,6 +148,7 @@ public class EncryptedData extends Abstr
         return hasKvno ? kvno : -1;
     }
 
+
     /**
      * Set the key version
      * @param kvno The key version
@@ -155,6 +159,7 @@ public class EncryptedData extends Abstr
         hasKvno = true;
     }
 
+
     /**
      * Tells if there is a key version.
      *
@@ -176,6 +181,7 @@ public class EncryptedData extends Abstr
         return cipher;
     }
 
+
     /**
      * Set the cipher text
      * @param cipher The cipher text
@@ -184,7 +190,7 @@ public class EncryptedData extends Abstr
     {
         this.cipher = cipher;
     }
-    
+
 
     /**
      * Compute the EncryptedData length
@@ -213,8 +219,7 @@ public class EncryptedData extends Abstr
         // Compute the encryption Type length
         int eTypeLength = Value.getNbBytes( eType.getValue() );
         eTypeTagLength = 1 + TLV.getNbBytes( eTypeLength ) + eTypeLength;
-        encryptedDataSeqLength = 1 + TLV.getNbBytes( eTypeTagLength ) + eTypeTagLength; 
-
+        encryptedDataSeqLength = 1 + TLV.getNbBytes( eTypeTagLength ) + eTypeTagLength;
 
         // Compute the kvno length if any
         if ( hasKvno )
@@ -297,14 +302,14 @@ public class EncryptedData extends Abstr
         }
         catch ( BufferOverflowException boe )
         {
-            log.error( I18n.err( I18n.ERR_141, 1 + TLV.getNbBytes( encryptedDataSeqLength ) 
+            log.error( I18n.err( I18n.ERR_141, 1 + TLV.getNbBytes( encryptedDataSeqLength )
                 + encryptedDataSeqLength, buffer.capacity() ) );
             throw new EncoderException( I18n.err( I18n.ERR_138 ) );
         }
 
         if ( IS_DEBUG )
         {
-            log.debug( "EncryptedData encoding : {}", Strings.dumpBytes(buffer.array()) );
+            log.debug( "EncryptedData encoding : {}", Strings.dumpBytes( buffer.array() ) );
             log.debug( "EncryptedData initial value : {}", toString() );
         }
 
@@ -326,7 +331,7 @@ public class EncryptedData extends Abstr
         return result;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -337,33 +342,33 @@ public class EncryptedData extends Abstr
         {
             return true;
         }
-        
+
         if ( obj == null )
         {
             return false;
         }
-        
+
         EncryptedData other = ( EncryptedData ) obj;
-        
+
         if ( !Arrays.equals( cipher, other.cipher ) )
         {
             return false;
         }
-        
+
         if ( eType != other.eType )
         {
             return false;
         }
-        
+
         if ( kvno != other.kvno )
         {
             return false;
         }
-        
+
         return true;
     }
 
-    
+
     /**
      * @see Object#toString()
      */
@@ -371,8 +376,8 @@ public class EncryptedData extends Abstr
     {
         return toString( "" );
     }
-    
-    
+
+
     /**
      * @see Object#toString()
      */
@@ -388,7 +393,7 @@ public class EncryptedData extends Abstr
             sb.append( tabs ).append( "    kvno: " ).append( kvno ).append( '\n' );
         }
 
-        sb.append( tabs ).append( "    cipher: " ).append( Strings.dumpBytes(cipher) ).append( "\n}\n" );
+        sb.append( tabs ).append( "    cipher: " ).append( Strings.dumpBytes( cipher ) ).append( "\n}\n" );
 
         return sb.toString();
     }

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncryptionKey.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncryptionKey.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncryptionKey.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncryptionKey.java Tue Jan 24 16:15:05 2012
@@ -63,7 +63,7 @@ public class EncryptionKey extends Abstr
 
     /** The encrypted value */
     private byte[] keyValue;
-    
+
     /** The key version */
     private int keyVersion;
 
@@ -72,13 +72,14 @@ public class EncryptionKey extends Abstr
     private int keyValueLength;
     private int encryptionKeyLength;
 
+
     /**
      * Creates a new instance of EncryptionKey.
      */
     public EncryptionKey()
     {
     }
-    
+
 
     /**
      * Creates a new instance of EncryptionKey.
@@ -135,7 +136,7 @@ public class EncryptionKey extends Abstr
      * Set the encryption type
      * @param keyType The encryption type
      */
-    public void setKeyType( EncryptionType keyType ) 
+    public void setKeyType( EncryptionType keyType )
     {
         this.keyType = keyType;
     }
@@ -162,22 +163,22 @@ public class EncryptionKey extends Abstr
         return keyVersion;
     }
 
-    
+
     /**
      * Set the key value
      * @param keyVersion The key version
      */
-    public void setKeyVersion( int keyVersion)
+    public void setKeyVersion( int keyVersion )
     {
         this.keyVersion = keyVersion;
     }
 
-    
+
     /**
      * Set the key value
      * @param keyValue The key value
      */
-    public void setKeyValue( byte[] keyValue ) 
+    public void setKeyValue( byte[] keyValue )
     {
         this.keyValue = keyValue;
     }
@@ -192,7 +193,7 @@ public class EncryptionKey extends Abstr
         int hash = 37;
         hash = hash * 17 + keyType.hashCode();
         hash = hash * 17 + Arrays.hashCode( keyValue );
-        
+
         return hash;
     }
 
@@ -313,7 +314,7 @@ public class EncryptionKey extends Abstr
 
         if ( IS_DEBUG )
         {
-            log.debug( "EncryptionKey encoding : {}", Strings.dumpBytes(buffer.array()) );
+            log.debug( "EncryptionKey encoding : {}", Strings.dumpBytes( buffer.array() ) );
             log.debug( "EncryptionKey initial value : {}", toString() );
         }
 

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddress.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddress.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddress.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddress.java Tue Jan 24 16:15:05 2012
@@ -82,7 +82,7 @@ public class HostAddress extends Abstrac
     private int hostAddressLength;
     private int hostAddressSeqLength;
 
-    
+
     /**
      * Creates an empty HostAdress instance
      */
@@ -90,6 +90,7 @@ public class HostAddress extends Abstrac
     {
     }
 
+
     /**
      * Creates a new instance of HostAddress.
      *
@@ -125,12 +126,12 @@ public class HostAddress extends Abstrac
     {
         int hash = 37;
         hash = hash * 17 + addrType.hashCode();
-        
+
         if ( address != null )
         {
             hash = hash * 17 + Arrays.hashCode( address );
         }
-        
+
         return hash;
     }
 
@@ -148,14 +149,14 @@ public class HostAddress extends Abstrac
         {
             return true;
         }
-        
-        if ( !(that instanceof HostAddress ) )
+
+        if ( !( that instanceof HostAddress ) )
         {
             return false;
         }
-        
-        HostAddress hostAddress = (HostAddress)that;
-        
+
+        HostAddress hostAddress = ( HostAddress ) that;
+
         if ( addrType != hostAddress.addrType || ( address != null && hostAddress.address == null )
             || ( address == null && hostAddress.address != null ) )
         {
@@ -298,7 +299,7 @@ public class HostAddress extends Abstrac
 
         if ( IS_DEBUG )
         {
-            LOG.debug( "Checksum encoding : {}", Strings.dumpBytes(buffer.array()) );
+            LOG.debug( "Checksum encoding : {}", Strings.dumpBytes( buffer.array() ) );
             LOG.debug( "Checksum initial value : {}", toString() );
         }
 
@@ -350,7 +351,7 @@ public class HostAddress extends Abstrac
         }
         catch ( UnknownHostException uhe )
         {
-            return "Unknow host : " + Strings.utf8ToString(address);
+            return "Unknow host : " + Strings.utf8ToString( address );
         }
     }
 }

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddresses.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddresses.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddresses.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddresses.java Tue Jan 24 16:15:05 2012
@@ -71,7 +71,7 @@ public class HostAddresses extends Abstr
     {
         this.addresses = new ArrayList<HostAddress>();
     }
-    
+
 
     /**
      * Creates a new instance of HostAddresses.
@@ -125,13 +125,13 @@ public class HostAddresses extends Abstr
     public int hashCode()
     {
         int hash = 37;
-        
+
         if ( addresses != null )
         {
             hash = hash * 17 + addresses.size();
             hash = 17 + addresses.hashCode();
         }
-        
+
         return hash;
     }
 
@@ -145,13 +145,13 @@ public class HostAddresses extends Abstr
     @Override
     public boolean equals( Object obj )
     {
-        if ( obj == null ) 
+        if ( obj == null )
         {
             return false;
         }
-        
+
         HostAddresses that = ( HostAddresses ) obj;
-        
+
         // Addresses can't be null after creation
         if ( addresses.size() != that.addresses.size() )
         {
@@ -263,7 +263,7 @@ public class HostAddresses extends Abstr
 
         if ( IS_DEBUG )
         {
-            LOG.debug( "HostAddresses encoding : {}", Strings.dumpBytes(buffer.array()) );
+            LOG.debug( "HostAddresses encoding : {}", Strings.dumpBytes( buffer.array() ) );
             LOG.debug( "HostAddresses initial value : {}", toString() );
         }
 

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KdcRep.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KdcRep.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KdcRep.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KdcRep.java Tue Jan 24 16:15:05 2012
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.shared.kerberos.components;
 
+
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.List;
@@ -34,6 +35,7 @@ import org.apache.directory.shared.kerbe
 import org.apache.directory.shared.kerberos.messages.Ticket;
 import org.apache.directory.shared.util.Strings;
 
+
 /**
  * The KDC-REP data structure. It will store the object described by the ASN.1 grammar :
  * <pre>
@@ -56,22 +58,22 @@ public class KdcRep extends KerberosMess
 {
     /** The PA-DATAs */
     private List<PaData> paData;
-    
+
     /** The client realm */
     private String crealm;
-    
+
     /** A storage for a byte array representation of the realm */
     private byte[] crealmBytes;
-    
+
     /** The client principal name */
     private PrincipalName cname;
-    
+
     /** The ticket tickets */
     private Ticket ticket;
-    
+
     /** Encoded part */
     private EncryptedData encPart;
-    
+
     /** The decoded KDC-REP part */
     protected EncKdcRepPart encKdcRepPart;
 
@@ -88,6 +90,7 @@ public class KdcRep extends KerberosMess
     private int kdcRepSeqLength;
     private int kdcRepLength;
 
+
     /**
      * Creates a new instance of KDC-REP.
      */
@@ -132,7 +135,7 @@ public class KdcRep extends KerberosMess
     {
         this.paData.add( paData );
     }
-    
+
 
     /**
      * Returns the client realm.
@@ -165,7 +168,7 @@ public class KdcRep extends KerberosMess
         return cname;
     }
 
-    
+
     /**
      * Set the client principalName
      * @param cname the client principalName
@@ -175,7 +178,7 @@ public class KdcRep extends KerberosMess
         this.cname = cname;
     }
 
-    
+
     /**
      * Returns the {@link Ticket}
      *
@@ -216,7 +219,7 @@ public class KdcRep extends KerberosMess
         this.encPart = encPart;
     }
 
-    
+
     /**
      * @return the encKdcRepPart
      */
@@ -233,8 +236,8 @@ public class KdcRep extends KerberosMess
     {
         this.encKdcRepPart = encKdcRepPart;
     }
-    
-    
+
+
     /**
      * Compute the KDC-REP length
      * <pre>
@@ -281,11 +284,11 @@ public class KdcRep extends KerberosMess
     {
         // The pvno length
         pvnoLength = 1 + 1 + 1;
-        kdcRepSeqLength = 1 + TLV.getNbBytes( pvnoLength ) + pvnoLength; 
+        kdcRepSeqLength = 1 + TLV.getNbBytes( pvnoLength ) + pvnoLength;
 
         // The msg-type length
         msgTypeLength = 1 + 1 + 1;
-        kdcRepSeqLength += 1 + TLV.getNbBytes( msgTypeLength ) + msgTypeLength; 
+        kdcRepSeqLength += 1 + TLV.getNbBytes( msgTypeLength ) + msgTypeLength;
 
         // Compute the pa-data length.
         if ( paData.size() != 0 )
@@ -293,42 +296,42 @@ public class KdcRep extends KerberosMess
             paDataLengths = new int[paData.size()];
             int pos = 0;
             paDataSeqLength = 0;
-            
+
             for ( PaData paDataElem : paData )
             {
                 paDataLengths[pos] = paDataElem.computeLength();
                 paDataSeqLength += paDataLengths[pos];
                 pos++;
             }
-            
+
             paDataLength = 1 + TLV.getNbBytes( paDataSeqLength ) + paDataSeqLength;
-            kdcRepSeqLength += 1 + TLV.getNbBytes( paDataLength ) + paDataLength; 
+            kdcRepSeqLength += 1 + TLV.getNbBytes( paDataLength ) + paDataLength;
         }
-        
+
         // The crealm length
-        crealmBytes = Strings.getBytesUtf8(crealm);
+        crealmBytes = Strings.getBytesUtf8( crealm );
         crealmLength = 1 + TLV.getNbBytes( crealmBytes.length ) + crealmBytes.length;
-        kdcRepSeqLength += 1 + TLV.getNbBytes( crealmLength ) + crealmLength; 
+        kdcRepSeqLength += 1 + TLV.getNbBytes( crealmLength ) + crealmLength;
 
         // Compute the client principalName length
         cnameLength = cname.computeLength();
-        kdcRepSeqLength += 1 + TLV.getNbBytes( cnameLength ) + cnameLength; 
+        kdcRepSeqLength += 1 + TLV.getNbBytes( cnameLength ) + cnameLength;
 
         // Compute the ticket length
         ticketLength = ticket.computeLength();
-        kdcRepSeqLength += 1 + TLV.getNbBytes( ticketLength ) + ticketLength; 
+        kdcRepSeqLength += 1 + TLV.getNbBytes( ticketLength ) + ticketLength;
 
         // Compute the encrypted part
         encPartLength = encPart.computeLength();
-        kdcRepSeqLength += 1 + TLV.getNbBytes( encPartLength ) + encPartLength; 
+        kdcRepSeqLength += 1 + TLV.getNbBytes( encPartLength ) + encPartLength;
 
         // compute the global size
         kdcRepLength = 1 + TLV.getNbBytes( kdcRepSeqLength ) + kdcRepSeqLength;
-        
+
         return kdcRepLength;
     }
-    
-    
+
+
     /**
      * Encode the KDC-REP component
      * 
@@ -346,34 +349,34 @@ public class KdcRep extends KerberosMess
         // The KDC-REP SEQ Tag
         buffer.put( UniversalTag.SEQUENCE.getValue() );
         buffer.put( TLV.getBytes( kdcRepSeqLength ) );
-        
+
         // The PVNO -----------------------------------------------------------
         // The tag
-        buffer.put( (byte)KerberosConstants.KDC_REP_PVNO_TAG );
+        buffer.put( ( byte ) KerberosConstants.KDC_REP_PVNO_TAG );
         buffer.put( TLV.getBytes( pvnoLength ) );
-        
+
         // The value
         Value.encode( buffer, getProtocolVersionNumber() );
-        
+
         // The MSG-TYPE if any ------------------------------------------------
         // The tag
-        buffer.put( (byte)KerberosConstants.KDC_REP_MSG_TYPE_TAG );
+        buffer.put( ( byte ) KerberosConstants.KDC_REP_MSG_TYPE_TAG );
         buffer.put( TLV.getBytes( msgTypeLength ) );
-        
+
         // The value
         Value.encode( buffer, getMessageType().getValue() );
-        
+
         // The PD-DATA if any -------------------------------------------------
         if ( paData.size() != 0 )
         {
             // The tag
-            buffer.put( (byte)KerberosConstants.KDC_REP_PA_DATA_TAG );
+            buffer.put( ( byte ) KerberosConstants.KDC_REP_PA_DATA_TAG );
             buffer.put( TLV.getBytes( paDataLength ) );
-            
+
             // The sequence
             buffer.put( UniversalTag.SEQUENCE.getValue() );
             buffer.put( TLV.getBytes( paDataSeqLength ) );
-            
+
             // The values
             for ( PaData paDataElem : paData )
             {
@@ -383,9 +386,9 @@ public class KdcRep extends KerberosMess
 
         // The CREALM ---------------------------------------------------------
         // The tag
-        buffer.put( (byte)KerberosConstants.KDC_REP_CREALM_TAG );
+        buffer.put( ( byte ) KerberosConstants.KDC_REP_CREALM_TAG );
         buffer.put( TLV.getBytes( crealmLength ) );
-        
+
         // The value
         buffer.put( UniversalTag.GENERAL_STRING.getValue() );
         buffer.put( TLV.getBytes( crealmBytes.length ) );
@@ -393,33 +396,32 @@ public class KdcRep extends KerberosMess
 
         // The CNAME ----------------------------------------------------------
         // The tag
-        buffer.put( (byte)KerberosConstants.KDC_REP_CNAME_TAG );
+        buffer.put( ( byte ) KerberosConstants.KDC_REP_CNAME_TAG );
         buffer.put( TLV.getBytes( cnameLength ) );
-        
+
         // The value
         cname.encode( buffer );
 
         // The TICKET ---------------------------------------------------------
         // The tag
-        buffer.put( (byte)KerberosConstants.KDC_REP_TICKET_TAG );
+        buffer.put( ( byte ) KerberosConstants.KDC_REP_TICKET_TAG );
         buffer.put( TLV.getBytes( ticketLength ) );
-        
+
         // The value
         ticket.encode( buffer );
 
         // The ENC-PART -------------------------------------------------------
         // The tag
-        buffer.put( (byte)KerberosConstants.KDC_REP_ENC_PART_TAG );
+        buffer.put( ( byte ) KerberosConstants.KDC_REP_ENC_PART_TAG );
         buffer.put( TLV.getBytes( encPartLength ) );
-        
+
         // The value
         encPart.encode( buffer );
-        
+
         return buffer;
     }
 
 
-    
     /**
      * @see Object#toString()
      */
@@ -448,12 +450,12 @@ public class KdcRep extends KerberosMess
         {
             sb.append( "padata : " ).append( paDataElem ).append( '\n' );
         }
-        
+
         sb.append( "crealm : " ).append( crealm ).append( '\n' );
         sb.append( "cname : " ).append( cname ).append( '\n' );
         sb.append( "ticket : " ).append( ticket ).append( '\n' );
         sb.append( "enc-part : " ).append( encPart ).append( '\n' );
-        
+
         return sb.toString();
     }
 }

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KdcReq.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KdcReq.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KdcReq.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KdcReq.java Tue Jan 24 16:15:05 2012
@@ -34,7 +34,6 @@ import org.apache.directory.shared.kerbe
 import org.apache.directory.shared.kerberos.messages.KerberosMessage;
 
 
-
 /**
  * The KDC-REQ data structure. It will store the object described by the ASN.1 grammar :
  * <pre>
@@ -53,7 +52,7 @@ public abstract class KdcReq extends Ker
 {
     /** The PA-DATAs */
     private List<PaData> paData;
-    
+
     /** The KDC-REQ-BODY */
     private KdcReqBody kdcReqBody;
 
@@ -67,6 +66,7 @@ public abstract class KdcReq extends Ker
     private int kdcReqSeqLength;
     private int kdcReqLength;
 
+
     /**
      * Creates a new instance of KDC-REQ.
      */
@@ -129,8 +129,8 @@ public abstract class KdcReq extends Ker
     {
         this.kdcReqBody = kdcReqBody;
     }
-    
-    
+
+
     /**
      * Compute the KDC-REQ length
      * <pre>
@@ -164,11 +164,11 @@ public abstract class KdcReq extends Ker
     {
         // The pvno length
         pvnoLength = 1 + 1 + 1;
-        kdcReqSeqLength = 1 + TLV.getNbBytes( pvnoLength ) + pvnoLength; 
-        
+        kdcReqSeqLength = 1 + TLV.getNbBytes( pvnoLength ) + pvnoLength;
+
         // The msg-type length
         msgTypeLength = 1 + 1 + 1;
-        kdcReqSeqLength += 1 + TLV.getNbBytes( msgTypeLength ) + msgTypeLength; 
+        kdcReqSeqLength += 1 + TLV.getNbBytes( msgTypeLength ) + msgTypeLength;
 
         // Compute the pa-data length.
         if ( paData.size() > 0 )
@@ -176,29 +176,29 @@ public abstract class KdcReq extends Ker
             paDataLengths = new int[paData.size()];
             int pos = 0;
             paDataSeqLength = 0;
-            
+
             for ( PaData paDataElem : paData )
             {
                 paDataLengths[pos] = paDataElem.computeLength();
                 paDataSeqLength += paDataLengths[pos];
                 pos++;
             }
-            
+
             paDataLength = 1 + TLV.getNbBytes( paDataSeqLength ) + paDataSeqLength;
-            kdcReqSeqLength += 1 + TLV.getNbBytes( paDataLength ) + paDataLength; 
+            kdcReqSeqLength += 1 + TLV.getNbBytes( paDataLength ) + paDataLength;
         }
-        
+
         // The KDC-REQ-BODY length
         kdcReqBodyLength = kdcReqBody.computeLength();
-        kdcReqSeqLength += 1 + TLV.getNbBytes( kdcReqBodyLength ) + kdcReqBodyLength; 
-        
+        kdcReqSeqLength += 1 + TLV.getNbBytes( kdcReqBodyLength ) + kdcReqBodyLength;
+
         // compute the global size
         kdcReqLength = 1 + TLV.getNbBytes( kdcReqSeqLength ) + kdcReqSeqLength;
-        
+
         return kdcReqLength;
     }
-    
-    
+
+
     /**
      * Encode the KDC-REQ component
      * 
@@ -216,34 +216,34 @@ public abstract class KdcReq extends Ker
         // The KDC-REQ SEQ Tag
         buffer.put( UniversalTag.SEQUENCE.getValue() );
         buffer.put( TLV.getBytes( kdcReqSeqLength ) );
-        
+
         // The PVNO -----------------------------------------------------------
         // The tag
-        buffer.put( (byte)KerberosConstants.KDC_REQ_PVNO_TAG );
+        buffer.put( ( byte ) KerberosConstants.KDC_REQ_PVNO_TAG );
         buffer.put( TLV.getBytes( pvnoLength ) );
-        
+
         // The value
         Value.encode( buffer, getProtocolVersionNumber() );
-        
+
         // The msg-type if any ------------------------------------------------
         // The tag
-        buffer.put( (byte)KerberosConstants.KDC_REQ_MSG_TYPE_TAG );
+        buffer.put( ( byte ) KerberosConstants.KDC_REQ_MSG_TYPE_TAG );
         buffer.put( TLV.getBytes( msgTypeLength ) );
-        
+
         // The value
         Value.encode( buffer, getMessageType().getValue() );
-        
+
         // The PD-DATA if any -------------------------------------------------
         if ( paData.size() > 0 )
         {
             // The tag
-            buffer.put( (byte)KerberosConstants.KDC_REQ_PA_DATA_TAG );
+            buffer.put( ( byte ) KerberosConstants.KDC_REQ_PA_DATA_TAG );
             buffer.put( TLV.getBytes( paDataLength ) );
-            
+
             // The sequence
             buffer.put( UniversalTag.SEQUENCE.getValue() );
             buffer.put( TLV.getBytes( paDataSeqLength ) );
-            
+
             // The values
             for ( PaData paDataElem : paData )
             {
@@ -253,16 +253,16 @@ public abstract class KdcReq extends Ker
 
         // The KDC-REQ-BODY ---------------------------------------------------
         // The tag
-        buffer.put( (byte)KerberosConstants.KDC_REQ_KDC_REQ_BODY_TAG );
+        buffer.put( ( byte ) KerberosConstants.KDC_REQ_KDC_REQ_BODY_TAG );
         buffer.put( TLV.getBytes( kdcReqBodyLength ) );
-        
+
         // The value
         kdcReqBody.encode( buffer );
-        
+
         return buffer;
     }
 
-    
+
     /**
      * @see Object#toString()
      */
@@ -291,9 +291,9 @@ public abstract class KdcReq extends Ker
         {
             sb.append( "padata : " ).append( paDataElem ).append( '\n' );
         }
-        
+
         sb.append( "kdc-req-body : " ).append( kdcReqBody ).append( '\n' );
-        
+
         return sb.toString();
     }
 }

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KdcReqBody.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KdcReqBody.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KdcReqBody.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KdcReqBody.java Tue Jan 24 16:15:05 2012
@@ -40,7 +40,6 @@ import org.apache.directory.shared.kerbe
 import org.apache.directory.shared.util.Strings;
 
 
-
 /**
  * The KDC-REQ-BODY data structure. It will store the object described by the ASN.1 grammar :
  * <pre>
@@ -126,6 +125,7 @@ public class KdcReqBody extends Abstract
     private int kdcReqBodySeqLength;
     private int kdcReqBodyLength;
 
+
     /**
      * Creates a new instance of RequestBody.
      */
@@ -143,7 +143,8 @@ public class KdcReqBody extends Abstract
      */
     public Ticket[] getAdditionalTickets()
     {
-        return additionalTickets.toArray( new Ticket[]{} );
+        return additionalTickets.toArray( new Ticket[]
+            {} );
     }
 
 
@@ -477,7 +478,7 @@ public class KdcReqBody extends Abstract
         }
 
         // Compute the realm length.
-        realmBytes = Strings.getBytesUtf8(realm);
+        realmBytes = Strings.getBytesUtf8( realm );
         realmLength = 1 + TLV.getNbBytes( realmBytes.length ) + realmBytes.length;
         kdcReqBodySeqLength += 1 + TLV.getNbBytes( realmLength ) + realmLength;
 
@@ -585,7 +586,7 @@ public class KdcReqBody extends Abstract
 
         // The KdcOptions -----------------------------------------------------
         // The tag
-        buffer.put( (byte)KerberosConstants.KDC_REQ_BODY_KDC_OPTIONS_TAG );
+        buffer.put( ( byte ) KerberosConstants.KDC_REQ_BODY_KDC_OPTIONS_TAG );
         buffer.put( TLV.getBytes( kdcOptionsLength ) );
 
         // The value
@@ -595,7 +596,7 @@ public class KdcReqBody extends Abstract
         if ( cName != null )
         {
             // The tag
-            buffer.put( (byte)KerberosConstants.KDC_REQ_BODY_CNAME_TAG );
+            buffer.put( ( byte ) KerberosConstants.KDC_REQ_BODY_CNAME_TAG );
             buffer.put( TLV.getBytes( cNameLength ) );
 
             // The value
@@ -604,7 +605,7 @@ public class KdcReqBody extends Abstract
 
         // The realm ----------------------------------------------------------
         // The tag
-        buffer.put( (byte)KerberosConstants.KDC_REQ_BODY_REALM_TAG );
+        buffer.put( ( byte ) KerberosConstants.KDC_REQ_BODY_REALM_TAG );
         buffer.put( TLV.getBytes( realmLength ) );
 
         // The value
@@ -616,7 +617,7 @@ public class KdcReqBody extends Abstract
         if ( sName != null )
         {
             // The tag
-            buffer.put( (byte)KerberosConstants.KDC_REQ_BODY_SNAME_TAG );
+            buffer.put( ( byte ) KerberosConstants.KDC_REQ_BODY_SNAME_TAG );
             buffer.put( TLV.getBytes( sNameLength ) );
 
             // The value
@@ -627,41 +628,41 @@ public class KdcReqBody extends Abstract
         if ( from != null )
         {
             // The tag
-            buffer.put( (byte)KerberosConstants.KDC_REQ_BODY_FROM_TAG );
+            buffer.put( ( byte ) KerberosConstants.KDC_REQ_BODY_FROM_TAG );
             buffer.put( TLV.getBytes( fromLength ) );
 
             // The value
             buffer.put( UniversalTag.GENERALIZED_TIME.getValue() );
-            buffer.put( (byte)0x0F );
+            buffer.put( ( byte ) 0x0F );
             buffer.put( from.getBytes() );
         }
 
         // The till -----------------------------------------------------------
         // The tag
-        buffer.put( (byte)KerberosConstants.KDC_REQ_BODY_TILL_TAG );
+        buffer.put( ( byte ) KerberosConstants.KDC_REQ_BODY_TILL_TAG );
         buffer.put( TLV.getBytes( tillLength ) );
 
         // The value
         buffer.put( UniversalTag.GENERALIZED_TIME.getValue() );
-        buffer.put( (byte)0x0F );
+        buffer.put( ( byte ) 0x0F );
         buffer.put( till.getBytes() );
 
         // The rtime if any ---------------------------------------------------
         if ( rtime != null )
         {
             // The tag
-            buffer.put( (byte)KerberosConstants.KDC_REQ_BODY_RTIME_TAG );
+            buffer.put( ( byte ) KerberosConstants.KDC_REQ_BODY_RTIME_TAG );
             buffer.put( TLV.getBytes( rtimeLength ) );
 
             // The value
             buffer.put( UniversalTag.GENERALIZED_TIME.getValue() );
-            buffer.put( (byte)0x0F );
+            buffer.put( ( byte ) 0x0F );
             buffer.put( rtime.getBytes() );
         }
 
         // The nonce ----------------------------------------------------------
         // The tag
-        buffer.put( (byte)KerberosConstants.KDC_REQ_BODY_NONCE_TAG );
+        buffer.put( ( byte ) KerberosConstants.KDC_REQ_BODY_NONCE_TAG );
         buffer.put( TLV.getBytes( nonceLength ) );
 
         // The value
@@ -669,7 +670,7 @@ public class KdcReqBody extends Abstract
 
         // The etype ----------------------------------------------------------
         // The tag
-        buffer.put( (byte)KerberosConstants.KDC_REQ_BODY_ETYPE_TAG );
+        buffer.put( ( byte ) KerberosConstants.KDC_REQ_BODY_ETYPE_TAG );
         buffer.put( TLV.getBytes( eTypeLength ) );
 
         // The sequence
@@ -686,7 +687,7 @@ public class KdcReqBody extends Abstract
         if ( addresses != null )
         {
             // The tag
-            buffer.put( (byte)KerberosConstants.KDC_REQ_BODY_ADDRESSES_TAG );
+            buffer.put( ( byte ) KerberosConstants.KDC_REQ_BODY_ADDRESSES_TAG );
             buffer.put( TLV.getBytes( addressesLength ) );
 
             // The value
@@ -697,7 +698,7 @@ public class KdcReqBody extends Abstract
         if ( encAuthorizationData != null )
         {
             // The tag
-            buffer.put( (byte)KerberosConstants.KDC_REQ_BODY_ENC_AUTHZ_DATA_TAG );
+            buffer.put( ( byte ) KerberosConstants.KDC_REQ_BODY_ENC_AUTHZ_DATA_TAG );
             buffer.put( TLV.getBytes( encAuthzDataLength ) );
 
             // The value
@@ -708,7 +709,7 @@ public class KdcReqBody extends Abstract
         if ( additionalTickets.size() != 0 )
         {
             // The tag
-            buffer.put( (byte)KerberosConstants.KDC_REQ_BODY_ADDITIONAL_TICKETS_TAG );
+            buffer.put( ( byte ) KerberosConstants.KDC_REQ_BODY_ADDITIONAL_TICKETS_TAG );
             buffer.put( TLV.getBytes( additionalTicketLength ) );
 
             // The sequence
@@ -782,7 +783,6 @@ public class KdcReqBody extends Abstract
 
         sb.append( "till : " ).append( till ).append( '\n' );
 
-
         if ( rtime != null )
         {
             sb.append( "rtime : " ).append( rtime ).append( '\n' );
@@ -831,7 +831,6 @@ public class KdcReqBody extends Abstract
             sb.append( '\n' );
         }
 
-
         if ( encAuthorizationData != null )
         {
             sb.append( "enc-authorization-data" ).append( encAuthorizationData ).append( '\n' );

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KrbCredInfo.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KrbCredInfo.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KrbCredInfo.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KrbCredInfo.java Tue Jan 24 16:15:05 2012
@@ -176,7 +176,7 @@ public class KrbCredInfo extends Abstrac
 
         if ( pRealm != null )
         {
-            pRealmBytes = Strings.getBytesUtf8(pRealm);
+            pRealmBytes = Strings.getBytesUtf8( pRealm );
             pRealmLen = 1 + TLV.getNbBytes( pRealmBytes.length ) + pRealmBytes.length;
             krbKredInfoSeqLen += 1 + TLV.getNbBytes( pRealmLen ) + pRealmLen;
         }
@@ -224,7 +224,7 @@ public class KrbCredInfo extends Abstrac
 
         if ( sRealm != null )
         {
-            sRealmBytes = Strings.getBytesUtf8(sRealm);
+            sRealmBytes = Strings.getBytesUtf8( sRealm );
             sRealmLen = 1 + TLV.getNbBytes( sRealmBytes.length ) + sRealmBytes.length;
             krbKredInfoSeqLen += 1 + TLV.getNbBytes( sRealmLen ) + sRealmLen;
         }
@@ -373,7 +373,7 @@ public class KrbCredInfo extends Abstrac
 
         if ( IS_DEBUG )
         {
-            log.debug( "KrbCredInfo encoding : {}", Strings.dumpBytes(buffer.array()) );
+            log.debug( "KrbCredInfo encoding : {}", Strings.dumpBytes( buffer.array() ) );
             log.debug( "KrbCredInfo initial value : {}", toString() );
         }
 

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KrbSafeBody.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KrbSafeBody.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KrbSafeBody.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KrbSafeBody.java Tue Jan 24 16:15:05 2012
@@ -356,12 +356,14 @@ public class KrbSafeBody extends Abstrac
 
         if ( IS_DEBUG )
         {
-            log.debug( "KrbSafeBody encoding : {}", Strings.dumpBytes(buffer.array()) );
+            log.debug( "KrbSafeBody encoding : {}", Strings.dumpBytes( buffer.array() ) );
             log.debug( "KrbSafeBody initial value : {}", toString() );
         }
 
         return buffer;
     }
+
+
     /**
      * @see Object#toString()
      */
@@ -370,7 +372,7 @@ public class KrbSafeBody extends Abstrac
         StringBuilder sb = new StringBuilder();
 
         sb.append( "KRB-SAFE-BODY : {\n" );
-        sb.append( "    user-data: " ).append( Strings.dumpBytes(userData) ).append( '\n' );
+        sb.append( "    user-data: " ).append( Strings.dumpBytes( userData ) ).append( '\n' );
 
         if ( timestamp != null )
         {

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/LastReq.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/LastReq.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/LastReq.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/LastReq.java Tue Jan 24 16:15:05 2012
@@ -61,11 +61,10 @@ public class LastReq extends AbstractAsn
 
     /** The list of LastReq elements */
     private List<LastReqEntry> lastReqs = new ArrayList<LastReqEntry>();
-    
+
     /** The current LastReqEntry being processed */
     private LastReqEntry currentLR;
 
-
     // Storage for computed lengths
     private int lrTypeTagLen[];
     private int lrValueTagLen[];
@@ -140,7 +139,7 @@ public class LastReq extends AbstractAsn
      * Add a new LastReqEntry
      * @param lastReqEntry The enry to add
      */
-    public void addEntry( LastReqEntry lastReqEntry)
+    public void addEntry( LastReqEntry lastReqEntry )
     {
         lastReqs.add( lastReqEntry );
     }
@@ -153,8 +152,8 @@ public class LastReq extends AbstractAsn
     {
         return lastReqs;
     }
-    
-    
+
+
     /**
      * Compute the LastReq length
      * 
@@ -181,17 +180,17 @@ public class LastReq extends AbstractAsn
         lrTypeTagLen = new int[lastReqs.size()];
         lrValueTagLen = new int[lastReqs.size()];
         lastReqSeqSeqLen = 0;
-        
+
         for ( LastReqEntry lre : lastReqs )
         {
             int lrTypeLen = Value.getNbBytes( lre.getLrType().getValue() );
             lrTypeTagLen[i] = 1 + TLV.getNbBytes( lrTypeLen ) + lrTypeLen;
             byte[] lrValyeBytes = lre.getLrValue().getBytes();
             lrValueTagLen[i] = 1 + TLV.getNbBytes( lrValyeBytes.length ) + lrValyeBytes.length;
-            
-            lastReqSeqLen[i] = 1 + TLV.getNbBytes( lrTypeTagLen[i] ) + lrTypeTagLen[i] + 
-                                         1 + TLV.getNbBytes( lrValueTagLen[i] ) + lrValueTagLen[i];
-            
+
+            lastReqSeqLen[i] = 1 + TLV.getNbBytes( lrTypeTagLen[i] ) + lrTypeTagLen[i] +
+                1 + TLV.getNbBytes( lrValueTagLen[i] ) + lrValueTagLen[i];
+
             lastReqSeqSeqLen += 1 + TLV.getNbBytes( lastReqSeqLen[i] ) + lastReqSeqLen[i];
             i++;
         }
@@ -230,19 +229,19 @@ public class LastReq extends AbstractAsn
             // The lastRequest SEQ OF Tag
             buffer.put( UniversalTag.SEQUENCE.getValue() );
             buffer.put( TLV.getBytes( lastReqSeqSeqLen ) );
-            
+
             int i = 0;
-            
+
             for ( LastReqEntry lre : lastReqs )
             {
                 buffer.put( UniversalTag.SEQUENCE.getValue() );
                 buffer.put( TLV.getBytes( lastReqSeqLen[i] ) );
-                
+
                 // the lrType
                 buffer.put( ( byte ) KerberosConstants.LAST_REQ_LR_TYPE_TAG );
                 buffer.put( TLV.getBytes( lrTypeTagLen[i] ) );
                 Value.encode( buffer, lre.getLrType().getValue() );
-    
+
                 // the lrValue tag
                 buffer.put( ( byte ) KerberosConstants.LAST_REQ_LR_VALUE_TAG );
                 buffer.put( TLV.getBytes( lrValueTagLen[i] ) );
@@ -262,7 +261,7 @@ public class LastReq extends AbstractAsn
 
         if ( IS_DEBUG )
         {
-            LOG.debug( "LastReq encoding : {}", Strings.dumpBytes(buffer.array()) );
+            LOG.debug( "LastReq encoding : {}", Strings.dumpBytes( buffer.array() ) );
             LOG.debug( "LastReq initial value : {}", toString() );
         }
 
@@ -278,7 +277,7 @@ public class LastReq extends AbstractAsn
         StringBuilder sb = new StringBuilder();
 
         sb.append( tabs ).append( "LastReq : \n" );
-        
+
         for ( LastReqEntry lre : lastReqs )
         {
             sb.append( lre.toString( tabs + "    " ) );
@@ -286,8 +285,8 @@ public class LastReq extends AbstractAsn
 
         return sb.toString();
     }
-    
-    
+
+
     /**
      * @see Object#toString()
      */

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/LastReqEntry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/LastReqEntry.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/LastReqEntry.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/LastReqEntry.java Tue Jan 24 16:15:05 2012
@@ -19,9 +19,11 @@
  */
 package org.apache.directory.shared.kerberos.components;
 
+
 import org.apache.directory.shared.kerberos.KerberosTime;
 import org.apache.directory.shared.kerberos.codec.types.LastReqType;
 
+
 /**
  * The data structure hold into the LastReq element 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -41,8 +43,8 @@ public class LastReqEntry
     public LastReqEntry()
     {
     }
-    
-    
+
+
     /**
      * Creates a new instance of LastReqEntry
      * @param lrType The LastRequest type
@@ -53,8 +55,8 @@ public class LastReqEntry
         this.lrType = lrType;
         this.lrValue = lrValue;
     }
-    
-    
+
+
     /**
      * @return the LastReqType
      */
@@ -72,7 +74,7 @@ public class LastReqEntry
         this.lrType = lrType;
     }
 
-    
+
     /**
      * @return the lr-value
      */
@@ -90,23 +92,23 @@ public class LastReqEntry
         this.lrValue = lrValue;
     }
 
-    
+
     /**
      * @see Object#toString()
      */
     public String toString( String tabs )
     {
         StringBuilder sb = new StringBuilder();
-        
-        sb.append( tabs ) .append( "LastRequestEntry : {\n" );
-        sb.append( tabs ) .append(  "    lrType : " ).append( lrType ).append( "\n" );
-        sb.append( tabs ) .append(  "    lrValue : " ).append( lrValue ).append( "\n" );
-        sb.append( tabs ) .append(  "}" );
-        
+
+        sb.append( tabs ).append( "LastRequestEntry : {\n" );
+        sb.append( tabs ).append( "    lrType : " ).append( lrType ).append( "\n" );
+        sb.append( tabs ).append( "    lrValue : " ).append( lrValue ).append( "\n" );
+        sb.append( tabs ).append( "}" );
+
         return sb.toString();
     }
-    
-    
+
+
     /**
      * @see Object#toString()
      */

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/MethodData.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/MethodData.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/MethodData.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/MethodData.java Tue Jan 24 16:15:05 2012
@@ -66,7 +66,7 @@ public class MethodData extends Abstract
     {
         this.paDatas = new ArrayList<PaData>();
     }
-    
+
 
     /**
      * Adds an {@link PaData} to the list
@@ -102,17 +102,17 @@ public class MethodData extends Abstract
     public int hashCode()
     {
         int hash = 37;
-        
+
         if ( paDatas != null )
         {
             hash = hash * 17 + paDatas.size();
-            
+
             for ( PaData paData : paDatas )
             {
                 hash = hash * 17 + paData.hashCode();
             }
         }
-        
+
         return hash;
     }
 
@@ -125,11 +125,11 @@ public class MethodData extends Abstract
      */
     public boolean equals( MethodData that )
     {
-        if ( that == null ) 
+        if ( that == null )
         {
             return false;
         }
-        
+
         // infoEntries can't be null after creation
         if ( paDatas.size() != that.paDatas.size() )
         {
@@ -241,7 +241,7 @@ public class MethodData extends Abstract
 
         if ( IS_DEBUG )
         {
-            LOG.debug( "METHOD-DATA encoding : {}", Strings.dumpBytes(buffer.array()) );
+            LOG.debug( "METHOD-DATA encoding : {}", Strings.dumpBytes( buffer.array() ) );
             LOG.debug( "METHOD-DATA initial value : {}", toString() );
         }
 
@@ -256,7 +256,7 @@ public class MethodData extends Abstract
     {
         StringBuilder sb = new StringBuilder();
         boolean isFirst = true;
-        
+
         sb.append( "METHOD-DATA : " );
 
         for ( PaData paData : paDatas )

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/PaData.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/PaData.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/PaData.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/PaData.java Tue Jan 24 16:15:05 2012
@@ -57,7 +57,7 @@ public class PaData extends AbstractAsn1
 
     /** The Pre-authentication type */
     private PaDataType paDataType;
-    
+
     /** The authentication data */
     private byte[] paDataValue;
 
@@ -65,7 +65,7 @@ public class PaData extends AbstractAsn1
     private int paDataTypeTagLength;
     private int paDataValueTagLength;
     private int preAuthenticationDataSeqLength;
-    
+
 
     /**
      * Creates a new instance of PreAuthenticationData.
@@ -74,7 +74,7 @@ public class PaData extends AbstractAsn1
     {
     }
 
-    
+
     /**
      * Creates a new instance of PreAuthenticationData.
      *
@@ -109,7 +109,7 @@ public class PaData extends AbstractAsn1
         this.paDataType = PaDataType.getTypeByValue( paDataType );
     }
 
-    
+
     /**
      * Set the PA-DATA type
      *
@@ -120,7 +120,7 @@ public class PaData extends AbstractAsn1
         this.paDataType = paDataType;
     }
 
-    
+
     /**
      * Returns the raw bytes of the {@link PaData}.
      *
@@ -142,7 +142,7 @@ public class PaData extends AbstractAsn1
         this.paDataValue = paDataValue;
     }
 
-    
+
     /**
      * Compute the PreAuthenticationData length
      * <pre>
@@ -237,13 +237,13 @@ public class PaData extends AbstractAsn1
 
         if ( IS_DEBUG )
         {
-            log.debug( "PreAuthenticationData encoding : {}", Strings.dumpBytes(buffer.array()) );
+            log.debug( "PreAuthenticationData encoding : {}", Strings.dumpBytes( buffer.array() ) );
             log.debug( "PreAuthenticationData initial value : {}", toString() );
         }
 
         return buffer;
     }
-    
+
 
     /**
      * @see Object#toString()
@@ -266,7 +266,7 @@ public class PaData extends AbstractAsn1
 
         if ( paDataValue != null )
         {
-            sb.append( tabs + "    padata-value:" ).append( Strings.dumpBytes(paDataValue) ).append( '\n' );
+            sb.append( tabs + "    padata-value:" ).append( Strings.dumpBytes( paDataValue ) ).append( '\n' );
         }
 
         sb.append( tabs + "}\n" );

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/PaEncTimestamp.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/PaEncTimestamp.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/PaEncTimestamp.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/PaEncTimestamp.java Tue Jan 24 16:15:05 2012
@@ -20,8 +20,6 @@
 package org.apache.directory.shared.kerberos.components;
 
 
-
-
 /**
  * The PaEncTimestamp structure is used to store a PA-ENC-TIMESTAMP associated to a type.
  * 
@@ -41,7 +39,7 @@ public class PaEncTimestamp extends Encr
         super();
     }
 
-    
+
     /**
      * @see Object#toString()
      */
@@ -59,7 +57,7 @@ public class PaEncTimestamp extends Encr
         StringBuilder sb = new StringBuilder();
 
         sb.append( tabs ).append( "PA-ENC-TIMESTAMP : {\n" );
-        sb.append( tabs ).append( super.toString( "    " + tabs) ).append( '\n' );
+        sb.append( tabs ).append( super.toString( "    " + tabs ) ).append( '\n' );
 
         sb.append( tabs + "}\n" );
 

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/PaEncTsEnc.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/PaEncTsEnc.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/PaEncTsEnc.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/PaEncTsEnc.java Tue Jan 24 16:15:05 2012
@@ -75,7 +75,7 @@ public class PaEncTsEnc extends Abstract
     {
     }
 
-    
+
     /**
      * Creates a new instance of PaEncTsEnc.
      */
@@ -85,7 +85,7 @@ public class PaEncTsEnc extends Abstract
         this.pausec = pausec;
     }
 
-    
+
     /**
      * Returns the patimestamp value.
      *
@@ -117,7 +117,7 @@ public class PaEncTsEnc extends Abstract
         {
             return -1;
         }
-        
+
         return pausec;
     }
 
@@ -152,7 +152,7 @@ public class PaEncTsEnc extends Abstract
     {
         // The paTimestamp
         paTimestampLength = 0x11;
-        
+
         paEncTsEncLength = 1 + TLV.getNbBytes( paTimestampLength ) + paTimestampLength;
 
         // The pausec, if any
@@ -160,7 +160,7 @@ public class PaEncTsEnc extends Abstract
         {
             int pausecLength = Value.getNbBytes( pausec );
             paUsecLength = 1 + TLV.getNbBytes( pausecLength ) + pausecLength;
-            paEncTsEncLength += 1 + TLV.getNbBytes( paUsecLength ) + paUsecLength; 
+            paEncTsEncLength += 1 + TLV.getNbBytes( paUsecLength ) + paUsecLength;
         }
 
         // Compute the whole sequence length
@@ -199,12 +199,12 @@ public class PaEncTsEnc extends Abstract
 
             // The patimestamp, first the tag, then the value
             buffer.put( ( byte ) KerberosConstants.PA_ENC_TS_ENC_PA_TIMESTAMP_TAG );
-            buffer.put( (byte)0x11 );
+            buffer.put( ( byte ) 0x11 );
 
             buffer.put( ( byte ) UniversalTag.GENERALIZED_TIME.getValue() );
             buffer.put( ( byte ) 0x0F );
             buffer.put( patimestamp.getBytes() );
-            
+
             // The pausec, first the tag, then the value, if any
             if ( pausec != null )
             {
@@ -222,14 +222,14 @@ public class PaEncTsEnc extends Abstract
 
         if ( IS_DEBUG )
         {
-            log.debug( "Checksum encoding : {}", Strings.dumpBytes(buffer.array()) );
+            log.debug( "Checksum encoding : {}", Strings.dumpBytes( buffer.array() ) );
             log.debug( "Checksum initial value : {}", toString() );
         }
 
         return buffer;
     }
 
-    
+
     /**
      * @see Object#toString()
      */

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/PrincipalName.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/PrincipalName.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/PrincipalName.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/PrincipalName.java Tue Jan 24 16:15:05 2012
@@ -19,7 +19,6 @@
  */
 //package org.apache.directory.server.kerberos.shared.messages.value;
 
-
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  *
@@ -131,10 +130,10 @@ public class PrincipalName extends Abstr
 
     /** The principal name - we may have more than one - */
     private List<String> nameString = new ArrayList<String>();
-    
+
     /** The principal name as a byte[], for encoding purpose */
     private List<byte[]> nameBytes;
-    
+
     // Storage for computed lengths
     private int principalNameSeqLength;
     private int principalTypeTagLength;
@@ -142,6 +141,7 @@ public class PrincipalName extends Abstr
     private int principalStringsTagLength;
     private int principalStringsSeqLength;
 
+
     /**
      * Creates a new empty instance of PrincipalName.
      */
@@ -149,6 +149,7 @@ public class PrincipalName extends Abstr
     {
     }
 
+
     /**
      * Creates a new instance of PrincipalName, given a KerberosPrincipal.
      * 
@@ -170,7 +171,8 @@ public class PrincipalName extends Abstr
 
         this.nameType = PrincipalNameType.getTypeByValue( principal.getNameType() );
     }
-    
+
+
     /**
      * Creates a new instance of PrincipalName given a String and an 
      * prinipal type.
@@ -178,7 +180,7 @@ public class PrincipalName extends Abstr
      * @param nameString The name string, which can contains more than one nameComponent
      * @param nameType The principal name
      */
-    public PrincipalName( String nameString, PrincipalNameType nameType )  throws ParseException
+    public PrincipalName( String nameString, PrincipalNameType nameType ) throws ParseException
     {
         this.nameString.add( nameString );
         this.nameType = nameType;
@@ -201,7 +203,7 @@ public class PrincipalName extends Abstr
         {
             throw new IllegalArgumentException( pe );
         }
-        
+
         this.nameType = PrincipalNameType.getTypeByValue( nameType );
     }
 
@@ -215,7 +217,8 @@ public class PrincipalName extends Abstr
     {
         return nameType;
     }
-                    
+
+
     /** 
      * Set the Principal name Type
      * @param nameType the Principal name Type
@@ -225,6 +228,7 @@ public class PrincipalName extends Abstr
         this.nameType = nameType;
     }
 
+
     /** 
      * Set the Principal name Type
      * @param nameType the Principal name Type
@@ -234,6 +238,7 @@ public class PrincipalName extends Abstr
         this.nameType = PrincipalNameType.getTypeByValue( nameType );
     }
 
+
     /**
      * Returns the name components.
      *
@@ -322,7 +327,7 @@ public class PrincipalName extends Abstr
         // The principalName can't be empty.
         principalTypeLength = Value.getNbBytes( nameType.getValue() );
         principalTypeTagLength = 1 + 1 + principalTypeLength;
-        
+
         principalNameSeqLength = 1 + TLV.getNbBytes( principalTypeTagLength ) + principalTypeTagLength;
 
         // Compute the keyValue
@@ -339,7 +344,7 @@ public class PrincipalName extends Abstr
             {
                 if ( name != null )
                 {
-                    byte[] bytes = Strings.getBytesUtf8(name);
+                    byte[] bytes = Strings.getBytesUtf8( name );
                     nameBytes.add( bytes );
                     principalStringsSeqLength += 1 + TLV.getNbBytes( bytes.length ) + bytes.length;
                 }
@@ -437,7 +442,7 @@ public class PrincipalName extends Abstr
 
         if ( IS_DEBUG )
         {
-            LOG.debug( "PrinipalName encoding : {}", Strings.dumpBytes(buffer.array()) );
+            LOG.debug( "PrinipalName encoding : {}", Strings.dumpBytes( buffer.array() ) );
             LOG.debug( "PrinipalName initial value : {}", toString() );
         }
 
@@ -504,12 +509,12 @@ public class PrincipalName extends Abstr
         {
             return true;
         }
-        
+
         if ( obj == null )
         {
             return false;
         }
-        
+
         PrincipalName other = ( PrincipalName ) obj;
 
         if ( nameString == null )
@@ -528,8 +533,8 @@ public class PrincipalName extends Abstr
         {
             return false;
         }
-        
+
         return true;
     }
-    
+
 }

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/TransitedEncoding.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/TransitedEncoding.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/TransitedEncoding.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/TransitedEncoding.java Tue Jan 24 16:15:05 2012
@@ -93,8 +93,8 @@ public class TransitedEncoding extends A
     {
         return contents;
     }
-    
-    
+
+
     /**
      * Set the contents
      * @param contents The contents
@@ -114,8 +114,8 @@ public class TransitedEncoding extends A
     {
         return trType;
     }
-    
-    
+
+
     /**
      * Set the transited encoding type
      * @param trType The transited encoding type
@@ -203,12 +203,12 @@ public class TransitedEncoding extends A
             buffer.put( TLV.getBytes( transitedEncodingLength ) );
 
             // The tr-type, first the tag, then the value
-            buffer.put( ( byte )KerberosConstants.TRANSITED_ENCODING_TR_TYPE_TAG );
+            buffer.put( ( byte ) KerberosConstants.TRANSITED_ENCODING_TR_TYPE_TAG );
             buffer.put( TLV.getBytes( trTypeLength ) );
             Value.encode( buffer, trType.getValue() );
 
             // The contents, first the tag, then the value
-            buffer.put( ( byte )KerberosConstants.TRANSITED_ENCODING_CONTENTS_TAG );
+            buffer.put( ( byte ) KerberosConstants.TRANSITED_ENCODING_CONTENTS_TAG );
             buffer.put( TLV.getBytes( contentsLength ) );
             Value.encode( buffer, contents );
         }
@@ -221,7 +221,7 @@ public class TransitedEncoding extends A
 
         if ( IS_DEBUG )
         {
-            log.debug( "TransitedEncoding encoding : {}", Strings.dumpBytes(buffer.array()) );
+            log.debug( "TransitedEncoding encoding : {}", Strings.dumpBytes( buffer.array() ) );
             log.debug( "TransitedEncoding initial value : {}", toString() );
         }
 
@@ -253,24 +253,24 @@ public class TransitedEncoding extends A
         {
             return true;
         }
-        
+
         if ( obj == null )
         {
             return false;
         }
-        
+
         TransitedEncoding other = ( TransitedEncoding ) obj;
-        
+
         if ( !Arrays.equals( contents, other.contents ) )
         {
             return false;
         }
-        
+
         if ( trType != other.trType )
         {
             return false;
         }
-        
+
         return true;
     }
 
@@ -285,7 +285,7 @@ public class TransitedEncoding extends A
         sb.append( "TransitedEncoding : {\n" );
         sb.append( "    tr-type: " ).append( trType ).append( '\n' );
 
-        sb.append( "    contents: " ).append( Strings.dumpBytes(contents) ).append( "\n}\n" );
+        sb.append( "    contents: " ).append( Strings.dumpBytes( contents ) ).append( "\n}\n" );
 
         return sb.toString();
     }

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/TypedData.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/TypedData.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/TypedData.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/TypedData.java Tue Jan 24 16:15:05 2012
@@ -158,8 +158,8 @@ public class TypedData extends AbstractA
     {
         return typedDataList;
     }
-    
-    
+
+
     /**
      * Compute the TypedData length
      * <pre>
@@ -190,7 +190,7 @@ public class TypedData extends AbstractA
             int adTypeLen = Value.getNbBytes( td.dataType );
             dataTypeTagLength[i] = 1 + TLV.getNbBytes( adTypeLen ) + adTypeLen;
             typedDataSeqLength[i] = 1 + TLV.getNbBytes( dataTypeTagLength[i] ) + dataTypeTagLength[i];
-            
+
             if ( td.dataValue != null )
             {
                 dataValueTagLength[i] = 1 + TLV.getNbBytes( td.dataValue.length ) + td.dataValue.length;
@@ -240,7 +240,7 @@ public class TypedData extends AbstractA
                     buffer.put( TLV.getBytes( dataValueTagLength[i] ) );
                     Value.encode( buffer, td.dataValue );
                 }
-                
+
                 i++;
             }
         }
@@ -253,7 +253,7 @@ public class TypedData extends AbstractA
 
         if ( IS_DEBUG )
         {
-            LOG.debug( "TypedData encoding : {}", Strings.dumpBytes(buffer.array()) );
+            LOG.debug( "TypedData encoding : {}", Strings.dumpBytes( buffer.array() ) );
             LOG.debug( "TypedData initial value : {}", toString() );
         }
 
@@ -285,7 +285,8 @@ public class TypedData extends AbstractA
             sb.append( tabs ).append( "        tdType: " ).append( td.dataType ).append( '\n' );
             if ( td.dataValue != null )
             {
-                sb.append( tabs ).append( "        tdData: " ).append( Strings.dumpBytes(td.dataValue) ).append( '\n' );
+                sb.append( tabs ).append( "        tdData: " ).append( Strings.dumpBytes( td.dataValue ) )
+                    .append( '\n' );
             }
             sb.append( tabs ).append( "    }\n" );
         }



Mime
View raw message