directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 37307 - incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap/encoder
Date Wed, 01 Sep 2004 05:19:31 GMT
Author: akarasulu
Date: Tue Aug 31 22:19:30 2004
New Revision: 37307

Modified:
   incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap/encoder/SnickersLdapEncoder.java
Log:
Forgot to add the indeterminate form altering visitation.  Using the 
DeterminateLengthVisitor to now visit the generated indeterminate length
tree and convert all the nodes to determinate length.


Modified: incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap/encoder/SnickersLdapEncoder.java
==============================================================================
--- incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap/encoder/SnickersLdapEncoder.java
(original)
+++ incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap/encoder/SnickersLdapEncoder.java
Tue Aug 31 22:19:30 2004
@@ -24,6 +24,7 @@
 import org.apache.ldap.common.message.*;
 import org.apache.snickers.ber.TupleNode;
 import org.apache.snickers.ber.TupleEncodingVisitor;
+import org.apache.snickers.ber.DeterminateLengthVisitor;
 import org.apache.snickers.ldap.encoder.bind.BindRequestEncoder;
 import org.apache.snickers.ldap.encoder.bind.BindResponseEncoder;
 import org.apache.snickers.ldap.encoder.search.SearchRequestEncoder;
@@ -58,6 +59,7 @@
 {
     EncoderMonitor monitor;
     TupleEncodingVisitor encoder = new TupleEncodingVisitor();
+    DeterminateLengthVisitor lengthVisitor = new DeterminateLengthVisitor();
 
 
     public void encode( Object obj ) throws EncoderException
@@ -176,6 +178,10 @@
                 throw e;
         }
 
+        // use determinate length vistor to set all tlvs to use set lengths
+        root.accept( lengthVisitor );
+
+        // now encode using the another visitor
         root.accept( encoder );
     }
 

Mime
View raw message