You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by er...@apache.org on 2005/08/22 12:20:51 UTC

svn commit: r234465 [1/2] - /directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/

Author: erodriguez
Date: Mon Aug 22 03:20:30 2005
New Revision: 234465

URL: http://svn.apache.org/viewcvs?rev=234465&view=rev
Log:
Reformatting:  imports, whitespace, line breaks, or code convention.

Modified:
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/ApOptions.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/AuthorizationData.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/AuthorizationDataEntry.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/AuthorizationType.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/Checksum.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptedData.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptedDataModifier.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptedTimeStamp.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptedTimeStampModifier.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptionKey.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptionTypeInfoEntry.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/HostAddress.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/HostAddressType.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/HostAddresses.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/KdcOptions.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/KerberosPrincipalModifier.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/KrbCredInfo.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/LastRequest.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/LastRequestEntry.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/LastRequestType.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/Options.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PreAuthenticationData.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PreAuthenticationDataModifier.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PreAuthenticationDataType.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PrincipalName.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PrincipalNameModifier.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PrincipalNameType.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/RequestBody.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/RequestBodyModifier.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/SamType.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/TicketFlags.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/TransitedEncoding.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/TransitedEncodingType.java

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/ApOptions.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/ApOptions.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/ApOptions.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/ApOptions.java Mon Aug 22 03:20:30 2005
@@ -16,41 +16,54 @@
  */
 package org.apache.kerberos.messages.value;
 
-public class ApOptions extends Options {
+public class ApOptions extends Options
+{
     // AP Request option - reserved
 	public static final int RESERVED        = 0;
     // AP Request option - use session key
 	public static final int USE_SESSION_KEY = 1;
     // AP Request option - mutual authentication required
 	public static final int MUTUAL_REQUIRED = 2;
-	
+
     // AP Request option - maximum value
 	public static final int MAX_VALUE       = 32;
 	
     /**
      * Class constructors
      */
-	public ApOptions() {
-		super(MAX_VALUE);
-	}
-	
-	public ApOptions(byte[] options) {
-		super(MAX_VALUE);
-		setBytes(options);
-	}
-	
-	/**
-	 * Converts the object to a printable string
-	 */
-	public String toString() {
-		StringBuffer result = new StringBuffer();
-		if (get(MUTUAL_REQUIRED))
-			result.append("MUTUAL_REQUIRED ");
-		if (get(RESERVED))
-			result.append("RESERVED ");
-		if (get(USE_SESSION_KEY))
-			result.append("USE_SESSION_KEY ");
-		return result.toString().trim();
-	}
-}
+    public ApOptions()
+    {
+        super( MAX_VALUE );
+    }
 
+    public ApOptions( byte[] options )
+    {
+        super( MAX_VALUE );
+        setBytes( options );
+    }
+
+    /**
+     * Converts the object to a printable string
+     */
+    public String toString()
+    {
+        StringBuffer result = new StringBuffer();
+
+        if ( get( MUTUAL_REQUIRED ) )
+        {
+            result.append( "MUTUAL_REQUIRED " );
+        }
+        
+        if ( get( RESERVED ) )
+        {
+            result.append( "RESERVED " );
+        }
+        
+        if ( get( USE_SESSION_KEY ) )
+        {
+            result.append( "USE_SESSION_KEY " );
+        }
+        
+        return result.toString().trim();
+    }
+}

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/AuthorizationData.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/AuthorizationData.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/AuthorizationData.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/AuthorizationData.java Mon Aug 22 03:20:30 2005
@@ -16,29 +16,34 @@
  */
 package org.apache.kerberos.messages.value;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
 
-public class AuthorizationData {
-	
-	private List _entries = new ArrayList();
+public class AuthorizationData
+{
+    private List entries = new ArrayList();
 
-	/**
-	 * Class constructor
-	 */
-	public AuthorizationData() {
-		// used by ASN.1 decoder
-	}
-	
-	public void add(AuthorizationData data) {
-		_entries.addAll(data._entries);
-	}
-	
-	public void add(AuthorizationDataEntry entry) {
-		_entries.add(entry);
-	}
-	
-	public Iterator iterator() {
-		return _entries.iterator();
-	}
-}
+    /**
+     * Class constructor
+     */
+    public AuthorizationData()
+    {
+        // used by ASN.1 decoder
+    }
+
+    public void add( AuthorizationData data )
+    {
+        entries.addAll( data.entries );
+    }
 
+    public void add( AuthorizationDataEntry entry )
+    {
+        entries.add( entry );
+    }
+
+    public Iterator iterator()
+    {
+        return entries.iterator();
+    }
+}

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/AuthorizationDataEntry.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/AuthorizationDataEntry.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/AuthorizationDataEntry.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/AuthorizationDataEntry.java Mon Aug 22 03:20:30 2005
@@ -16,24 +16,27 @@
  */
 package org.apache.kerberos.messages.value;
 
-public class AuthorizationDataEntry {
+public class AuthorizationDataEntry
+{
+    private AuthorizationType authorizationDataType;
+    private byte[]            authorizationData;
 
-	private AuthorizationType _authorizationDataType;
-	private byte[]            _authorizationData;
+    /**
+     * Class constructor
+     */
+    public AuthorizationDataEntry( AuthorizationType adType, byte[] adData )
+    {
+        authorizationDataType = adType;
+        authorizationData     = adData;
+    }
 
-	/**
-	 * Class constructor
-	 */
-	public AuthorizationDataEntry(AuthorizationType adType, byte[] adData) {
-		_authorizationDataType = adType;
-		_authorizationData     = adData;
-	}
+    public byte[] getAuthorizationData()
+    {
+        return authorizationData;
+    }
 
-	public byte[] getAuthorizationData() {
-		return _authorizationData;
-	}
-	public AuthorizationType getAuthorizationDataType() {
-		return _authorizationDataType;
-	}
+    public AuthorizationType getAuthorizationDataType()
+    {
+        return authorizationDataType;
+    }
 }
-

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/AuthorizationType.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/AuthorizationType.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/AuthorizationType.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/AuthorizationType.java Mon Aug 22 03:20:30 2005
@@ -16,10 +16,12 @@
  */
 package org.apache.kerberos.messages.value;
 
-import java.util.*;
-
-public final class AuthorizationType implements Comparable {
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
 
+public final class AuthorizationType implements Comparable
+{
 	/**
 	 * Enumeration elements are constructed once upon class loading.
 	 * Order of appearance here determines the order of compareTo.
@@ -35,44 +37,50 @@
 	public static final AuthorizationType OSF_DCE             = new AuthorizationType(64, "OSF DCE");
 	public static final AuthorizationType SESAME              = new AuthorizationType(65, "sesame");
 	
-	public String toString() {
-		return _fName + " (" + _fOrdinal + ")";
-	}
-
-	public int compareTo(Object that) {
-		return _fOrdinal - ((AuthorizationType) that)._fOrdinal;
-	}
-
-	public static AuthorizationType getTypeByOrdinal(int type) {
-		for (int i = 0; i < fValues.length; i++)
-			if (fValues[i]._fOrdinal == type)
-				return fValues[i];
-		return NULL;
-	}
-	
-	public int getOrdinal() {
-		return _fOrdinal;
-	}
-
-	/// PRIVATE /////
-	private final String _fName;
-	private final int    _fOrdinal;
-
-	/**
-	 * Private constructor prevents construction outside of this class.
-	 */
-	private AuthorizationType(int ordinal, String name) {
-		_fOrdinal = ordinal;
-		_fName    = name;
-	}
-
-	/**
-	 * These two lines are all that's necessary to export a List of VALUES.
-	 */
-	private static final AuthorizationType[] fValues = {NULL, IF_RELEVANT, INTENDED_FOR_SERVER,
-			INTENDED_FOR_APPLICATION_CLASS, KDC_ISSUED, OR, MANDATORY_TICKET_EXTENSIONS,
-			IN_TICKET_EXTENSIONS, OSF_DCE, SESAME};
-	// VALUES needs to be located here, otherwise illegal forward reference
-	public static final List VALUES = Collections.unmodifiableList(Arrays.asList(fValues));
+	public String toString()
+    {
+        return name + " (" + ordinal + ")";
+    }
+
+    public int compareTo( Object that )
+    {
+        return ordinal - ( (AuthorizationType) that ).ordinal;
+    }
+
+    public static AuthorizationType getTypeByOrdinal( int type )
+    {
+        for ( int ii = 0; ii < values.length; ii++ )
+        {
+            if ( values[ ii ].ordinal == type ) return values[ ii ];
+        }
+        
+        return NULL;
+    }
+
+    public int getOrdinal()
+    {
+        return ordinal;
+    }
+
+    /// PRIVATE /////
+    private final String name;
+    private final int ordinal;
+
+    /**
+     * Private constructor prevents construction outside of this class.
+     */
+    private AuthorizationType( int ordinal, String name )
+    {
+        this.ordinal = ordinal;
+        this.name = name;
+    }
+
+    /**
+     * These two lines are all that's necessary to export a List of VALUES.
+     */
+    private static final AuthorizationType[] values = { NULL, IF_RELEVANT, INTENDED_FOR_SERVER,
+            INTENDED_FOR_APPLICATION_CLASS, KDC_ISSUED, OR, MANDATORY_TICKET_EXTENSIONS,
+            IN_TICKET_EXTENSIONS, OSF_DCE, SESAME };
+    // VALUES needs to be located here, otherwise illegal forward reference
+    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
 }
-

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/Checksum.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/Checksum.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/Checksum.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/Checksum.java Mon Aug 22 03:20:30 2005
@@ -14,53 +14,48 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.messages.value;
 
 import java.util.Arrays;
 
 import org.apache.kerberos.crypto.checksum.ChecksumType;
 
-
 public class Checksum
 {
-	private ChecksumType checksumType;
-	private byte[]       checksum;
-	
-	
-	public Checksum( ChecksumType checksumType, byte[] checksum )
-	{
-		this.checksumType = checksumType;
-		this.checksum     = checksum;
-	}
-	
-	
-	public boolean equals( Object o )
-	{
-		if ( this == o )
-		{
-			return true;
-		}
-		
-		if ( !( o instanceof Checksum ) )
-		{
-			return false;
-		}
-		
-		Checksum that = (Checksum) o;
-		
-		return ( this.checksumType == that.checksumType )
-				&& ( Arrays.equals( this.checksum, that.checksum ) );
-	}
-	
-	public byte[] getChecksumValue()
-	{
-		return checksum;
-	}
-	
-	public ChecksumType getChecksumType()
-	{
-		return checksumType;
-	}
-}
+    private ChecksumType checksumType;
+    private byte[] checksum;
 
+    public Checksum( ChecksumType checksumType, byte[] checksum )
+    {
+        this.checksumType = checksumType;
+        this.checksum = checksum;
+    }
+
+    public boolean equals( Object o )
+    {
+        if ( this == o )
+        {
+            return true;
+        }
+
+        if ( !( o instanceof Checksum ) )
+        {
+            return false;
+        }
+
+        Checksum that = (Checksum) o;
+
+        return ( this.checksumType == that.checksumType )
+                && ( Arrays.equals( this.checksum, that.checksum ) );
+    }
+
+    public byte[] getChecksumValue()
+    {
+        return checksum;
+    }
+
+    public ChecksumType getChecksumType()
+    {
+        return checksumType;
+    }
+}

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptedData.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptedData.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptedData.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptedData.java Mon Aug 22 03:20:30 2005
@@ -24,26 +24,25 @@
 	private int            keyVersion;     //optional
 	private byte[]         cipherText;
 
-	public EncryptedData(EncryptionType type, int version, byte[] cipherText)
+	public EncryptedData( EncryptionType type, int version, byte[] cipherText )
     {
-		encryptionType  = type;
-		keyVersion      = version;
-		this.cipherText = cipherText;
-	}
+        encryptionType  = type;
+        keyVersion      = version;
+        this.cipherText = cipherText;
+    }
 
