directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1039788 - in /directory/apacheds/trunk: i18n/src/main/java/org/apache/directory/server/i18n/ i18n/src/main/resources/org/apache/directory/server/i18n/ kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/ticket/ kerberos...
Date Sat, 27 Nov 2010 23:42:38 GMT
Author: elecharny
Date: Sat Nov 27 23:42:37 2010
New Revision: 1039788

URL: http://svn.apache.org/viewvc?rev=1039788&view=rev
Log:
Cleanup the Ticket class, updated the logs

Modified:
    directory/apacheds/trunk/i18n/src/main/java/org/apache/directory/server/i18n/I18n.java
    directory/apacheds/trunk/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/ticket/TicketGrammar.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/ticket/TicketStatesEnum.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/ticket/actions/TicketInit.java

Modified: directory/apacheds/trunk/i18n/src/main/java/org/apache/directory/server/i18n/I18n.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/i18n/src/main/java/org/apache/directory/server/i18n/I18n.java?rev=1039788&r1=1039787&r2=1039788&view=diff
==============================================================================
--- directory/apacheds/trunk/i18n/src/main/java/org/apache/directory/server/i18n/I18n.java
(original)
+++ directory/apacheds/trunk/i18n/src/main/java/org/apache/directory/server/i18n/I18n.java
Sat Nov 27 23:42:37 2010
@@ -776,7 +776,8 @@ public enum I18n
     ERR_740_CANNOT_ENCODE_ENC_KRB_CRED_PART("ERR_740_CANNOT_ENCODE_ENC_KRB_CRED_PART"),
     ERR_741_CANNOT_ENCODE_KRB_CRED("ERR_741_CANNOT_ENCODE_KRB_CRED"),
     ERR_742_CANNOT_ENCODE_ENC_TICKET_PART("ERR_742_CANNOT_ENCODE_ENC_TICKET_PART"),
-    ERR_743_CANNOT_ENCODE_TYPED_DATA("ERR_743_CANNOT_ENCODE_TYPED_DATA");
+    ERR_743_CANNOT_ENCODE_TYPED_DATA("ERR_743_CANNOT_ENCODE_TYPED_DATA"),
+    ERR_744_NULL_PDU_LENGTH("ERR_744_NULL_PDU_LENGTH");
     
     private static ResourceBundle errBundle = ResourceBundle
                 .getBundle( "org.apache.directory.server.i18n.errors" );

Modified: directory/apacheds/trunk/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties?rev=1039788&r1=1039787&r2=1039788&view=diff
==============================================================================
--- directory/apacheds/trunk/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties
(original)
+++ directory/apacheds/trunk/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties
Sat Nov 27 23:42:37 2010
@@ -764,4 +764,5 @@ ERR_739_CANNOT_ENCODE_KRB_CRED_INFO=Cann
 ERR_740_CANNOT_ENCODE_ENC_KRB_CRED_PART=Cannot encode the EncKrbCredPart object, the PDU
size is {0} when only {1} bytes has been allocated
 ERR_741_CANNOT_ENCODE_KRB_CRED=Cannot encode the KrbCred object, the PDU size is {0} when
only {1} bytes has been allocated
 ERR_742_CANNOT_ENCODE_ENC_TICKET_PART=Cannot encode the EncTicketPart object, the PDU size
is {0} when only {1} bytes has been allocated
-ERR_743_CANNOT_ENCODE_TYPED_DATA=Cannot encode the TypedData object, the PDU size is {0}
when only {1} bytes has been allocated
\ No newline at end of file
+ERR_743_CANNOT_ENCODE_TYPED_DATA=Cannot encode the TypedData object, the PDU size is {0}
when only {1} bytes has been allocated
+ERR_744_NULL_PDU_LENGTH=The PDU length is null, this is not allowed
\ No newline at end of file

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/ticket/TicketGrammar.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/ticket/TicketGrammar.java?rev=1039788&r1=1039787&r2=1039788&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/ticket/TicketGrammar.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/ticket/TicketGrammar.java
Sat Nov 27 23:42:37 2010
@@ -31,8 +31,6 @@ import org.apache.directory.shared.kerbe
 import org.apache.directory.shared.kerberos.codec.ticket.actions.StoreSName;
 import org.apache.directory.shared.kerberos.codec.ticket.actions.StoreTktVno;
 import org.apache.directory.shared.kerberos.codec.ticket.actions.TicketInit;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 
 /**
@@ -44,12 +42,6 @@ import org.slf4j.LoggerFactory;
  */
 public final class TicketGrammar extends AbstractGrammar
 {
-    /** The logger */
-    static final Logger LOG = LoggerFactory.getLogger( TicketGrammar.class );
-
-    /** A speedup for logger */
-    static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** The instance of grammar. TicketGrammar is a singleton */
     private static Grammar instance = new TicketGrammar();
 

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/ticket/TicketStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/ticket/TicketStatesEnum.java?rev=1039788&r1=1039787&r2=1039788&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/ticket/TicketStatesEnum.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/ticket/TicketStatesEnum.java
Sat Nov 27 23:42:37 2010
@@ -34,24 +34,24 @@ import org.apache.directory.shared.kerbe
 public enum TicketStatesEnum implements States
 {
     // Start
-    START_STATE,
+    START_STATE,                // 0
     
     // ----- Ticket message --------------------------------------------
-    TICKET_STATE,
-    TICKET_SEQ_STATE,
+    TICKET_STATE,               // 1
+    TICKET_SEQ_STATE,           // 2
     
-    TICKET_VNO_TAG_STATE,
-    TICKET_VNO_STATE,
+    TICKET_VNO_TAG_STATE,       // 3
+    TICKET_VNO_STATE,           // 4
     
-    TICKET_REALM_TAG_STATE,
-    TICKET_REALM_STATE,
+    TICKET_REALM_TAG_STATE,     // 5
+    TICKET_REALM_STATE,         // 6
     
-    TICKET_SNAME_TAG_STATE,
+    TICKET_SNAME_TAG_STATE,     // 7
 
-    TICKET_ENC_PART_TAG_STATE,
+    TICKET_ENC_PART_TAG_STATE,  // 8
     
     // End
-    LAST_TICKET_STATE;
+    LAST_TICKET_STATE;          // 9
 
     
     /**

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/ticket/actions/TicketInit.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/ticket/actions/TicketInit.java?rev=1039788&r1=1039787&r2=1039788&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/ticket/actions/TicketInit.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/ticket/actions/TicketInit.java
Sat Nov 27 23:42:37 2010
@@ -20,11 +20,11 @@
 package org.apache.directory.shared.kerberos.codec.ticket.actions;
 
 
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.DecoderException;
-import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.kerberos.codec.KerberosMessageGrammar;
 import org.apache.directory.shared.kerberos.codec.ticket.TicketContainer;
 import org.apache.directory.shared.kerberos.messages.Ticket;
@@ -63,10 +63,10 @@ public class TicketInit extends GrammarA
         // The Length should not be null
         if ( tlv.getLength() == 0 )
         {
-            LOG.error( I18n.err( I18n.ERR_04066 ) );
+            LOG.error( I18n.err( I18n.ERR_744_NULL_PDU_LENGTH ) );
 
             // This will generate a PROTOCOL_ERROR
-            throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
+            throw new DecoderException( I18n.err( I18n.ERR_744_NULL_PDU_LENGTH ) );
         }
         
         // Create the Ticket now



Mime
View raw message