directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1036708 - /directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/Ticket.java
Date Fri, 19 Nov 2010 02:00:33 GMT
Author: elecharny
Date: Fri Nov 19 02:00:33 2010
New Revision: 1036708

URL: http://svn.apache.org/viewvc?rev=1036708&view=rev
Log:
Using constants instead of magic numbers

Modified:
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/Ticket.java

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/Ticket.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/Ticket.java?rev=1036708&r1=1036707&r2=1036708&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/Ticket.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/Ticket.java
Fri Nov 19 02:00:33 2010
@@ -503,7 +503,7 @@ public class Ticket extends KerberosMess
         try
         {
             // The Ticket APPLICATION Tag
-            buffer.put( (byte)0x61 );
+            buffer.put( (byte)KerberosConstants.TICKET_TAG );
             buffer.put( TLV.getBytes( ticketLength ) );
 
             // The Ticket SEQUENCE Tag
@@ -511,24 +511,24 @@ public class Ticket extends KerberosMess
             buffer.put( TLV.getBytes( ticketSeqLength ) );
 
             // The tkt-vno Tag and value
-            buffer.put( ( byte ) 0xA0 );
+            buffer.put( ( byte )KerberosConstants.TICKET_TKT_VNO_TAG );
             buffer.put( TLV.getBytes( tktvnoLength ) );
             Value.encode( buffer, tktvno );
 
             // The realm Tag and value
-            buffer.put( ( byte ) 0xA1 );
+            buffer.put( ( byte )KerberosConstants.TICKET_REALM_TAG );
             buffer.put( TLV.getBytes( realmLength ) );
             buffer.put( UniversalTag.GENERAL_STRING.getValue() );
             buffer.put( TLV.getBytes( realmBytes.length ) );
             buffer.put( realmBytes );
 
             // The sname Tag and value
-            buffer.put( ( byte ) 0xA2 );
+            buffer.put( ( byte )KerberosConstants.TICKET_SNAME_TAG );
             buffer.put( TLV.getBytes( sNameLength ) );
             sName.encode( buffer );
             
             // The encPartLength Tag and value
-            buffer.put( ( byte ) 0xA3 );
+            buffer.put( ( byte )KerberosConstants.TICKET_ENC_PART_TAG );
             buffer.put( TLV.getBytes( encPartLength ) );
             encPart.encode( buffer );
         }



Mime
View raw message