-	public EncryptionType getEncryptionType()
+    public EncryptionType getEncryptionType()
     {
-		return encryptionType;
-	}
+        return encryptionType;
+    }
 
-	public int getKeyVersion()
+    public int getKeyVersion()
     {
-		return keyVersion;
-	}
+        return keyVersion;
+    }
 
-	public byte[] getCipherText()
+    public byte[] getCipherText()
     {
-		return cipherText;
-	}
+        return cipherText;
+    }
 }
-

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptedDataModifier.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptedDataModifier.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptedDataModifier.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptedDataModifier.java Mon Aug 22 03:20:30 2005
@@ -26,22 +26,21 @@
 	
 	public EncryptedData getEncryptedData()
     {
-        return new EncryptedData(encryptionType, keyVersion, cipherText);
-	}
+        return new EncryptedData( encryptionType, keyVersion, cipherText );
+    }
 
-	public void setCipherText(byte[] cipherText)
+    public void setCipherText( byte[] cipherText )
     {
-		this.cipherText = cipherText;
-	}
+        this.cipherText = cipherText;
+    }
 
-	public void setEncryptionType(EncryptionType type)
+    public void setEncryptionType( EncryptionType type )
     {
-		encryptionType = type;
-	}
+        encryptionType = type;
+    }
 
-	public void setKeyVersion(int version)
+    public void setKeyVersion( int version )
     {
-		keyVersion = version;
-	}
+        keyVersion = version;
+    }
 }
-

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptedTimeStamp.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptedTimeStamp.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptedTimeStamp.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptedTimeStamp.java Mon Aug 22 03:20:30 2005
@@ -14,7 +14,6 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.messages.value;
 
 /**
@@ -35,10 +34,9 @@
 	{
 		return timeStamp;
 	}
-	
+
 	public int getMicroSeconds()
 	{
 		return microSeconds;
 	}
 }
-

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptedTimeStampModifier.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptedTimeStampModifier.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptedTimeStampModifier.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptedTimeStampModifier.java Mon Aug 22 03:20:30 2005
@@ -14,10 +14,8 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.messages.value;
 
-
 public class EncryptedTimeStampModifier
 {
 	private KerberosTime timeStamp;
@@ -26,16 +24,15 @@
 	public EncryptedTimeStamp getEncryptedTimestamp()
     {
         return new EncryptedTimeStamp( timeStamp, microSecond );
-	}
-	
-	public void setKerberosTime( KerberosTime timeStamp )
+    }
+
+    public void setKerberosTime( KerberosTime timeStamp )
     {
-		this.timeStamp = timeStamp;
-	}
-	
-	public void setMicroSecond( int microSecond )
+        this.timeStamp = timeStamp;
+    }
+
+    public void setMicroSecond( int microSecond )
     {
-		this.microSecond = microSecond;
-	}
+        this.microSecond = microSecond;
+    }
 }
-

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptionKey.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptionKey.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptionKey.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptionKey.java Mon Aug 22 03:20:30 2005
@@ -16,65 +16,82 @@
  */
 package org.apache.kerberos.messages.value;
 
-import org.apache.kerberos.crypto.encryption.*;
+import java.util.Arrays;
 
-import java.util.*;
+import org.apache.kerberos.crypto.encryption.EncryptionType;
 
-public class EncryptionKey {
-	
-	private EncryptionType _keyType;
-	private byte[]         _keyValue;
-	private int            _keyVersion;
-	
-	public EncryptionKey(EncryptionType keyType, byte[] keyValue) {
-		_keyType    = keyType;
-		_keyValue   = keyValue;
-	}
-	
-	public EncryptionKey(EncryptionType keyType, byte[] keyValue, int keyVersion) {
-		_keyType    = keyType;
-		_keyValue   = keyValue;
-		/**
-		 * keyVersion is sent over the wire as part of EncryptedData but makes more sense
-		 * in the domain model to have here as part of the key itself.  Therefore, the
-		 * keyVersion should only be constructor-injected when EncryptionKey's are
-		 * retrieved from persisted storage.
-		 * 
-		 * TODO - keyVersion may move into persisted user configuration
-		 */
-		_keyVersion = keyVersion;
-	}
-	
-	public boolean equals(Object o) {
-		if (this == o)
-			return true;
-		if (!(o instanceof EncryptionKey))
-			return false;
-
-		EncryptionKey that = (EncryptionKey) o;
-		return (this._keyType == that._keyType)
-				&& (Arrays.equals(this._keyValue, that._keyValue));
-	}
-	
-	public synchronized void destroy() {
-		if (_keyValue != null)
-			for (int i = 0; i < _keyValue.length; i++)
-				_keyValue[i] = 0;
-	}
-	
-	public String toString() {
-		return _keyType.toString() + " (" + _keyType.getOrdinal() + ")";
-	}
-
-	public EncryptionType getKeyType() {
-		return _keyType;
-	}
-	public byte[] getKeyValue() {
-		return _keyValue;
-	}
-	
-	public int getKeyVersion() {
-		return _keyVersion;
-	}
-}
+public class EncryptionKey
+{
+	private EncryptionType keyType;
+	private byte[]         keyValue;
+	private int            keyVersion;
+	
+	public EncryptionKey( EncryptionType keyType, byte[] keyValue )
+    {
+        this.keyType = keyType;
+        this.keyValue = keyValue;
+    }
 
+    public EncryptionKey( EncryptionType keyType, byte[] keyValue, int keyVersion )
+    {
+        this.keyType = keyType;
+        this.keyValue = keyValue;
+        /**
+         * keyVersion is sent over the wire as part of EncryptedData but makes more sense
+         * in the domain model to have here as part of the key itself.  Therefore, the
+         * keyVersion should only be constructor-injected when EncryptionKey's are
+         * retrieved from persisted storage.
+         * 
+         * TODO - keyVersion may move into persisted user configuration
+         */
+        this.keyVersion = keyVersion;
+    }
+
+    public boolean equals( Object o )
+    {
+        if ( this == o )
+        {
+            return true;
+        }
+        
+        if ( !( o instanceof EncryptionKey ) )
+        {
+            return false;
+        }
+
+        EncryptionKey that = (EncryptionKey) o;
+        return ( this.keyType == that.keyType )
+                && ( Arrays.equals( this.keyValue, that.keyValue ) );
+    }
+
+    public synchronized void destroy()
+    {
+        if ( keyValue != null )
+        {
+            for ( int ii = 0; ii < keyValue.length; ii++ )
+            {
+                keyValue[ ii ] = 0;
+            }
+        }
+    }
+
+    public String toString()
+    {
+        return keyType.toString() + " (" + keyType.getOrdinal() + ")";
+    }
+
+    public EncryptionType getKeyType()
+    {
+        return keyType;
+    }
+
+    public byte[] getKeyValue()
+    {
+        return keyValue;
+    }
+
+    public int getKeyVersion()
+    {
+        return keyVersion;
+    }
+}

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptionTypeInfoEntry.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptionTypeInfoEntry.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptionTypeInfoEntry.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/EncryptionTypeInfoEntry.java Mon Aug 22 03:20:30 2005
@@ -14,33 +14,28 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.messages.value;
 
 import org.apache.kerberos.crypto.encryption.EncryptionType;
 
