directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r568800 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixDecoder.java
Date Thu, 23 Aug 2007 01:44:07 GMT
Author: elecharny
Date: Wed Aug 22 18:44:06 2007
New Revision: 568800

URL: http://svn.apache.org/viewvc?rev=568800&view=rev
Log:
In case we get a DecoderException, clean the buffer, the container, and throw the exception
back to the caller.

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixDecoder.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixDecoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixDecoder.java?rev=568800&r1=568799&r2=568800&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixDecoder.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixDecoder.java
Wed Aug 22 18:44:06 2007
@@ -31,6 +31,7 @@
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.codec.stateful.DecoderCallback;
 import org.apache.directory.shared.asn1.codec.stateful.DecoderMonitor;
+import org.apache.directory.shared.ldap.message.ResponseCarryingMessageException;
 import org.apache.directory.shared.ldap.message.spi.Provider;
 import org.apache.directory.shared.ldap.message.spi.ProviderDecoder;
 import org.apache.directory.shared.ldap.message.spi.ProviderException;
@@ -171,7 +172,13 @@
             }
             catch ( NamingException lne )
             {
-                
+				// TODO : remove this useless catch                
+            }
+            catch ( DecoderException de )
+            {
+            	buf.clear();
+            	ldapMessageContainer.clean();
+            	throw de;
             }
         }
     }



Mime
View raw message