directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r191632 - /directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapMessageGrammar.java
Date Tue, 21 Jun 2005 06:45:42 GMT
Author: elecharny
Date: Mon Jun 20 23:45:41 2005
New Revision: 191632

URL: http://svn.apache.org/viewcvs?rev=191632&view=rev
Log:
Deleted the useless LENGTH transitions

Modified:
    directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapMessageGrammar.java

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapMessageGrammar.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapMessageGrammar.java?rev=191632&r1=191631&r2=191632&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapMessageGrammar.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapMessageGrammar.java
Mon Jun 20 23:45:41 2005
@@ -72,7 +72,7 @@
         // LDAPMessage --> SEQUENCE { ... (Tag)
         // We have a LDAPMessage, and the tag must be 0x30
         super.transitions[LdapStatesEnum.LDAP_MESSAGE_TAG][0x30] = new GrammarTransition(
-                LdapStatesEnum.LDAP_MESSAGE_TAG, LdapStatesEnum.LDAP_MESSAGE_LENGTH,
+                LdapStatesEnum.LDAP_MESSAGE_TAG, LdapStatesEnum.LDAP_MESSAGE_VALUE,
                 new GrammarAction( "LdapMessage Tag" )
                 {
                     public void action( IAsn1Container container ) throws DecoderException
@@ -91,30 +91,7 @@
                     }
                 } );
 
-        // LDAPMessage --> SEQUENCE { ... (Length)
-        // Ok, get the LdapMessage length
-        super.transitions[LdapStatesEnum.LDAP_MESSAGE_LENGTH][0x30] = new GrammarTransition(
-                LdapStatesEnum.LDAP_MESSAGE_LENGTH, LdapStatesEnum.LDAP_MESSAGE_VALUE,
-                new GrammarAction( "LdapMessage Length" )
-                {
-                    public void action( IAsn1Container container ) throws DecoderException
-                    {
-
-                        // We have to store the expected Length of the PDU
-                        LdapMessageContainer ldapMessageContainer = ( LdapMessageContainer
)
-                            container;
-                        LdapMessage      ldapMessage          =
-                            ldapMessageContainer.getLdapMessage();
-
-                        ldapMessage.setExpectedLength( ldapMessageContainer.getCurrentTLV()
-                            .getLength().getLength() );
-                        ldapMessage.setCurrentLength( 0 );
-
-                        return;
-                    }
-                } );
-
-        // LDAPMessage --> SEQUENCE { ... (Value)
+         // LDAPMessage --> SEQUENCE { ... (Value)
         // Nothing to do, it's a constructed TLV. It's just a phantom transition ...
         super.transitions[LdapStatesEnum.LDAP_MESSAGE_VALUE][0x30] = new GrammarTransition(
                 LdapStatesEnum.LDAP_MESSAGE_VALUE, LdapStatesEnum.LDAP_MESSAGE_ID_TAG, null
);
@@ -125,25 +102,7 @@
         // LDAPMessage --> ... MessageId ...(Tag)
         // The tag must be 0x02. Nothing special to do.
         super.transitions[LdapStatesEnum.LDAP_MESSAGE_ID_TAG][0x02] = new GrammarTransition(
-                LdapStatesEnum.LDAP_MESSAGE_ID_TAG, LdapStatesEnum.LDAP_MESSAGE_ID_LENGTH,
null );
-
-        // LDAPMessage --> ... MessageId ...(Length)
-        // Checks the length
-        super.transitions[LdapStatesEnum.LDAP_MESSAGE_ID_LENGTH][0x02] = new GrammarTransition(
-                LdapStatesEnum.LDAP_MESSAGE_ID_LENGTH, LdapStatesEnum.LDAP_MESSAGE_ID_VALUE,
-                new GrammarAction( "Check MessageId Length " )
-                {
-                    public void action( IAsn1Container container ) throws DecoderException
-                    {
-
-                        LdapMessageContainer ldapMessageContainer = ( ( LdapMessageContainer
)
-                                container );
-                        checkLength( ldapMessageContainer.getLdapMessage(),
-                            ldapMessageContainer.getCurrentTLV() );
-
-                        return;
-                    }
-                } );
+                LdapStatesEnum.LDAP_MESSAGE_ID_TAG, LdapStatesEnum.LDAP_MESSAGE_ID_VALUE,
null );
 
         // LDAPMessage --> ... MessageId ...(Value)
         // Checks that MessageId is in [0 .. 2147483647] and store the value in the LdapMessage
Object



Mime
View raw message