-
 public class EncryptionTypeInfoEntry
 {
 	private EncryptionType encryptionType;
 	private byte[]         salt;
-	
-	
+
 	public EncryptionTypeInfoEntry( EncryptionType encryptionType, byte[] salt )
-	{
-		this.encryptionType = encryptionType;
-		this.salt           = salt;
-	}
-	
-	
-	public byte[] getSalt()
-	{
-		return salt;
-	}
-	
-	public EncryptionType getEncryptionType()
-	{
-		return encryptionType;
-	}   
-}
+    {
+        this.encryptionType = encryptionType;
+        this.salt = salt;
+    }
+
+    public byte[] getSalt()
+    {
+        return salt;
+    }
 
+    public EncryptionType getEncryptionType()
+    {
+        return encryptionType;
+    }
+}

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/HostAddress.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/HostAddress.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/HostAddress.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/HostAddress.java Mon Aug 22 03:20:30 2005
@@ -16,13 +16,14 @@
  */
 package org.apache.kerberos.messages.value;
 
-import java.net.*;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
 
 /**
  * Provides host address information.
  */
-public class HostAddress {
-	
+public class HostAddress
+{
     // Host address length - inet
 	public static final int ADDR_LEN_INET      = 4;
     // Host address length - chaos
@@ -35,66 +36,89 @@
 	public static final int ADDR_LEN_APPLETALK = 3;
     // Host address length - decnet
 	public static final int ADDR_LEN_DECNET    = 2;
-	
+
 	private static byte[] localInetAddress;
-	
-	private HostAddressType _addressType;
-	private byte[]          _address;
-	
-	/**
-	 * Class constructors
-	 */
-	public HostAddress() {
-		try {
-			_addressType = HostAddressType.ADDRTYPE_INET;
-			_address     = getLocalInetAddress();
-		} catch (UnknownHostException uhe) {
-			uhe.printStackTrace();
-		}
-	}
-
-	public HostAddress(HostAddressType addressType, byte[] address) {
-		_addressType = addressType;
-		_address     = address;
-	}
-
-	public HostAddress(InetAddress internetAddress) {
-		_addressType      = HostAddressType.ADDRTYPE_INET;
-		byte[] newAddress = internetAddress.getAddress();
-		_address          = new byte[newAddress.length];
-		System.arraycopy(newAddress, 0, _address, 0, newAddress.length);
-	}
-
-	public boolean equals(HostAddress h) {
-		if (_addressType != h._addressType ||
-			(_address != null && h._address == null) ||
-			(_address == null && h._address != null))
-			return false;
-		if (_address != null && h._address != null) {
-			if (_address.length != h._address.length)
-				return false;
-			for (int i = 0; i < _address.length; i++)
-				if (_address[i] != h._address[i])
-					return false;
-		}
-		return true;
-	}
-	
-	public static byte[] getLocalInetAddress() throws UnknownHostException {
-		if (localInetAddress == null)
-			localInetAddress = InetAddress.getLocalHost().getAddress();
-		
-		byte[] result = new byte[localInetAddress.length];
-		System.arraycopy(localInetAddress, 0, result, 0, localInetAddress.length);
-		
-		return result;
-	}
-	
-	public byte[] getAddress() {
-		return _address;
-	}
-	public HostAddressType getAddressType() {
-		return _addressType;
-	}
-}
 
+    private HostAddressType addressType;
+    private byte[] address;
+
+    /**
+     * Class constructors
+     */
+    public HostAddress()
+    {
+        try
+        {
+            addressType = HostAddressType.ADDRTYPE_INET;
+            address = getLocalInetAddress();
+        }
+        catch ( UnknownHostException uhe )
+        {
+            uhe.printStackTrace();
+        }
+    }
+
+    public HostAddress( HostAddressType addressType, byte[] address )
+    {
+        this.addressType = addressType;
+        this.address = address;
+    }
+
+    public HostAddress( InetAddress internetAddress )
+    {
+        addressType = HostAddressType.ADDRTYPE_INET;
+        byte[] newAddress = internetAddress.getAddress();
+        address = new byte[ newAddress.length ];
+        System.arraycopy( newAddress, 0, address, 0, newAddress.length );
+    }
+
+    public boolean equals( HostAddress h )
+    {
+        if ( addressType != h.addressType || ( address != null && h.address == null )
+                || ( address == null && h.address != null ) )
+        {
+            return false;
+        }
+
+        if ( address != null && h.address != null )
+        {
+            if ( address.length != h.address.length )
+            {
+                return false;
+            }
+
+            for ( int ii = 0; ii < address.length; ii++ )
+            {
+                if ( address[ ii ] != h.address[ ii ] )
+                {
+                    return false;
+                }
+            }
+        }
+
+        return true;
+    }
+
+    public static byte[] getLocalInetAddress() throws UnknownHostException
+    {
+        if ( localInetAddress == null )
+        {
+            localInetAddress = InetAddress.getLocalHost().getAddress();
+        }
+
+        byte[] result = new byte[ localInetAddress.length ];
+        System.arraycopy( localInetAddress, 0, result, 0, localInetAddress.length );
+
+        return result;
+    }
+
+    public byte[] getAddress()
+    {
+        return address;
+    }
+
+    public HostAddressType getAddressType()
+    {
+        return addressType;
+    }
+}

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/HostAddressType.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/HostAddressType.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/HostAddressType.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/HostAddressType.java Mon Aug 22 03:20:30 2005
@@ -63,8 +63,14 @@
 
     public static HostAddressType getTypeByOrdinal( int type )
     {
-        for ( int i = 0; i < values.length; i++ )
-            if ( values[ i ].ordinal == type ) return values[ i ];
+        for ( int ii = 0; ii < values.length; ii++ )
+        {
+            if ( values[ ii ].ordinal == type )
+            {
+                return values[ ii ];
+            }
+        }
+
         return NULL;
     }
 

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/HostAddresses.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/HostAddresses.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/HostAddresses.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/HostAddresses.java Mon Aug 22 03:20:30 2005
@@ -16,47 +16,69 @@
  */
 package org.apache.kerberos.messages.value;
 
-public class HostAddresses {
-	
-	private HostAddress[] _addresses;
-
-	/**
-	 * Class constructors
-	 */
-	public HostAddresses(HostAddress[] newAddresses) {
-		_addresses = newAddresses;
-	}
-
-	public HostAddresses() {
-		_addresses    = new HostAddress[1];
-		_addresses[0] = new HostAddress();
-	}
-
-	public boolean contains(HostAddress address) {
-		if (_addresses != null) {
-			for (int i = 0; i < _addresses.length; i++)
-				if (_addresses[i].equals(address))
-					return true;
-		}
-		return false;
-	}
-
-	public boolean equals(HostAddresses addresses) {
-		if ((_addresses == null && addresses._addresses != null) ||
-			(_addresses != null && addresses._addresses == null))
-			return false;
-		if (_addresses != null && addresses._addresses != null) {
-			if (_addresses.length != addresses._addresses.length)
-				return false;
-			for (int i = 0; i < _addresses.length; i++)
-				if (!_addresses[i].equals(addresses._addresses[i]))
-					return false;
-		}
-		return true;
-	}
-	
-	public HostAddress[] getAddresses() {
-		return _addresses;
-	}
-}
+public class HostAddresses
+{
+    private HostAddress[] addresses;
+
+    /**
+     * Class constructors
+     */
+    public HostAddresses( HostAddress[] addresses )
+    {
+        this.addresses = addresses;
+    }
+
+    public HostAddresses()
+    {
+        addresses = new HostAddress[ 1 ];
+        addresses[ 0 ] = new HostAddress();
+    }
+
+    public boolean contains( HostAddress address )
+    {
+        if ( addresses != null )
+        {
+            for ( int ii = 0; ii < addresses.length; ii++ )
+            {
+                if ( addresses[ ii ].equals( address ) )
+                {
+                    return true;
+                }
+            }
+        }
+
+        return false;
+    }
 
+    public boolean equals( HostAddresses that )
+    {
+        if ( ( this.addresses == null && that.addresses != null )
+                || ( this.addresses != null && that.addresses == null ) )
+        {
+            return false;
+        }
+
+        if ( this.addresses != null && that.addresses != null )
+        {
+            if ( this.addresses.length != that.addresses.length )
+            {
+                return false;
+            }
+
+            for ( int ii = 0; ii < this.addresses.length; ii++ )
+            {
+                if ( !this.addresses[ ii ].equals( that.addresses[ ii ] ) )
+                {
+                    return false;
+                }
+            }
+        }
+
+        return true;
+    }
+
+    public HostAddress[] getAddresses()
+    {
+        return addresses;
+    }
+}

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/KdcOptions.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/KdcOptions.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/KdcOptions.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/KdcOptions.java Mon Aug 22 03:20:30 2005
@@ -16,7 +16,8 @@
  */
 package org.apache.kerberos.messages.value;
 
-public class KdcOptions extends Options {
+public class KdcOptions extends Options
+{
     // KDC option - reserved
 	public static final int RESERVED                    = 0;
     // KDC option - forwardable
@@ -55,54 +56,96 @@
 	public static final int RENEW                       = 30;
     // KDC option - validate
 	public static final int VALIDATE                    = 31;
-	
+
     // KDC option - maximum value
 	public static final int MAX_VALUE                   = 32;
-	
-	/**
-	 * Class constructors
-	 */
-	public KdcOptions() {
-		super(MAX_VALUE);
-	}
-	
-	public KdcOptions(byte[] bytes) {
-		super(MAX_VALUE);
-		setBytes(bytes);
-	}
-	
+
 	/**
-	 * Converts the object to a printable string
-	 */
-	public String toString() {
-		StringBuffer result = new StringBuffer();
-		if (get(ALLOW_POSTDATE))
-			result.append("ALLOW_POSTDATE ");
-		if (get(DISABLE_TRANSISTED_CHECKED))
-			result.append("DISABLE_TRANSISTED_CHECKED ");
-		if (get(ENC_TKT_IN_SKEY))
-			result.append("ENC_TKT_IN_SKEY ");
-		if (get(FORWARDABLE))
-			result.append("FORWARDABLE ");
-		if (get(FORWARDED))
-			result.append("FORWARDED ");
-		if (get(POSTDATED))
-			result.append("POSTDATED ");
-		if (get(PROXIABLE))
-			result.append("PROXIABLE ");
-		if (get(PROXY))
-			result.append("PROXY ");
-		if (get(RENEW))
-			result.append("RENEW ");
-		if (get(RENEWABLE))
-			result.append("RENEWABLE ");
-		if (get(RENEWABLE_OK))
-			result.append("RENEWABLE_OK ");
-		if (get(RESERVED))
-			result.append("RESERVED ");
-		if (get(VALIDATE))
-			result.append("VALIDATE ");
-		return result.toString().trim();
-	}
-}
+     * Class constructors
+     */
+    public KdcOptions()
+    {
+        super( MAX_VALUE );
+    }
+
+    public KdcOptions( byte[] bytes )
+    {
+        super( MAX_VALUE );
+        setBytes( bytes );
+    }
+
+    /**
+     * Converts the object to a printable string
+     */
+    public String toString()
+    {
+        StringBuffer result = new StringBuffer();
+
+        if ( get( ALLOW_POSTDATE ) )
+        {
+            result.append( "ALLOW_POSTDATE " );
+        }
+
+        if ( get( DISABLE_TRANSISTED_CHECKED ) )
+        {
+            result.append( "DISABLE_TRANSISTED_CHECKED " );
+        }
+
+        if ( get( ENC_TKT_IN_SKEY ) )
+        {
+            result.append( "ENC_TKT_IN_SKEY " );
+        }
+
+        if ( get( FORWARDABLE ) )
+        {
+            result.append( "FORWARDABLE " );
+        }
 
+        if ( get( FORWARDED ) )
+        {
+            result.append( "FORWARDED " );
+        }
+
+        if ( get( POSTDATED ) )
+        {
+            result.append( "POSTDATED " );
+        }
+
+        if ( get( PROXIABLE ) )
+        {
+            result.append( "PROXIABLE " );
+        }
+
+        if ( get( PROXY ) )
+        {
+            result.append( "PROXY " );
+        }
+
+        if ( get( RENEW ) )
+        {
+            result.append( "RENEW " );
+        }
+
+        if ( get( RENEWABLE ) )
+        {
+            result.append( "RENEWABLE " );
+        }
+
+        if ( get( RENEWABLE_OK ) )
+        {
+            result.append( "RENEWABLE_OK " );
+        }
+
+        if ( get( RESERVED ) )
+        {
+            result.append( "RESERVED " );
+        }
+
+        if ( get( VALIDATE ) )
+        {
+            result.append( "VALIDATE " );
+        }
+
+        return result.toString().trim();
+    }
+}

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/KerberosPrincipalModifier.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/KerberosPrincipalModifier.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/KerberosPrincipalModifier.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/KerberosPrincipalModifier.java Mon Aug 22 03:20:30 2005
@@ -16,34 +16,41 @@
  */
 package org.apache.kerberos.messages.value;
 
-import javax.security.auth.kerberos.*;
+import javax.security.auth.kerberos.KerberosPrincipal;
 
-public class KerberosPrincipalModifier {
-	
-	private static final String REALM_SEPARATOR = "@";
-	
-	PrincipalName _nameComponent;
-	String        _realm;
-	
-	public KerberosPrincipal getKerberosPrincipal() {
-		if (_nameComponent != null) {
-			StringBuffer sb = new StringBuffer();
-			sb.append(_nameComponent.getNameComponent());
-			if (_realm != null) {
-				sb.append(REALM_SEPARATOR);
-				sb.append(_realm);
-			}
-			return new KerberosPrincipal(sb.toString(), _nameComponent.getNameType());
-		}
-		return null;
-	}
-	
-	public void setPrincipalName(PrincipalName principalName) {
-		_nameComponent = principalName;
-	}
-
-	public void setRealm(String realm) {
-		_realm = realm;
-	}
-}
+public class KerberosPrincipalModifier
+{
+    private static final String REALM_SEPARATOR = "@";
+
+    PrincipalName nameComponent;
+    String realm;
+
+    public KerberosPrincipal getKerberosPrincipal()
+    {
+        if ( nameComponent != null )
+        {
+            StringBuffer sb = new StringBuffer();
+            sb.append( nameComponent.getNameComponent() );
+
+            if ( realm != null )
+            {
+                sb.append( REALM_SEPARATOR );
+                sb.append( realm );
+            }
 
+            return new KerberosPrincipal( sb.toString(), nameComponent.getNameType() );
+        }
+
+        return null;
+    }
+
+    public void setPrincipalName( PrincipalName principalName )
+    {
+        nameComponent = principalName;
+    }
+
+    public void setRealm( String realm )
+    {
+        this.realm = realm;
+    }
+}

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/KrbCredInfo.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/KrbCredInfo.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/KrbCredInfo.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/KrbCredInfo.java Mon Aug 22 03:20:30 2005
@@ -16,65 +16,80 @@
  */
 package org.apache.kerberos.messages.value;
 
-import javax.security.auth.kerberos.*;
+import javax.security.auth.kerberos.KerberosPrincipal;
 
 /**
  * Kerberos credential information
  */
-public class KrbCredInfo {
+public class KrbCredInfo
+{
+	private EncryptionKey     key;
+	private KerberosPrincipal clientPrincipal; //optional
+	private TicketFlags       flags;           //optional
+	private KerberosTime      authTime;        //optional
+	private KerberosTime      startTime;       //optional
+	private KerberosTime      endTime;         //optional
+	private KerberosTime      renewTill;       //optional
+	private KerberosPrincipal serverPrincipal; //optional
+	private HostAddresses     clientAddresses; //optional
 
-	private EncryptionKey     _key;
-	private KerberosPrincipal _clientPrincipal; //optional
-	private TicketFlags       _flags;           //optional
-	private KerberosTime      _authTime;        //optional
-	private KerberosTime      _startTime;       //optional
-	private KerberosTime      _endTime;         //optional
-	private KerberosTime      _renewTill;       //optional
-	private KerberosPrincipal _serverPrincipal; //optional
-	private HostAddresses     _clientAddresses; //optional
-
-	public KrbCredInfo(EncryptionKey key, KerberosPrincipal clientPrincipal,
-			TicketFlags flags, KerberosTime authTime, KerberosTime startTime,
-			KerberosTime endTime, KerberosTime renewTill, KerberosPrincipal serverPrincipal,
-			HostAddresses clientAddresses) {
-		
-		_key             = key;
-		_clientPrincipal = clientPrincipal;
-		_flags           = flags;
-		_authTime        = authTime;
-		_startTime       = startTime;
-		_endTime         = endTime;
-		_renewTill       = renewTill;
-		_serverPrincipal = serverPrincipal;
-		_clientAddresses = clientAddresses;
-	}
-
-	public KerberosTime getAuthTime() {
-		return _authTime;
-	}
-	public HostAddresses getClientAddresses() {
-		return _clientAddresses;
-	}
-	public KerberosTime getEndTime() {
-		return _endTime;
-	}
-	public TicketFlags getFlags() {
-		return _flags;
-	}
-	public EncryptionKey getKey() {
-		return _key;
-	}
-	public KerberosPrincipal getClientPrincipal() {
-		return _clientPrincipal;
-	}
-	public KerberosTime getRenewTill() {
-		return _renewTill;
-	}
-	public KerberosPrincipal getServerPrincipal() {
-		return _serverPrincipal;
-	}
-	public KerberosTime getStartTime() {
-		return _startTime;
-	}
-}
+	public KrbCredInfo( EncryptionKey key, KerberosPrincipal clientPrincipal, TicketFlags flags,
+            KerberosTime authTime, KerberosTime startTime, KerberosTime endTime,
+            KerberosTime renewTill, KerberosPrincipal serverPrincipal, HostAddresses clientAddresses )
+    {
+        this.key             = key;
+        this.clientPrincipal = clientPrincipal;
+        this.flags           = flags;
+        this.authTime        = authTime;
+        this.startTime       = startTime;
+        this.endTime         = endTime;
+        this.renewTill       = renewTill;
+        this.serverPrincipal = serverPrincipal;
+        this.clientAddresses = clientAddresses;
+    }
+
+    public KerberosTime getAuthTime()
+    {
+        return authTime;
+    }
+
+    public HostAddresses getClientAddresses()
+    {
+        return clientAddresses;
+    }
+
+    public KerberosTime getEndTime()
+    {
+        return endTime;
+    }
+
+    public TicketFlags getFlags()
+    {
+        return flags;
+    }
 
+    public EncryptionKey getKey()
+    {
+        return key;
+    }
+
+    public KerberosPrincipal getClientPrincipal()
+    {
+        return clientPrincipal;
+    }
+
+    public KerberosTime getRenewTill()
+    {
+        return renewTill;
+    }
+
+    public KerberosPrincipal getServerPrincipal()
+    {
+        return serverPrincipal;
+    }
+
+    public KerberosTime getStartTime()
+    {
+        return startTime;
+    }
+}

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/LastRequest.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/LastRequest.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/LastRequest.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/LastRequest.java Mon Aug 22 03:20:30 2005
@@ -16,20 +16,22 @@
  */
 package org.apache.kerberos.messages.value;
 
-public class LastRequest {
-	
-	private LastRequestEntry[] _entries = new LastRequestEntry[1];
-	
-	public LastRequest() {
-		_entries[0] = new LastRequestEntry(LastRequestType.NONE, new KerberosTime());
-	}
-	
-	public LastRequest(LastRequestEntry[] entries) {
-		_entries = entries;
-	}
-	
-	public LastRequestEntry[] getEntries() {
-		return _entries;
-	}
-}
+public class LastRequest
+{
+    private LastRequestEntry[] entries = new LastRequestEntry[ 1 ];
+
+    public LastRequest()
+    {
+        entries[ 0 ] = new LastRequestEntry( LastRequestType.NONE, new KerberosTime() );
+    }
 
+    public LastRequest( LastRequestEntry[] entries )
+    {
+        this.entries = entries;
+    }
+
+    public LastRequestEntry[] getEntries()
+    {
+        return entries;
+    }
+}

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/LastRequestEntry.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/LastRequestEntry.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/LastRequestEntry.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/LastRequestEntry.java Mon Aug 22 03:20:30 2005
@@ -16,21 +16,24 @@
  */
 package org.apache.kerberos.messages.value;
 
-public class LastRequestEntry {
+public class LastRequestEntry
+{
+    private LastRequestType lastRequestType;
+    private KerberosTime lastRequestValue;
 
-	private LastRequestType _lastRequestType;
-	private KerberosTime    _lastRequestValue;
-	
-	public LastRequestEntry(LastRequestType type, KerberosTime value) {
-		_lastRequestType  = type;
-		_lastRequestValue = value;
-	}
-	
-	public LastRequestType getLastRequestType() {
-		return _lastRequestType;
-	}
-	public KerberosTime getLastRequestValue() {
-		return _lastRequestValue;
-	}
-}
+    public LastRequestEntry( LastRequestType type, KerberosTime value )
+    {
+        lastRequestType = type;
+        lastRequestValue = value;
+    }
+
+    public LastRequestType getLastRequestType()
+    {
+        return lastRequestType;
+    }
 
+    public KerberosTime getLastRequestValue()
+    {
+        return lastRequestValue;
+    }
+}

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/LastRequestType.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/LastRequestType.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/LastRequestType.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/LastRequestType.java Mon Aug 22 03:20:30 2005
@@ -16,10 +16,12 @@
  */
 package org.apache.kerberos.messages.value;
 
-import java.util.*;
-
-public final class LastRequestType implements Comparable {
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
 
+public final class LastRequestType implements Comparable
+{
 	/**
 	 * Enumeration elements are constructed once upon class loading.
 	 * Order of appearance here determines the order of compareTo.
@@ -31,45 +33,54 @@
 	public static final LastRequestType TIME_OF_LAST_RENEWAL = new LastRequestType(4, "time of last renewal");
 	public static final LastRequestType TIME_OF_LAST_REQ     = new LastRequestType(5, "time of last request");
 	public static final LastRequestType TIME_OF_PASSWORD_EXP = new LastRequestType(6, "time of password expiration");
-	
-	public String toString() {
-		return _fName + " (" + _fOrdinal + ")";
-	}
-
-	public int compareTo(Object that) {
-		return _fOrdinal - ((LastRequestType) that)._fOrdinal;
-	}
-
-	public static LastRequestType getTypeByOrdinal(int type) {
-		for (int i = 0; i < fValues.length; i++)
-			if (fValues[i]._fOrdinal == type)
-				return fValues[i];
-		return NONE;
-	}
-	
-	public int getOrdinal() {
-		return _fOrdinal;
-	}
-
-	/// PRIVATE /////
-	private final String _fName;
-	private final int    _fOrdinal;
-
-	/**
-	 * Private constructor prevents construction outside of this class.
-	 */
-	private LastRequestType(int ordinal, String name) {
-		_fOrdinal = ordinal;
-		_fName    = name;
-	}
 
-	/**
-	 * These two lines are all that's necessary to export a List of VALUES.
-	 */
-	private static final LastRequestType[] fValues = {NONE, TIME_OF_INITIAL_TGT,
-			TIME_OF_INITIAL_REQ, TIME_OF_NEWEST_TGT, TIME_OF_LAST_RENEWAL,
-			TIME_OF_LAST_REQ, TIME_OF_PASSWORD_EXP};
-	// VALUES needs to be located here, otherwise illegal forward reference
-	public static final List VALUES = Collections.unmodifiableList(Arrays.asList(fValues));
+	public String toString()
+    {
+        return name + " (" + ordinal + ")";
+    }
+
+    public int compareTo( Object that )
+    {
+        return ordinal - ( (LastRequestType) that ).ordinal;
+    }
+
+    public static LastRequestType getTypeByOrdinal( int type )
+    {
+        for ( int ii = 0; ii < values.length; ii++ )
+        {
+            if ( values[ ii ].ordinal == type )
+            {
+                return values[ ii ];
+            }
+        }
+
+        return NONE;
+    }
+
+    public int getOrdinal()
+    {
+        return ordinal;
+    }
+
+    /// PRIVATE /////
+    private final String name;
+    private final int ordinal;
+
+    /**
+     * Private constructor prevents construction outside of this class.
+     */
+    private LastRequestType( int ordinal, String name )
+    {
+        this.ordinal = ordinal;
+        this.name = name;
+    }
+
+    /**
+     * These two lines are all that's necessary to export a List of VALUES.
+     */
+    private static final LastRequestType[] values = { NONE, TIME_OF_INITIAL_TGT,
+            TIME_OF_INITIAL_REQ, TIME_OF_NEWEST_TGT, TIME_OF_LAST_RENEWAL, TIME_OF_LAST_REQ,
+            TIME_OF_PASSWORD_EXP };
+    // VALUES needs to be located here, otherwise illegal forward reference
+    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
 }
-

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/Options.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/Options.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/Options.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/Options.java Mon Aug 22 03:20:30 2005
@@ -16,59 +16,71 @@
  */
 package org.apache.kerberos.messages.value;
 
-import java.util.*;
+import java.util.BitSet;
 
-public abstract class Options {
-	
-	private BitSet _options;
-	private int    _maxSize;
-	
-	protected Options(int maxSize) {
-		_maxSize = maxSize;
-		_options = new BitSet(_maxSize);
-	}
-	
-	public boolean match(Options options, int option) {
-		return options.get(option) == this.get(option);
-	}
-	
-	public boolean get(int index) {
-		return _options.get(index);
-	}
-	
-	public void set(int index) {
-		_options.set(index);
-	}
-	
-	public void clear(int index) {
-		_options.clear(index);
-	}
-	
-	/*
-	 * Byte-reversing methods are an anomaly of the BouncyCastle
-	 * DERBitString endianness.  Thes methods can be removed if the
-	 * Apache Directory Snickers codecs operate differently.
-	 */
-    public byte[] getBytes() {
-        byte[] bytes = new byte[_maxSize/8];
-        for (int i=0; i<_maxSize; i++) {
-            if (_options.get(reversePosition(i))) {
-                bytes[bytes.length-i/8-1] |= 1<<(i%8);
+public abstract class Options
+{
+	private BitSet options;
+    private int maxSize;
+
+    protected Options( int maxSize )
+    {
+        this.maxSize = maxSize;
+        options = new BitSet( maxSize );
+    }
+
+    public boolean match( Options options, int option )
+    {
+        return options.get( option ) == this.get( option );
+    }
+
+    public boolean get( int index )
+    {
+        return options.get( index );
+    }
+
+    public void set( int index )
+    {
+        options.set( index );
+    }
+
+    public void clear( int index )
+    {
+        options.clear( index );
+    }
+
+    /*
+     * Byte-reversing methods are an anomaly of the BouncyCastle
+     * DERBitString endianness.  Thes methods can be removed if the
+     * Apache Directory Snickers codecs operate differently.
+     */
+    public byte[] getBytes()
+    {
+        byte[] bytes = new byte[ maxSize / 8 ];
+        
+        for ( int ii = 0; ii < maxSize; ii++ )
+        {
+            if ( options.get( reversePosition( ii ) ) )
+            {
+                bytes[ bytes.length - ii / 8 - 1 ] |= 1 << ( ii % 8 );
             }
         }
         return bytes;
     }
-	
-    protected void setBytes(byte[] bytes) {
-	    for (int i=0; i<bytes.length*8; i++) {
-	        if ((bytes[bytes.length-i/8-1]&(1<<(i%8))) > 0) {
-	            _options.set(reversePosition(i));
-	        }
-	    }
-    }
-    
-	private int reversePosition(int position) {
-		return _maxSize - 1 - position;
-	}
-}
 
+    protected void setBytes( byte[] bytes )
+    {
+        for ( int ii = 0; ii < bytes.length * 8; ii++ )
+        {
+            if ( ( bytes[ bytes.length - ii / 8 - 1 ] & ( 1 << ( ii % 8 ) ) ) > 0 )
+            {
+                options.set( reversePosition( ii ) );
+            }
+        }
+    }
+
+    private int reversePosition( int position )
+    {
+        return maxSize - 1 - position;
+    }
+}

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PreAuthenticationData.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PreAuthenticationData.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PreAuthenticationData.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PreAuthenticationData.java Mon Aug 22 03:20:30 2005
@@ -14,29 +14,26 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.messages.value;
 
-
 public class PreAuthenticationData
 {
-	private PreAuthenticationDataType dataType;
-	private byte[]                    dataValue;
-	
-	public PreAuthenticationData( PreAuthenticationDataType dataType, byte[] dataValue )
+    private PreAuthenticationDataType dataType;
+    private byte[] dataValue;
+
+    public PreAuthenticationData( PreAuthenticationDataType dataType, byte[] dataValue )
     {
-		this.dataType  = dataType;
-		this.dataValue = dataValue;
-	}
-	
-	public PreAuthenticationDataType getDataType()
+        this.dataType = dataType;
+        this.dataValue = dataValue;
+    }
+
+    public PreAuthenticationDataType getDataType()
     {
-		return dataType;
-	}
-	
-	public byte[] getDataValue()
+        return dataType;
+    }
+
+    public byte[] getDataValue()
     {
-		return dataValue;
-	}
+        return dataValue;
+    }
 }
-

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PreAuthenticationDataModifier.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PreAuthenticationDataModifier.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PreAuthenticationDataModifier.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PreAuthenticationDataModifier.java Mon Aug 22 03:20:30 2005
@@ -14,28 +14,25 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.messages.value;
 
-
 public class PreAuthenticationDataModifier
 {
-	private PreAuthenticationDataType dataType;
-	private byte[]                    dataValue;
-	
-	public PreAuthenticationData getPreAuthenticationData()
+    private PreAuthenticationDataType dataType;
+    private byte[] dataValue;
+
+    public PreAuthenticationData getPreAuthenticationData()
     {
-		return new PreAuthenticationData( dataType, dataValue );
-	}
-	
-	public void setDataType( PreAuthenticationDataType dataType )
+        return new PreAuthenticationData( dataType, dataValue );
+    }
+
+    public void setDataType( PreAuthenticationDataType dataType )
     {
-		this.dataType = dataType;
-	}
-	
-	public void setDataValue( byte[] dataValue )
+        this.dataType = dataType;
+    }
+
+    public void setDataValue( byte[] dataValue )
     {
-		this.dataValue = dataValue;
-	}
+        this.dataValue = dataValue;
+    }
 }
-

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PreAuthenticationDataType.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PreAuthenticationDataType.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PreAuthenticationDataType.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PreAuthenticationDataType.java Mon Aug 22 03:20:30 2005
@@ -14,14 +14,12 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.messages.value;
 
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
-
 public class PreAuthenticationDataType implements Comparable
 {
 	/**
@@ -46,59 +44,56 @@
 	public static final PreAuthenticationDataType PA_USE_SPECIFIED_KVNO  = new PreAuthenticationDataType( 20, "use specified key version" );
 	public static final PreAuthenticationDataType SAM_REDIRECT           = new PreAuthenticationDataType( 21, "SAM redirect." );
 	public static final PreAuthenticationDataType PA_GET_FROM_TYPED_DATA = new PreAuthenticationDataType( 22, "Get from typed data" );
-	
+
 	/** Array for building a List of VALUES. */
-	private static final PreAuthenticationDataType[] values = {
-	    NULL, PA_TGS_REQ, PA_ENC_TIMESTAMP, PA_PW_SALT, PA_ENC_UNIX_TIME, PA_SANDIA_SECUREID,
-	    PA_SESAME, PA_OSF_DCE, PA_CYBERSAFE_SECUREID, PA_ASF3_SALT, PA_ENCTYPE_INFO,
-		SAM_CHALLENGE, SAM_RESPONSE, PA_PK_AS_REQ, PA_PK_AS_REP, PA_USE_SPECIFIED_KVNO,
-		SAM_REDIRECT, PA_GET_FROM_TYPED_DATA
-	};
-	
-	/** A list of all the pre-authentication type constants. */
-	public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
-	
-	/** The name of the pre-authentication type. */
-	private final String name;
-	
-	/** The value/code for the pre-authentication type. */
-	private final int ordinal;
-	
-	/**
-	 * Private constructor prevents construction outside of this class.
-	 */
-	private PreAuthenticationDataType( int ordinal, String name )
-	{
-		this.ordinal = ordinal;
-		this.name    = name;
-	}
-	
-	public String toString()
-	{
-		return name + " (" + ordinal + ")";
-	}
-	
-	public int compareTo( Object that )
-	{
-		return ordinal - ( (PreAuthenticationDataType) that ).ordinal;
-	}
-
-	public static PreAuthenticationDataType getTypeByOrdinal( int type )
-	{
-		for ( int ii = 0; ii < values.length; ii++ )
-		{
-			if ( values[ ii ].ordinal == type )
-			{
-				return values[ ii ];
-			}
-		}
-		
-		return NULL;
-	}
-	
-	public int getOrdinal()
-	{
-		return ordinal;
-	}
+    private static final PreAuthenticationDataType[] values = { NULL, PA_TGS_REQ, PA_ENC_TIMESTAMP,
+            PA_PW_SALT, PA_ENC_UNIX_TIME, PA_SANDIA_SECUREID, PA_SESAME, PA_OSF_DCE,
+            PA_CYBERSAFE_SECUREID, PA_ASF3_SALT, PA_ENCTYPE_INFO, SAM_CHALLENGE, SAM_RESPONSE,
+            PA_PK_AS_REQ, PA_PK_AS_REP, PA_USE_SPECIFIED_KVNO, SAM_REDIRECT, PA_GET_FROM_TYPED_DATA };
+
+    /** A list of all the pre-authentication type constants. */
+    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
+
+    /** The name of the pre-authentication type. */
+    private final String name;
+
+    /** The value/code for the pre-authentication type. */
+    private final int ordinal;
+
+    /**
+     * Private constructor prevents construction outside of this class.
+     */
+    private PreAuthenticationDataType( int ordinal, String name )
+    {
+        this.ordinal = ordinal;
+        this.name = name;
+    }
+
+    public String toString()
+    {
+        return name + " (" + ordinal + ")";
+    }
+
+    public int compareTo( Object that )
+    {
+        return ordinal - ( (PreAuthenticationDataType) that ).ordinal;
+    }
+
+    public static PreAuthenticationDataType getTypeByOrdinal( int type )
+    {
+        for ( int ii = 0; ii < values.length; ii++ )
+        {
+            if ( values[ ii ].ordinal == type )
+            {
+                return values[ ii ];
+            }
+        }
+
+        return NULL;
+    }
+
+    public int getOrdinal()
+    {
+        return ordinal;
+    }
 }
-

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PrincipalName.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PrincipalName.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PrincipalName.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PrincipalName.java Mon Aug 22 03:20:30 2005
@@ -16,22 +16,24 @@
  */
 package org.apache.kerberos.messages.value;
 
-public class PrincipalName {
-	
-	private String _nameComponent;
-	private int    _nameType;
-	
-	public PrincipalName(String nameComponent, int nameType) {
-		_nameComponent = nameComponent;
-		_nameType      = nameType;
-	}
+public class PrincipalName
+{
+    private String nameComponent;
+    private int nameType;
 
-	public int getNameType() {
-		return _nameType;
-	}
+    public PrincipalName( String nameComponent, int nameType )
+    {
+        this.nameComponent = nameComponent;
+        this.nameType = nameType;
+    }
 
-	public String getNameComponent() {
-		return _nameComponent;
-	}
-}
+    public int getNameType()
+    {
+        return nameType;
+    }
 
+    public String getNameComponent()
+    {
+        return nameComponent;
+    }
+}

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PrincipalNameModifier.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PrincipalNameModifier.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PrincipalNameModifier.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PrincipalNameModifier.java Mon Aug 22 03:20:30 2005
@@ -16,34 +16,43 @@
  */
 package org.apache.kerberos.messages.value;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
 
-public class PrincipalNameModifier {
-	
-	private static final String COMPONENT_SEPARATOR = "/";
-	
-	List   _components = new ArrayList();
-	int    _nameType;
-	
-	public PrincipalName getPrincipalName() {
-		StringBuffer sb = new StringBuffer();
-		Iterator it = _components.iterator();
-		while (it.hasNext()) {
-			String component = (String)it.next();
-			sb.append(component);
-			if (it.hasNext()) {
-				sb.append(COMPONENT_SEPARATOR);
-			}
-		}
-		return new PrincipalName(sb.toString(), _nameType);
-	}
-
-	public void setType(int type) {
-		_nameType = type;
-	}
-
-	public void addName(String name) {
-		_components.add(name);
-	}
-}
+public class PrincipalNameModifier
+{
+    private static final String COMPONENT_SEPARATOR = "/";
+
+    List components = new ArrayList();
+    int nameType;
+
+    public PrincipalName getPrincipalName()
+    {
+        StringBuffer sb = new StringBuffer();
+        Iterator it = components.iterator();
+
+        while ( it.hasNext() )
+        {
+            String component = (String) it.next();
+            sb.append( component );
 
+            if ( it.hasNext() )
+            {
+                sb.append( COMPONENT_SEPARATOR );
+            }
+        }
+
+        return new PrincipalName( sb.toString(), nameType );
+    }
+
+    public void setType( int type )
+    {
+        nameType = type;
+    }
+
+    public void addName( String name )
+    {
+        components.add( name );
+    }
+}

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PrincipalNameType.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PrincipalNameType.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PrincipalNameType.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/PrincipalNameType.java Mon Aug 22 03:20:30 2005
@@ -16,10 +16,12 @@
  */
 package org.apache.kerberos.messages.value;
 
-import java.util.*;
-
-public final class PrincipalNameType implements Comparable {
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
 
+public final class PrincipalNameType implements Comparable
+{
 	/**
 	 * Enumeration elements are constructed once upon class loading.
 	 * Order of appearance here determines the order of compareTo.
@@ -38,44 +40,53 @@
 		new PrincipalNameType(5, "unique ID name type");
 	public static final PrincipalNameType KRB_NT_X500_PRINCIPAL =  
 		new PrincipalNameType(6, "nt x500 principal; encoded X.509 Distinguished name [RFC 2253]");
-	
-	public String toString() {
-		return _fName + " (" + _fOrdinal + ")";
-	}
-
-	public int compareTo(Object that) {
-		return _fOrdinal - ((PrincipalNameType) that)._fOrdinal;
-	}
-
-	public static PrincipalNameType getTypeByOrdinal(int type) {
-		for (int i = 0; i < fValues.length; i++)
-			if (fValues[i]._fOrdinal == type)
-				return fValues[i];
-		return KRB_NT_UNKNOWN;
-	}
-	
-	public int getOrdinal() {
-		return _fOrdinal;
-	}
-
-	/// PRIVATE /////
-	private final String _fName;
-	private final int    _fOrdinal;
-
-	/**
-	 * Private constructor prevents construction outside of this class.
-	 */
-	private PrincipalNameType(int ordinal, String name) {
-		_fOrdinal = ordinal;
-		_fName    = name;
-	}
 
-	/**
-	 * These two lines are all that's necessary to export a List of VALUES.
-	 */
-	private static final PrincipalNameType[] fValues = {KRB_NT_UNKNOWN, KRB_NT_PRINCIPAL, 
-			KRB_NT_SRV_INST, KRB_NT_SRV_HST, KRB_NT_SRV_XHST, KRB_NT_UID, KRB_NT_X500_PRINCIPAL};
-	// VALUES needs to be located here, otherwise illegal forward reference
-	public static final List VALUES = Collections.unmodifiableList(Arrays.asList(fValues));
+	public String toString()
+    {
+        return name + " (" + ordinal + ")";
+    }
+
+    public int compareTo( Object that )
+    {
+        return ordinal - ( (PrincipalNameType) that ).ordinal;
+    }
+
+    public static PrincipalNameType getTypeByOrdinal( int type )
+    {
+        for ( int ii = 0; ii < values.length; ii++ )
+        {
+            if ( values[ ii ].ordinal == type )
+            {
+                return values[ ii ];
+            }
+        }
+        
+        return KRB_NT_UNKNOWN;
+    }
+
+    public int getOrdinal()
+    {
+        return ordinal;
+    }
+
+    /// PRIVATE /////
+    private final String name;
+    private final int ordinal;
+
+    /**
+     * Private constructor prevents construction outside of this class.
+     */
+    private PrincipalNameType( int ordinal, String name )
+    {
+        this.ordinal = ordinal;
+        this.name = name;
+    }
+
+    /**
+     * These two lines are all that's necessary to export a List of VALUES.
+     */
+    private static final PrincipalNameType[] values = { KRB_NT_UNKNOWN, KRB_NT_PRINCIPAL,
+            KRB_NT_SRV_INST, KRB_NT_SRV_HST, KRB_NT_SRV_XHST, KRB_NT_UID, KRB_NT_X500_PRINCIPAL };
+    // VALUES needs to be located here, otherwise illegal forward reference
+    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
 }
-

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/RequestBody.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/RequestBody.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/RequestBody.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/RequestBody.java Mon Aug 22 03:20:30 2005
@@ -16,75 +16,95 @@
  */
 package org.apache.kerberos.messages.value;
 
-import org.apache.kerberos.crypto.encryption.*;
-import org.apache.kerberos.messages.components.*;
+import javax.security.auth.kerberos.KerberosPrincipal;
 
-import javax.security.auth.kerberos.*;
+import org.apache.kerberos.crypto.encryption.EncryptionType;
+import org.apache.kerberos.messages.components.Ticket;
 
-public class RequestBody {
-
-	private KdcOptions        _kdcOptions;
-	private KerberosPrincipal _clientPrincipal;      //optional in TgsReq only
-	private KerberosPrincipal _serverPrincipal;
-	private KerberosTime      _from;                 //optional
-	private KerberosTime      _till;
-	private KerberosTime      _rtime;                //optional
-	private int               _nonce;
-	private EncryptionType[]  _eType;
-	private HostAddresses     _addresses;            //optional
-	private EncryptedData     _encAuthorizationData; //optional
-	private Ticket[]          _additionalTickets;    //optional
-
-	public RequestBody(KdcOptions kdcOptions, KerberosPrincipal clientPrincipal,
-			KerberosPrincipal serverPrincipal, KerberosTime from, KerberosTime till, KerberosTime rtime,
-			int nonce, EncryptionType[] eType, HostAddresses addresses, EncryptedData encAuthorizationData,
-			Ticket[] additionalTickets) {
-		
-		_kdcOptions           = kdcOptions;
-		_clientPrincipal      = clientPrincipal;
-		_serverPrincipal      = serverPrincipal;
-		_from                 = from;
-		_till                 = till;
-		_rtime                = rtime;
-		_nonce                = nonce;
-		_eType                = eType;
-		_addresses            = addresses;
-		_encAuthorizationData = encAuthorizationData;
-		_additionalTickets    = additionalTickets;
-	}
-
-	public Ticket[] getAdditionalTickets() {
-		return _additionalTickets;
-	}
-	public HostAddresses getAddresses() {
-		return _addresses;
-	}
-	public KerberosPrincipal getClientPrincipal() {
-		return _clientPrincipal;
-	}
-	public KerberosPrincipal getServerPrincipal() {
-		return _serverPrincipal;
-	}
-	public EncryptedData getEncAuthorizationData() {
-		return _encAuthorizationData;
-	}
-	public EncryptionType[] getEType() {
-		return _eType;
-	}
-	public KerberosTime getFrom() {
-		return _from;
-	}
-	public KdcOptions getKdcOptions() {
-		return _kdcOptions;
-	}
-	public int getNonce() {
-		return _nonce;
-	}
-	public KerberosTime getRtime() {
-		return _rtime;
-	}
-	public KerberosTime getTill() {
-		return _till;
-	}
+public class RequestBody
+{
+	private KdcOptions        kdcOptions;
+	private KerberosPrincipal clientPrincipal;      //optional in TgsReq only
+	private KerberosPrincipal serverPrincipal;
+	private KerberosTime      from;                 //optional
+	private KerberosTime      till;
+	private KerberosTime      rtime;                //optional
+	private int               nonce;
+	private EncryptionType[]  eType;
+	private HostAddresses     addresses;            //optional
+	private EncryptedData     encAuthorizationData; //optional
+	private Ticket[]          additionalTickets;    //optional
+
+	public RequestBody( KdcOptions kdcOptions, KerberosPrincipal clientPrincipal,
+            KerberosPrincipal serverPrincipal, KerberosTime from, KerberosTime till,
+            KerberosTime rtime, int nonce, EncryptionType[] eType, HostAddresses addresses,
+            EncryptedData encAuthorizationData, Ticket[] additionalTickets )
+    {
+        this.kdcOptions           = kdcOptions;
+        this.clientPrincipal      = clientPrincipal;
+        this.serverPrincipal      = serverPrincipal;
+        this.from                 = from;
+        this.till                 = till;
+        this.rtime                = rtime;
+        this.nonce                = nonce;
+        this.eType                = eType;
+        this.addresses            = addresses;
+        this.encAuthorizationData = encAuthorizationData;
+        this.additionalTickets    = additionalTickets;
+    }
+
+    public Ticket[] getAdditionalTickets()
+    {
+        return additionalTickets;
+    }
+
+    public HostAddresses getAddresses()
+    {
+        return addresses;
+    }
+
+    public KerberosPrincipal getClientPrincipal()
+    {
+        return clientPrincipal;
+    }
+
+    public KerberosPrincipal getServerPrincipal()
+    {
+        return serverPrincipal;
+    }
+
+    public EncryptedData getEncAuthorizationData()
+    {
+        return encAuthorizationData;
+    }
+
+    public EncryptionType[] getEType()
+    {
+        return eType;
+    }
+
+    public KerberosTime getFrom()
+    {
+        return from;
+    }
+
+    public KdcOptions getKdcOptions()
+    {
+        return kdcOptions;
+    }
+
+    public int getNonce()
+    {
+        return nonce;
+    }
+
+    public KerberosTime getRtime()
+    {
+        return rtime;
+    }
+
+    public KerberosTime getTill()
+    {
+        return till;
+    }
 }
-

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/RequestBodyModifier.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/RequestBodyModifier.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/RequestBodyModifier.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/RequestBodyModifier.java Mon Aug 22 03:20:30 2005
@@ -16,69 +16,92 @@
  */
 package org.apache.kerberos.messages.value;
 
-import org.apache.kerberos.crypto.encryption.*;
-import org.apache.kerberos.messages.components.*;
+import javax.security.auth.kerberos.KerberosPrincipal;
 
-import javax.security.auth.kerberos.*;
+import org.apache.kerberos.crypto.encryption.EncryptionType;
+import org.apache.kerberos.messages.components.Ticket;
 
-public class RequestBodyModifier {
-	
-	private KerberosPrincipalModifier _clientModifier = new KerberosPrincipalModifier(); //optional in TgsReq only
-	private KerberosPrincipalModifier _serverModifier = new KerberosPrincipalModifier();
-	private KdcOptions       _kdcOptions;
-	private KerberosTime     _from;                 //optional
-	private KerberosTime     _till;
-	private KerberosTime     _rtime;                //optional
-	private int              _nonce;
-	private EncryptionType[] _eType;
-	private HostAddresses    _addresses;            //optional
-	private EncryptedData    _encAuthorizationData; //optional
-	private Ticket[]         _additionalTickets;    //optional
-	
-	public RequestBody getRequestBody() {
-		KerberosPrincipal clientPrincipal = _clientModifier.getKerberosPrincipal();
-		KerberosPrincipal serverPrincipal = _serverModifier.getKerberosPrincipal();
-		
-		return new RequestBody(_kdcOptions, clientPrincipal, serverPrincipal, _from, _till, _rtime,
-			_nonce, _eType, _addresses, _encAuthorizationData, _additionalTickets);
-	}
-	
-	public void setClientName(PrincipalName clientName) {
-		_clientModifier.setPrincipalName(clientName);
-	}
-	public void setServerName(PrincipalName serverName) {
-		_serverModifier.setPrincipalName(serverName);
-	}
-	public void setRealm(String realm) {
-		_clientModifier.setRealm(realm);
-		_serverModifier.setRealm(realm);
-	}
-	public void setAdditionalTickets(Ticket[] tickets) {
-		_additionalTickets = tickets;
-	}
-	public void setAddresses(HostAddresses addresses) {
-		_addresses = addresses;
-	}
-	public void setEncAuthorizationData(EncryptedData authorizationData) {
-		_encAuthorizationData = authorizationData;
-	}
-	public void setEType(EncryptionType[] type) {
-		_eType = type;
-	}
-	public void setFrom(KerberosTime from) {
-		_from = from;
-	}
-	public void setKdcOptions(KdcOptions options) {
-		_kdcOptions = options;
-	}
-	public void setNonce(int nonce) {
-		_nonce = nonce;
-	}
-	public void setRtime(KerberosTime rtime) {
-		_rtime = rtime;
-	}
-	public void setTill(KerberosTime till) {
-		_till = till;
-	}
-}
+public class RequestBodyModifier
+{
+	private KerberosPrincipalModifier clientModifier = new KerberosPrincipalModifier(); //optional in TgsReq only
+	private KerberosPrincipalModifier serverModifier = new KerberosPrincipalModifier();
+	private KdcOptions       kdcOptions;
+	private KerberosTime     from;                 //optional
+	private KerberosTime     till;
+	private KerberosTime     rtime;                //optional
+	private int              nonce;
+	private EncryptionType[] eType;
+	private HostAddresses    addresses;            //optional
+	private EncryptedData    encAuthorizationData; //optional
+	private Ticket[]         additionalTickets;    //optional
+
+	public RequestBody getRequestBody()
+    {
+        KerberosPrincipal clientPrincipal = clientModifier.getKerberosPrincipal();
+        KerberosPrincipal serverPrincipal = serverModifier.getKerberosPrincipal();
+
+        return new RequestBody( kdcOptions, clientPrincipal, serverPrincipal, from, till,
+                rtime, nonce, eType, addresses, encAuthorizationData, additionalTickets );
+    }
+
+    public void setClientName( PrincipalName clientName )
+    {
+        clientModifier.setPrincipalName( clientName );
+    }
+
+    public void setServerName( PrincipalName serverName )
+    {
+        serverModifier.setPrincipalName( serverName );
+    }
+
+    public void setRealm( String realm )
+    {
+        clientModifier.setRealm( realm );
+        serverModifier.setRealm( realm );
+    }
+
+    public void setAdditionalTickets( Ticket[] tickets )
+    {
+        additionalTickets = tickets;
+    }
+
+    public void setAddresses( HostAddresses addresses )
+    {
+        this.addresses = addresses;
+    }
 
+    public void setEncAuthorizationData( EncryptedData authorizationData )
+    {
+        encAuthorizationData = authorizationData;
+    }
+
+    public void setEType( EncryptionType[] type )
+    {
+        eType = type;
+    }
+
+    public void setFrom( KerberosTime from )
+    {
+        this.from = from;
+    }
+
+    public void setKdcOptions( KdcOptions options )
+    {
+        kdcOptions = options;
+    }
+
+    public void setNonce( int nonce )
+    {
+        this.nonce = nonce;
+    }
+
+    public void setRtime( KerberosTime rtime )
+    {
+        this.rtime = rtime;
+    }
+
+    public void setTill( KerberosTime till )
+    {
+        this.till = till;
+    }
+}

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/SamType.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/SamType.java?rev=234465&r1=234464&r2=234465&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/SamType.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/value/SamType.java Mon Aug 22 03:20:30 2005
@@ -16,11 +16,9 @@
  */
 package org.apache.kerberos.messages.value;
 
-
-import java.util.List;
 import java.util.Arrays;
 import java.util.Collections;
-
+import java.util.List;
 
 /**
  * Type safe enumeration of Single-use Authentication Mechanism types
@@ -72,7 +70,6 @@
     /** the value/code for the sam type */
     private final int ordinal;
 
-
     /**
      * Private constructor prevents construction outside of this class.
      */
@@ -82,7 +79,6 @@
         this.name    = name;
     }
 
-
     /**
      * Returns the name of the SamType.
      *
@@ -93,7 +89,6 @@
 		return name;
 	}
 
-
     /**
      * Compares this type to another object hopefully one that is of the same
      * type.
@@ -106,7 +101,6 @@
 		return ordinal - ( ( SamType ) that ).ordinal;
 	}
 
-
     /**
      * Gets the ordinal by its ordinal value.
      *
@@ -126,7 +120,6 @@
 		return PA_SAM_TYPE_APACHE;
 	}
 
-
     /**
      * Gets the ordinal value associated with this SAM type.
      *
@@ -137,4 +130,3 @@
 		return ordinal;
 	}
 }
-