directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r992803 [1/5] - in /directory: apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/ apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/ clients/ldap/trunk/ldap-client-api/sr...
Date Sun, 05 Sep 2010 15:19:36 GMT
Author: elecharny
Date: Sun Sep  5 15:19:33 2010
New Revision: 992803

URL: http://svn.apache.org/viewvc?rev=992803&view=rev
Log:
o Formatted the code
o Renamed an interface

Added:
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Container.java
      - copied, changed from r992800, directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/IAsn1Container.java
Removed:
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/IAsn1Container.java
Modified:
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/StoredProcedureExtendedOperationHandler.java
    directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/ImportCommand.java
    directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
    directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/protocol/LdapProtocolDecoder.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/AbstractAsn1Object.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/AbstractContainer.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/AbstractGrammar.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/Action.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/Grammar.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/GrammarAction.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/GrammarTransition.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/States.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/TLV.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/TLVBerDecoderMBean.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/TLVStateEnum.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/UniversalTag.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/Value.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/BitString.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/OID.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/AttributeDescAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ControlValueAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ControlsInitAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ErrorMessageAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitAndFilterAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitApproxMatchFilterAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitAssertionValueFilterAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitAttributeDescFilterAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitAttributeDescListAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitEqualityMatchFilterAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitExtensibleMatchFilterAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitGreaterOrEqualFilterAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitLessOrEqualFilterAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitNotFilterAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitOrFilterAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitPresentFilterAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitReferralsAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitSubstringsFilterAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ModifyAttributeValueAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ReferralAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResponseAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResponseNameAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResultCodeAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/SearchResultAttributeValueAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ServerSASLCredsAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreAnyAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreFinalAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreMatchValueAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreReferenceAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreTypeMatchingRuleAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ValueAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControlGrammar.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueControlGrammar.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControlGrammar.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueControlGrammar.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlGrammar.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnControlGrammar.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/cancel/CancelGrammar.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationGrammar.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/gracefulDisconnect/GracefulDisconnectGrammar.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/gracefulShutdown/GracefulShutdownGrammar.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/storedProcedure/StoredProcedureGrammar.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControlGrammar.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/PagedResultsControlGrammar.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchControlGrammar.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/SubentriesControlGrammar.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchRequestImpl.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapControlTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapDecoderTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapResultTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddRequestTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddResponseTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestPerfTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindResponseTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareResponseTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelRequestTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelResponseTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedResponseTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/operations/CancelRequestTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/intermediate/IntermediateResponseTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponseTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestSubstringTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/StoredProcedureExtendedOperationHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/StoredProcedureExtendedOperationHandler.java?rev=992803&r1=992802&r2=992803&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/StoredProcedureExtendedOperationHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/StoredProcedureExtendedOperationHandler.java Sun Sep  5 15:19:33 2010
@@ -38,7 +38,7 @@ import org.apache.directory.server.ldap.
 import org.apache.directory.server.ldap.LdapServer;
 import org.apache.directory.server.ldap.LdapSession;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
-import org.apache.directory.shared.asn1.ber.IAsn1Container;
+import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.ldap.codec.extended.operations.storedProcedure.StoredProcedure;
 import org.apache.directory.shared.ldap.codec.extended.operations.storedProcedure.StoredProcedureContainer;
 import org.apache.directory.shared.ldap.codec.extended.operations.storedProcedure.StoredProcedureDecoder;
@@ -114,7 +114,7 @@ public class StoredProcedureExtendedOper
     {
         Asn1Decoder storedProcedureDecoder = new StoredProcedureDecoder();
         ByteBuffer stream = ByteBuffer.wrap( payload );
-        IAsn1Container storedProcedureContainer = new StoredProcedureContainer();
+        Asn1Container storedProcedureContainer = new StoredProcedureContainer();
 
         try
         {

Modified: directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/ImportCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/ImportCommand.java?rev=992803&r1=992802&r2=992803&view=diff
==============================================================================
--- directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/ImportCommand.java (original)
+++ directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/ImportCommand.java Sun Sep  5 15:19:33 2010
@@ -34,7 +34,7 @@ import org.apache.commons.cli.Options;
 import org.apache.directory.daemon.AvailablePortFinder;
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
-import org.apache.directory.shared.asn1.ber.IAsn1Container;
+import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.codec.EncoderException;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
@@ -80,7 +80,7 @@ public class ImportCommand extends ToolC
 
     private SocketAddress serverAddress;
 
-    private IAsn1Container ldapMessageContainer = new LdapMessageContainer();
+    private Asn1Container ldapMessageContainer = new LdapMessageContainer();
 
     private Asn1Decoder ldapDecoder = new Asn1Decoder();
 

Modified: directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java?rev=992803&r1=992802&r2=992803&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java (original)
+++ directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java Sun Sep  5 15:19:33 2010
@@ -50,7 +50,7 @@ import org.apache.directory.ldap.client.
 import org.apache.directory.ldap.client.api.future.SearchFuture;
 import org.apache.directory.ldap.client.api.listener.DeleteListener;
 import org.apache.directory.ldap.client.api.protocol.LdapProtocolCodecFactory;
-import org.apache.directory.shared.asn1.ber.IAsn1Container;
+import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.primitives.OID;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
@@ -487,7 +487,7 @@ public class LdapNetworkConnection exten
         connected.set( true );
 
         // And inject the current Ldap container into the session
-        IAsn1Container ldapMessageContainer = new LdapMessageContainer();
+        Asn1Container ldapMessageContainer = new LdapMessageContainer();
 
         // Store the container into the session
         ldapSession.setAttribute( "LDAP-Container", ldapMessageContainer );

Modified: directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/protocol/LdapProtocolDecoder.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/protocol/LdapProtocolDecoder.java?rev=992803&r1=992802&r2=992803&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/protocol/LdapProtocolDecoder.java (original)
+++ directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/protocol/LdapProtocolDecoder.java Sun Sep  5 15:19:33 2010
@@ -23,7 +23,7 @@ package org.apache.directory.ldap.client
 import java.nio.ByteBuffer;
 
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
-import org.apache.directory.shared.asn1.ber.IAsn1Container;
+import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.ber.tlv.TLVStateEnum;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
@@ -64,7 +64,7 @@ public class LdapProtocolDecoder impleme
     {
         // Allocate a LdapMessage Container
         Asn1Decoder ldapDecoder = new Asn1Decoder();
-        IAsn1Container ldapMessageContainer = ( LdapMessageContainer ) session.getAttribute( "LDAP-Container" );
+        Asn1Container ldapMessageContainer = ( LdapMessageContainer ) session.getAttribute( "LDAP-Container" );
         ByteBuffer buf = buffer.buf();
         int currentPos = 0;
 

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/AbstractAsn1Object.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/AbstractAsn1Object.java?rev=992803&r1=992802&r2=992803&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/AbstractAsn1Object.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/AbstractAsn1Object.java Sun Sep  5 15:19:33 2010
@@ -42,10 +42,11 @@ public abstract class AbstractAsn1Object
 
     /** The encapsulating Object */
     private AbstractAsn1Object parent;
-    
+
     /** The identifier of the associated TLV */
     private int tlvId;
 
+
     /**
      * Constructor associated with a TLV identifier. Used when 
      * decoded a TLV, we create an association between the decode
@@ -58,7 +59,7 @@ public abstract class AbstractAsn1Object
         this.tlvId = tlvId;
     }
 
-    
+
     /**
      * Default constructor. The TLV Id is set to -1. This constructor
      * is called when an Asn1Object is created to be encoded, not decoded.
@@ -67,7 +68,8 @@ public abstract class AbstractAsn1Object
     {
         this.tlvId = -1;
     }
-    
+
+
     /**
      * Get the current object length, which is the sum of all inner length
      * already decoded.
@@ -172,6 +174,7 @@ public abstract class AbstractAsn1Object
         this.parent = parent;
     }
 
+
     /**
      * @return The TLV identifier associated with this object
      */

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/AbstractContainer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/AbstractContainer.java?rev=992803&r1=992802&r2=992803&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/AbstractContainer.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/AbstractContainer.java Sun Sep  5 15:19:33 2010
@@ -33,7 +33,7 @@ import org.apache.directory.shared.asn1.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public abstract class AbstractContainer implements IAsn1Container
+public abstract class AbstractContainer implements Asn1Container
 {
     /** All the possible grammars */
     protected Grammar grammar;
@@ -67,8 +67,8 @@ public abstract class AbstractContainer 
 
     /** The incremental id used to tag TLVs */
     private int id = 0;
-    
-    
+
+
     /**
      * Creates a new instance of AbstractContainer with a starting state.
      *
@@ -78,7 +78,7 @@ public abstract class AbstractContainer 
         state = TLVStateEnum.TAG_STATE_START;
     }
 
-    
+
     /**
      * Get the current grammar
      * 
@@ -222,8 +222,8 @@ public abstract class AbstractContainer 
         transition = 0;
         state = TLVStateEnum.TAG_STATE_START;
     }
-    
-    
+
+
     /**
      * Return a new ID and increment the counter
      * @return A new TLV id. 
@@ -233,7 +233,7 @@ public abstract class AbstractContainer 
         return id++;
     }
 
-    
+
     /**
      * @return The TLV Id
      */
@@ -262,8 +262,8 @@ public abstract class AbstractContainer 
     {
         decodeBytes += nb;
     }
-    
-    
+
+
     /**
      * @return The maximum PDU size.
      */
@@ -271,8 +271,8 @@ public abstract class AbstractContainer 
     {
         return maxPDUSize;
     }
-    
-    
+
+
     /**
      * Set the maximum PDU size.
      * @param maxPDUSize The maximum PDU size (if negative or null, will be

Copied: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Container.java (from r992800, directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/IAsn1Container.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Container.java?p2=directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Container.java&p1=directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/IAsn1Container.java&r1=992800&r2=992803&rev=992803&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/IAsn1Container.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Container.java Sun Sep  5 15:19:33 2010
@@ -31,7 +31,7 @@ import org.apache.directory.shared.asn1.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public interface IAsn1Container
+public interface Asn1Container
 {
     /**
      * Get the current grammar state
@@ -88,7 +88,7 @@ public interface IAsn1Container
      */
     void setTransition( int transition );
 
-    
+
     /**
      * @return Returns the states.
      */
@@ -124,22 +124,22 @@ public interface IAsn1Container
      * being an end or not.
      */
     void grammarEndAllowed( boolean grammarEndAllowed );
-    
-    
+
+
     /**
      * Get a new TLV id
      * @return a unique value representing the current TLV id
      */
     int getNewTlvId();
 
-    
+
     /**
      * Get the current TLV id
      * @return a unique value representing the current TLV id
      */
     int getTlvId();
-    
-    
+
+
     /**
      * @return The number of decoded bytes for this message. This is used
      * to control the PDU size and avoid PDU exceeding the maximum allowed
@@ -147,7 +147,7 @@ public interface IAsn1Container
      */
     int getDecodeBytes();
 
-    
+
     /**
      * Increment the decodedBytes by the latest received buffer's size.
      * @param nb The buffer size.
@@ -159,8 +159,8 @@ public interface IAsn1Container
      * @return The maximum PDU size.
      */
     int getMaxPDUSize();
-    
-    
+
+
     /**
      * Set the maximum PDU size.
      * @param maxPDUSize The maximum PDU size (if negative or null, will be

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java?rev=992803&r1=992802&r2=992803&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java Sun Sep  5 15:19:33 2010
@@ -22,8 +22,8 @@ package org.apache.directory.shared.asn1
 
 import java.nio.ByteBuffer;
 
-import org.apache.directory.shared.asn1.ber.tlv.TLVBerDecoderMBean;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
+import org.apache.directory.shared.asn1.ber.tlv.TLVBerDecoderMBean;
 import org.apache.directory.shared.asn1.ber.tlv.TLVStateEnum;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.DecoderException;
@@ -42,15 +42,12 @@ import org.slf4j.LoggerFactory;
 */
 public class Asn1Decoder implements TLVBerDecoderMBean
 {
-    // ~ Static fields/initializers
-    // -----------------------------------------------------------------
-
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( Asn1Decoder.class );
-    
+
     /** A speedup for logger */
     private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-    
+
     /** This flag is used to indicate that there are more bytes in the stream */
     private static final boolean MORE = true;
 
@@ -87,7 +84,7 @@ public class Asn1Decoder implements TLVB
      * @return <code>true</code> if there are more bytes to read, <code>false 
      * </code> otherwise
      */
-    private boolean treatTagStartState( ByteBuffer stream, IAsn1Container container )
+    private boolean treatTagStartState( ByteBuffer stream, Asn1Container container )
     {
         if ( stream.hasRemaining() )
         {
@@ -120,30 +117,30 @@ public class Asn1Decoder implements TLVB
         }
     }
 
-    
+
     /**
      * Dump the current TLV tree
      * 
      * @param container The container
      */
-    private void dumpTLVTree( IAsn1Container container )
+    private void dumpTLVTree( Asn1Container container )
     {
         StringBuffer sb = new StringBuffer();
         TLV current = container.getCurrentTLV();
 
-        sb.append( "TLV" ).append( Asn1StringUtils.dumpByte( current.getTag() ) ).append( "(" )
-            .append( current.getExpectedLength() ).append( ")" );
+        sb.append( "TLV" ).append( Asn1StringUtils.dumpByte( current.getTag() ) ).append( "(" ).append(
+            current.getExpectedLength() ).append( ")" );
 
         current = current.getParent();
 
         while ( current != null )
         {
-            sb.append( "-TLV" ).append( Asn1StringUtils.dumpByte( current.getTag() ) ).append( "(" )
-                .append( current.getExpectedLength() ).append( ")" );
+            sb.append( "-TLV" ).append( Asn1StringUtils.dumpByte( current.getTag() ) ).append( "(" ).append(
+                current.getExpectedLength() ).append( ")" );
             current = current.getParent();
         }
 
-        if ( IS_DEBUG ) 
+        if ( IS_DEBUG )
         {
             LOG.debug( "TLV Tree : {}", sb.toString() );
         }
@@ -156,7 +153,7 @@ public class Asn1Decoder implements TLVB
      * @param container The container
      * @return <code>true</code> if the TLV has been decoded
      */
-    private boolean isTLVDecoded( IAsn1Container container )
+    private boolean isTLVDecoded( Asn1Container container )
     {
         TLV current = container.getCurrentTLV();
         TLV parent = current.getParent();
@@ -183,7 +180,7 @@ public class Asn1Decoder implements TLVB
         }
     }
 
-    
+
     /**
      * Treat the Length start. The tag has been decoded, so we have to deal with
      * the LENGTH, which can be multi-bytes.
@@ -195,7 +192,7 @@ public class Asn1Decoder implements TLVB
      * </code> otherwise
      * @throws DecoderException Thrown if anything went wrong
      */
-    private boolean treatLengthStartState( ByteBuffer stream, IAsn1Container container ) throws DecoderException
+    private boolean treatLengthStartState( ByteBuffer stream, Asn1Container container ) throws DecoderException
     {
         if ( stream.hasRemaining() )
         {
@@ -207,7 +204,7 @@ public class Asn1Decoder implements TLVB
                 // We don't have a long form. The Length of the Value part is
                 // given by this byte.
                 tlv.setLength( octet );
-                tlv.setLengthNbBytes(  1 );
+                tlv.setLengthNbBytes( 1 );
 
                 container.setState( TLVStateEnum.LENGTH_STATE_END );
             }
@@ -253,7 +250,7 @@ public class Asn1Decoder implements TLVB
      * @return <code>true</code> if there are more bytes to read, <code>false 
      * </code> otherwise
      */
-    private boolean treatLengthPendingState( ByteBuffer stream, IAsn1Container container )
+    private boolean treatLengthPendingState( ByteBuffer stream, Asn1Container container )
     {
         if ( stream.hasRemaining() )
         {
@@ -271,11 +268,11 @@ public class Asn1Decoder implements TLVB
 
                 tlv.incLengthBytesRead();
                 length = ( length << 8 ) | ( octet & 0x00FF );
-                
+
                 if ( !stream.hasRemaining() )
                 {
                     tlv.setLength( length );
-                    
+
                     if ( tlv.getLengthBytesRead() < tlv.getLengthNbBytes() )
                     {
                         container.setState( TLVStateEnum.LENGTH_STATE_PENDING );
@@ -340,17 +337,17 @@ public class Asn1Decoder implements TLVB
      * the result and other informations.
      * @throws DecoderException Thrown if anything went wrong
      */
-    private void treatLengthEndState( IAsn1Container container ) throws DecoderException
+    private void treatLengthEndState( Asn1Container container ) throws DecoderException
     {
         TLV tlv = container.getCurrentTLV();
-        
+
         if ( tlv == null )
         {
             String msg = I18n.err( I18n.ERR_TLV_NULL_00007 );
             LOG.error( msg );
             throw new DecoderException( msg );
         }
-        
+
         int length = tlv.getLength();
 
         // We will check the length here. What we must control is
@@ -387,7 +384,8 @@ public class Asn1Decoder implements TLVB
                 // The expected length is lower than the Value length of the
                 // current TLV. This is an error...
                 LOG.debug( "tlv[{}, {}]", Integer.valueOf( expectedLength ), Integer.valueOf( currentLength ) );
-                throw new DecoderException( I18n.err( I18n.ERR_VALUE_LENGTH_ABOVE_EXPECTED_LENGTH_00008, Integer.valueOf( currentLength ), Integer.valueOf( expectedLength ) ) );
+                throw new DecoderException( I18n.err( I18n.ERR_VALUE_LENGTH_ABOVE_EXPECTED_LENGTH_00008, Integer
+                    .valueOf( currentLength ), Integer.valueOf( expectedLength ) ) );
             }
 
             // deal with the particular case where expected length equal
@@ -439,7 +437,7 @@ public class Asn1Decoder implements TLVB
                 else
                 {
                     tlv.setExpectedLength( length );
-                    
+
                     // It's over, the parent TLV has been completed.
                     // Go back to the parent's parent TLV until we find
                     // a tlv which is not complete.
@@ -506,7 +504,7 @@ public class Asn1Decoder implements TLVB
      * @return <code>true</code> if there are more bytes to read, <code>false 
      * </code> otherwise
      */
-    private boolean treatValueStartState( ByteBuffer stream, IAsn1Container container )
+    private boolean treatValueStartState( ByteBuffer stream, Asn1Container container )
     {
         TLV currentTlv = container.getCurrentTLV();
 
@@ -551,7 +549,7 @@ public class Asn1Decoder implements TLVB
      * value has been decoded, <code>END</code> if whe still need to get some 
      * more bytes.
      */
-    private boolean treatValuePendingState( ByteBuffer stream, IAsn1Container container )
+    private boolean treatValuePendingState( ByteBuffer stream, Asn1Container container )
     {
         TLV currentTlv = container.getCurrentTLV();
 
@@ -590,7 +588,7 @@ public class Asn1Decoder implements TLVB
      * </code> otherwise
      * @throws DecoderException Thrown if anything went wrong
      */
-    private boolean treatTLVDoneState( ByteBuffer stream, IAsn1Container container ) throws DecoderException
+    private boolean treatTLVDoneState( ByteBuffer stream, Asn1Container container ) throws DecoderException
     {
         if ( IS_DEBUG )
         {
@@ -643,7 +641,7 @@ public class Asn1Decoder implements TLVB
      * and other elements.
      * @throws DecoderException Thrown if anything went wrong!
      */
-    public void decode( ByteBuffer stream, IAsn1Container container ) throws DecoderException
+    public void decode( ByteBuffer stream, Asn1Container container ) throws DecoderException
     {
         /*
          * We have to deal with the current state. This is an infinite loop,
@@ -656,13 +654,14 @@ public class Asn1Decoder implements TLVB
          * the guilty !
          */
         boolean hasRemaining = stream.hasRemaining();
-        
+
         // Increment the PDU size counter.
         container.incrementDecodeBytes( stream.remaining() );
-        
+
         if ( container.getDecodeBytes() > container.getMaxPDUSize() )
         {
-            String message = I18n.err( I18n.ERR_PDU_SIZE_TOO_LONG_00042, container.getDecodeBytes(), container.getMaxPDUSize() );
+            String message = I18n.err( I18n.ERR_PDU_SIZE_TOO_LONG_00042, container.getDecodeBytes(), container
+                .getMaxPDUSize() );
             LOG.error( message );
             throw new DecoderException( message );
         }
@@ -745,8 +744,8 @@ public class Asn1Decoder implements TLVB
                     hasRemaining = false;
 
                     break;
-                    
-                default :
+
+                default:
                     break;
             }
         }

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/AbstractGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/AbstractGrammar.java?rev=992803&r1=992802&r2=992803&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/AbstractGrammar.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/AbstractGrammar.java Sun Sep  5 15:19:33 2010
@@ -20,7 +20,7 @@
 package org.apache.directory.shared.asn1.ber.grammar;
 
 
-import org.apache.directory.shared.asn1.ber.IAsn1Container;
+import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.util.Asn1StringUtils;
 import org.apache.directory.shared.i18n.I18n;
@@ -104,7 +104,7 @@ public abstract class AbstractGrammar im
      * @param container The Asn1Container
      * @throws DecoderException Thrown if anything went wrong
      */
-    public void executeAction( IAsn1Container container ) throws DecoderException
+    public void executeAction( Asn1Container container ) throws DecoderException
     {
 
         int currentState = container.getTransition();
@@ -124,8 +124,8 @@ public abstract class AbstractGrammar im
 
         if ( transition == null )
         {
-            String errorMessage = I18n.err( I18n.ERR_BAD_TRANSITION_FROM_STATE_00001, currentGrammar.getStatesEnum().getState( currentState ),
-                Asn1StringUtils.dumpByte( tagByte ) );
+            String errorMessage = I18n.err( I18n.ERR_BAD_TRANSITION_FROM_STATE_00001, currentGrammar.getStatesEnum()
+                .getState( currentState ), Asn1StringUtils.dumpByte( tagByte ) );
 
             LOG.error( errorMessage );
 

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/Action.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/Action.java?rev=992803&r1=992802&r2=992803&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/Action.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/Action.java Sun Sep  5 15:19:33 2010
@@ -20,7 +20,7 @@
 package org.apache.directory.shared.asn1.ber.grammar;
 
 
-import org.apache.directory.shared.asn1.ber.IAsn1Container;
+import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 
 
@@ -38,5 +38,5 @@ public interface Action
      * @param container The container which stores the current data
      * @throws DecoderException Thrown if something went wrong.
      */
-    void action( IAsn1Container container ) throws DecoderException;
+    void action( Asn1Container container ) throws DecoderException;
 }

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/Grammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/Grammar.java?rev=992803&r1=992802&r2=992803&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/Grammar.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/Grammar.java Sun Sep  5 15:19:33 2010
@@ -20,7 +20,7 @@
 package org.apache.directory.shared.asn1.ber.grammar;
 
 
-import org.apache.directory.shared.asn1.ber.IAsn1Container;
+import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 
 
@@ -38,7 +38,7 @@ public interface Grammar
      * @param asn1Container Store the data being processed.
      * @throws DecoderException Thrown when an unrecoverable error occurs.
      */
-    void executeAction( IAsn1Container asn1Container ) throws DecoderException;
+    void executeAction( Asn1Container asn1Container ) throws DecoderException;
 
 
     /**

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/GrammarAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/GrammarAction.java?rev=992803&r1=992802&r2=992803&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/GrammarAction.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/GrammarAction.java Sun Sep  5 15:19:33 2010
@@ -31,6 +31,7 @@ public abstract class GrammarAction impl
     /** The action's name */
     protected String name;
 
+
     /** A default constructor */
     public GrammarAction()
     {

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/GrammarTransition.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/GrammarTransition.java?rev=992803&r1=992802&r2=992803&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/GrammarTransition.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/GrammarTransition.java Sun Sep  5 15:19:33 2010
@@ -36,13 +36,14 @@ public class GrammarTransition
 
     /** The previous state */
     private int previousState;
-    
+
     /** The current state */
     private int currentState;
 
     /** The current tag */
     private int currentTag;
 
+
     /**
      * Creates a new GrammarTransition object.
      * 
@@ -59,7 +60,7 @@ public class GrammarTransition
         this.currentTag = currentTag;
     }
 
-    
+
     /**
      * Tells if the transition has an associated action.
      * 
@@ -70,7 +71,7 @@ public class GrammarTransition
         return action != null;
     }
 
-    
+
     /**
      * @return Returns the action associated with the transition
      */
@@ -79,7 +80,7 @@ public class GrammarTransition
         return action;
     }
 
-    
+
     /**
      * @return The current state
      */
@@ -88,7 +89,7 @@ public class GrammarTransition
         return currentState;
     }
 
-    
+
     /**
      * @return The previous state
      */
@@ -97,7 +98,7 @@ public class GrammarTransition
         return previousState;
     }
 
-    
+
     /**
      * @param statesEnum Starting state.
      * @return A representation of the transition as a string.
@@ -108,9 +109,9 @@ public class GrammarTransition
 
         sb.append( "Transition from state <" ).append( statesEnum.getState( previousState ) ).append( "> " );
         sb.append( "to state <" ).append( statesEnum.getState( currentState ) ).append( ">, " );
-        sb.append( "tag <" ).append( Asn1StringUtils.dumpByte( (byte)currentTag ) ).append( ">, " );
+        sb.append( "tag <" ).append( Asn1StringUtils.dumpByte( ( byte ) currentTag ) ).append( ">, " );
         sb.append( "action : " );
-        
+
         if ( action == null )
         {
             sb.append( "no action" );
@@ -119,7 +120,7 @@ public class GrammarTransition
         {
             sb.append( action );
         }
-        
+
         return sb.toString();
     }
 }

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/States.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/States.java?rev=992803&r1=992802&r2=992803&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/States.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/States.java Sun Sep  5 15:19:33 2010
@@ -38,6 +38,7 @@ public interface States
     /** The END_STATE */
     int END_STATE = -1;
 
+
     /** 
      * Get the current state's name 
      * 
@@ -46,7 +47,7 @@ public interface States
      */
     String getState( int state );
 
-    
+
     /** 
      * Return the grammar name of a grammar
      * 
@@ -55,7 +56,7 @@ public interface States
      */
     String getGrammarName( Grammar grammar );
 
-    
+
     /** 
      * Return the grammar name from a grammar number 
      * 

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/TLV.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/TLV.java?rev=992803&r1=992802&r2=992803&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/TLV.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/TLV.java Sun Sep  5 15:19:33 2010
@@ -38,7 +38,7 @@ public class TLV
 
     /** The number of byte to store the Length being processed */
     private int lengthNbBytes;
-    
+
     /** The number of length's bytes currently read */
     private int lengthBytesRead;
 
@@ -47,7 +47,7 @@ public class TLV
 
     /** An identity for the TLV. It store the TLV hashCode */
     private int id;
-    
+
     /**
      * Reference the TLV which contains the current TLV, if any. As the
      * enclosing TLV of a PDU does not have parent, it can be null in this case.
@@ -65,8 +65,8 @@ public class TLV
     public static final byte CONSTRUCTED_FLAG = 0x20;
 
     /** mask to get the type class value */
-    public static final byte TYPE_CLASS_MASK = (byte)0xC0;
-    
+    public static final byte TYPE_CLASS_MASK = ( byte ) 0xC0;
+
     /** value for the universal type class */
     public static final byte TYPE_CLASS_UNIVERSAL = 0x00;
 
@@ -81,19 +81,19 @@ public class TLV
 
     /** A mask to get the long form value */
     public static final int LENGTH_SHORT_MASK = 0x007F;
-    
+
     /** A speedup for single bytes length */
     private static final byte[][] ONE_BYTE = new byte[256][];
-    
+
     static
     {
         for ( int i = 0; i < 256; i++ )
         {
             ONE_BYTE[i] = new byte[1];
-            ONE_BYTE[i][0] = (byte)i;
+            ONE_BYTE[i][0] = ( byte ) i;
         }
     }
-    
+
 
     /**
      * Creates a new TLV object.
@@ -107,7 +107,7 @@ public class TLV
         lengthNbBytes = 0;
         value = new Value();
         this.id = id;
-        
+
         expectedLength = 0;
     }
 
@@ -123,7 +123,7 @@ public class TLV
         return ( tag & CONSTRUCTED_FLAG ) != 0;
     }
 
-    
+
     /**
      * Checks to see if the current tlv's tag is constructed.
      * 
@@ -147,7 +147,7 @@ public class TLV
         return ( tag & CONSTRUCTED_FLAG ) == 0;
     }
 
-    
+
     /**
      * Tells if the tag is Universal or not
      * 
@@ -156,10 +156,10 @@ public class TLV
      */
     public static boolean isUniversal( byte tag )
     {
-        return ( tag & TYPE_CLASS_MASK ) == TYPE_CLASS_UNIVERSAL; 
+        return ( tag & TYPE_CLASS_MASK ) == TYPE_CLASS_UNIVERSAL;
     }
 
-    
+
     /**
      * Reset the TLV, so it can be reused for the next PDU decoding.
      */
@@ -173,7 +173,7 @@ public class TLV
         expectedLength = 0;
     }
 
-    
+
     /**
      * @return Returns the tag.
      */
@@ -182,7 +182,7 @@ public class TLV
         return tag;
     }
 
-    
+
     /**
      * Set a tag value for this TLV.
      * 
@@ -193,7 +193,7 @@ public class TLV
         this.tag = tag;
     }
 
-    
+
     /**
      * @return Returns the value.
      */
@@ -214,7 +214,7 @@ public class TLV
         return 1 + lengthNbBytes + length;
     }
 
-    
+
     /**
      * Utility function that return the number of bytes necessary to store the
      * length
@@ -253,7 +253,7 @@ public class TLV
         }
     }
 
-    
+
     /**
      * Utility function that return a byte array representing the length
      * 
@@ -268,10 +268,10 @@ public class TLV
             {
                 return ONE_BYTE[length];
             }
-            else 
+            else
             {
                 byte[] bytes = new byte[getNbBytes( length )];
-                
+
                 if ( length < 256 )
                 {
                     bytes[0] = ( byte ) 0x81;
@@ -298,7 +298,7 @@ public class TLV
                     bytes[3] = ( byte ) ( ( length >> 8 ) & 0x00FF );
                     bytes[4] = ( byte ) ( length & 0x00FF );
                 }
-                
+
                 return bytes;
             }
         }
@@ -315,7 +315,7 @@ public class TLV
             return bytes;
         }
     }
-    
+
 
     /**
      * @return Returns the parent.
@@ -414,8 +414,8 @@ public class TLV
     {
         this.lengthBytesRead = lengthBytesRead;
     }
-    
-    
+
+
     /**
      * Increment the number of bytes read for this TLV
      *
@@ -425,7 +425,7 @@ public class TLV
         lengthBytesRead++;
     }
 
-    
+
     /**
      * @return the TLV's ID 
      */
@@ -434,7 +434,7 @@ public class TLV
         return id;
     }
 
-    
+
     /**
      * Get a String representation of the TLV
      * 
@@ -454,4 +454,3 @@ public class TLV
         return sb.toString();
     }
 }
- 
\ No newline at end of file

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/TLVBerDecoderMBean.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/TLVBerDecoderMBean.java?rev=992803&r1=992802&r2=992803&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/TLVBerDecoderMBean.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/TLVBerDecoderMBean.java Sun Sep  5 15:19:33 2010
@@ -19,9 +19,8 @@
  */
 package org.apache.directory.shared.asn1.ber.tlv;
 
-import org.apache.directory.shared.asn1.codec.DecoderException;
-
 
+import org.apache.directory.shared.asn1.codec.DecoderException;
 
 
 /**

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/TLVStateEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/TLVStateEnum.java?rev=992803&r1=992802&r2=992803&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/TLVStateEnum.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/TLVStateEnum.java Sun Sep  5 15:19:33 2010
@@ -66,7 +66,7 @@ public enum TLVStateEnum
 
     /** The decoding of a PDU is done */
     PDU_DECODED,
-    
+
     /** The ending state */
     GRAMMAR_END;
 }

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/UniversalTag.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/UniversalTag.java?rev=992803&r1=992802&r2=992803&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/UniversalTag.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/UniversalTag.java Sun Sep  5 15:19:33 2010
@@ -170,111 +170,111 @@ package org.apache.directory.shared.asn1
 public enum UniversalTag
 {
     /** value for the tag */
-    RESERVED_0( (byte)0 ),
+    RESERVED_0(( byte ) 0),
 
     /** value for the tag */
-    BOOLEAN( (byte)1 ),
+    BOOLEAN(( byte ) 1),
 
     /** value for the tag */
-    INTEGER( (byte)2 ),
+    INTEGER(( byte ) 2),
 
     /** value for the tag */
-    BIT_STRING( (byte)3 ),
+    BIT_STRING(( byte ) 3),
 
     /** value for the tag */
-    OCTET_STRING( (byte)4 ),
+    OCTET_STRING(( byte ) 4),
 
     /** value for the tag */
-    NULL((byte)5 ),
+    NULL(( byte ) 5),
 
     /** value for the tag */
-    OBJECT_IDENTIFIER( (byte)6 ),
+    OBJECT_IDENTIFIER(( byte ) 6),
 
     /** value for the tag */
-    OBJECT_DESCRIPTOR( (byte)7 ),
+    OBJECT_DESCRIPTOR(( byte ) 7),
 
     /** value for the tag */
-    EXTERNAL_INSTANCE_OF( (byte)8 ),
+    EXTERNAL_INSTANCE_OF(( byte ) 8),
 
     /** value for the tag */
-    REAL( (byte)9 ),
+    REAL(( byte ) 9),
 
     /** value for the tag */
-    ENUMERATED( (byte)0x0A ),
+    ENUMERATED(( byte ) 0x0A),
 
     /** value for the tag */
-    EMBEDDED_PDV( (byte)0x0B ),
+    EMBEDDED_PDV(( byte ) 0x0B),
 
     /** value for the tag */
-    UTF8_STRING( (byte)0x0C ),
+    UTF8_STRING(( byte ) 0x0C),
 
     /** value for the tag */
-    RELATIVE_OID( (byte)0x0D ),
+    RELATIVE_OID(( byte ) 0x0D),
 
     /** value for the tag */
-    RESERVED_14( (byte)0x0E ),
+    RESERVED_14(( byte ) 0x0E),
 
     /** value for the tag */
-    RESERVED_15( (byte)0x0F ),
+    RESERVED_15(( byte ) 0x0F),
 
     /** value for the tag */
-    SEQUENCE_SEQUENCE_OF( (byte)0x10 ),
+    SEQUENCE_SEQUENCE_OF(( byte ) 0x10),
 
     /** value for the tag */
-    SET_SET_OF( (byte)0x11 ),
+    SET_SET_OF(( byte ) 0x11),
 
     /** value for the tag */
-    NUMERIC_STRING( (byte)0x12 ),
+    NUMERIC_STRING(( byte ) 0x12),
 
     /** value for the tag */
-    PRINTABLE_STRING( (byte)0x13 ),
+    PRINTABLE_STRING(( byte ) 0x13),
 
     /** value for the tag */
-    TELETEX_STRING( (byte)0x14 ),
+    TELETEX_STRING(( byte ) 0x14),
 
     /** value for the tag */
-    VIDEOTEX_STRING( (byte)0x15 ),
+    VIDEOTEX_STRING(( byte ) 0x15),
 
     /** value for the tag */
-    IA5_STRING( (byte)0x16 ),
+    IA5_STRING(( byte ) 0x16),
 
     /** value for the tag */
-    UTC_TIME( (byte)0x17 ),
+    UTC_TIME(( byte ) 0x17),
 
     /** value for the tag */
-    GENERALIZED_TIME( (byte)0x18 ),
+    GENERALIZED_TIME(( byte ) 0x18),
 
     /** value for the tag */
-    GRAPHIC_STRING( (byte)0x19 ),
+    GRAPHIC_STRING(( byte ) 0x19),
 
     /** value for the tag */
-    VISIBLE_STRING( (byte)0x1A ),
+    VISIBLE_STRING(( byte ) 0x1A),
 
     /** value for the tag */
-    GENERAL_STRING( (byte)0x1B ),
+    GENERAL_STRING(( byte ) 0x1B),
 
     /** value for the tag */
-    UNIVERSAL_STRING( (byte)0x1C ),
+    UNIVERSAL_STRING(( byte ) 0x1C),
 
     /** value for the tag */
-    CHARACTER_STRING( (byte)0x1D ),
+    CHARACTER_STRING(( byte ) 0x1D),
 
     /** value for the tag */
-    BMP_STRING( (byte)0x1E ),
+    BMP_STRING(( byte ) 0x1E),
 
     /** value for the tag */
-    RESERVED_31( (byte)0x1F ),
-
+    RESERVED_31(( byte ) 0x1F),
 
     /** SEQUENCE TAG */
-    SEQUENCE( (byte)0x30 ),
+    SEQUENCE(( byte ) 0x30),
 
     /** SET TAG */
-    SET( (byte)0x31 );
+    SET(( byte ) 0x31);
 
     /** The internal value */
     private byte value;
-    
+
+
     /**
      * Creates a new instance of UniversalTag.
      *
@@ -285,6 +285,7 @@ public enum UniversalTag
         this.value = value;
     }
 
+
     /**
      * @return The UniversalTag value
      */

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/Value.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/Value.java?rev=992803&r1=992802&r2=992803&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/Value.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/Value.java Sun Sep  5 15:19:33 2010
@@ -63,7 +63,7 @@ public class Value implements Serializab
 
     /** Integer limits for encoding : 0x7F */
     private static final int ONE_BYTE_MAX = ( 1 << 7 ) - 1;
-    
+
     /** Integer limits for encoding : -0x7F */
     private static final int ONE_BYTE_MIN = -( 1 << 7 );
 
@@ -83,25 +83,26 @@ public class Value implements Serializab
     private static final long FOUR_BYTE_MAX = ( 1L << 31 ) - 1L;
 
     /** Integer limits for encoding : -0x7FFFFFFF */
-    private static final long FOUR_BYTE_MIN = -( 1L << 31 ); 
+    private static final long FOUR_BYTE_MIN = -( 1L << 31 );
 
     /** Integer limits for encoding : 0x7FFFFFFFFF */
     private static final long FIVE_BYTE_MAX = ( 1L << 39 ) - 1L;
 
     /** Integer limits for encoding : -0x7FFFFFFFFF */
-    private static final long FIVE_BYTE_MIN = -( 1L << 39 ); 
+    private static final long FIVE_BYTE_MIN = -( 1L << 39 );
 
     /** Integer limits for encoding : 0x7FFFFFFFFFFF */
     private static final long SIX_BYTE_MAX = ( 1L << 47 ) - 1L;
 
     /** Integer limits for encoding : -0x7FFFFFFFFFFF */
-    private static final long SIX_BYTE_MIN = -( 1L << 47 ); 
+    private static final long SIX_BYTE_MIN = -( 1L << 47 );
 
     /** Integer limits for encoding : 0x7FFFFFFFFFFF */
     private static final long SEVEN_BYTE_MAX = ( 1L << 55 ) - 1L;
 
     /** Integer limits for encoding : -0x7FFFFFFFFFFF */
-    private static final long SEVEN_BYTE_MIN = -( 1L << 55 ); 
+    private static final long SEVEN_BYTE_MIN = -( 1L << 55 );
+
 
     /**
      * Creates a new Value from a byte[]
@@ -353,11 +354,11 @@ public class Value implements Serializab
                 bytes[1] = ( byte ) ( value >> 16 );
                 bytes[0] = ( byte ) ( value >> 24 );
             }
-            else 
+            else
             {
                 // We have to compute the complement, and add 1
                 //value = ( ~value ) + 1;
-                
+
                 if ( value >= 0xFFFFFF80 )
                 {
                     bytes = new byte[1];
@@ -372,7 +373,7 @@ public class Value implements Serializab
                 else if ( value >= 0xFF800000 )
                 {
                     bytes = new byte[3];
-                    bytes[2] = ( byte ) value ;
+                    bytes[2] = ( byte ) value;
                     bytes[1] = ( byte ) ( value >> 8 );
                     bytes[0] = ( byte ) ( value >> 16 );
                 }
@@ -545,11 +546,11 @@ public class Value implements Serializab
                 bytes[1] = ( byte ) 0x00;
                 bytes[0] = ( byte ) 0x80;
             }
-            else 
+            else
             {
                 // We have to compute the complement, and add 1
                 // value = ( ~value ) + 1;
-                
+
                 if ( value >= 0xFFFFFFFFFFFFFF80L )
                 {
                     bytes = new byte[1];
@@ -564,7 +565,7 @@ public class Value implements Serializab
                 else if ( value >= 0xFFFFFFFFFF800000L )
                 {
                     bytes = new byte[3];
-                    bytes[2] = ( byte ) value ;
+                    bytes[2] = ( byte ) value;
                     bytes[1] = ( byte ) ( value >> 8 );
                     bytes[0] = ( byte ) ( value >> 16 );
                 }
@@ -659,7 +660,7 @@ public class Value implements Serializab
         }
     }
 
-    
+
     /**
      * Encode a BIT STRING value
      * 
@@ -678,11 +679,11 @@ public class Value implements Serializab
         try
         {
             buffer.put( UniversalTag.BIT_STRING.getValue() );
-            
+
             // The BitString length. We add one byte for the unused number 
             // of bits
             int length = bitString.size() + 1;
-            
+
             buffer.put( TLV.getBytes( length ) );
             buffer.put( bitString.getUnusedBits() );
             buffer.put( bitString.getData() );

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/BitString.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/BitString.java?rev=992803&r1=992802&r2=992803&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/BitString.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/BitString.java Sun Sep  5 15:19:33 2010
@@ -33,6 +33,7 @@ import org.apache.directory.shared.i18n.
  */
 public class BitString implements Serializable
 {
+    /** The serialVersion UID constant */
     private static final long serialVersionUID = 1L;
 
     // ~ Static fields/initializers
@@ -45,15 +46,11 @@ public class BitString implements Serial
      * A flag to mark the OctetString as Streamed (for OctetString larger than
      * 1024 chars)
      */
-    // TODO implement the streaming...
     public static final boolean STREAMED = true;
 
     /** The default length of a BitString */
     private static final int DEFAULT_LENGTH = 1024;
 
-    // ~ Instance fields
-    // ----------------------------------------------------------------------------
-
     /** The number of unused ints */
     private int nbUnusedBits;
 
@@ -70,22 +67,20 @@ public class BitString implements Serial
     private int nbBits;
 
 
-    // ~ Constructors
-    // -------------------------------------------------------------------------------*
     /**
      * Creates a BitString with a specific length (length is the number of
      * bits).
      * 
      * @param length The BitString length (it's a number of bits)
      */
-    public BitString( int length ) 
+    public BitString( int length )
     {
         if ( length <= 0 )
         {
             // This is not allowed
             throw new IndexOutOfBoundsException( I18n.err( I18n.ERR_00029 ) );
         }
-        
+
         nbBits = length;
 
         // As we store values in bytes, we must divide the length by 8
@@ -124,7 +119,7 @@ public class BitString implements Serial
             // This is not allowed
             throw new IndexOutOfBoundsException( I18n.err( I18n.ERR_00029 ) );
         }
-        
+
         nbBits = length;
         this.isStreamed = isStreamed;
         nbBytes = ( length / 8 ) + ( ( ( length % 8 ) != 0 ) ? 1 : 0 );
@@ -248,6 +243,7 @@ public class BitString implements Serial
         return ( byte ) nbUnusedBits;
     }
 
+
     /**
      * Set a bit at a specified position. 
      * The bits are stored from left to right.
@@ -261,13 +257,14 @@ public class BitString implements Serial
         {
             throw new IndexOutOfBoundsException( I18n.err( I18n.ERR_00030 ) );
         }
-        
+
         int posInt = nbBytes - 1 - ( ( pos + nbUnusedBits ) >> 3 );
         int bitNumber = ( pos + nbUnusedBits ) % 8;
 
         bytes[posInt] |= ( 1 << bitNumber );
     }
-    
+
+
     /**
      * Clear a bit at a specified position. 
      * The bits are stored from left to right.
@@ -282,13 +279,14 @@ public class BitString implements Serial
         {
             throw new IndexOutOfBoundsException( I18n.err( I18n.ERR_00030 ) );
         }
-        
+
         int posInt = nbBytes - 1 - ( ( pos + nbUnusedBits ) >> 3 );
         int bitNumber = ( pos + nbUnusedBits ) % 8;
 
         bytes[posInt] &= ~( 1 << bitNumber );
     }
-    
+
+
     /**
      * Get the bit stored into the BitString at a specific position. 
      * The bits are stored from left to right, the LSB on the right and the
@@ -323,7 +321,8 @@ public class BitString implements Serial
         int res = bytes[posInt] & ( 1 << bitNumber );
         return res != 0;
     }
-    
+
+
     /**
      * @return The number of bytes used to encode this BitString
      */

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/OID.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/OID.java?rev=992803&r1=992802&r2=992803&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/OID.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/OID.java Sun Sep  5 15:19:33 2010
@@ -65,18 +65,13 @@ public class OID implements Serializable
     /** Internal Serial UUID version */
     private static final long serialVersionUID = 1L;
 
-    // ~ Instance fields
-    // ----------------------------------------------------------------------------
-
     /** The OID as a array of int */
     private long[] oidValues;
 
-    /** Th hashcode, computed only once */
+    /** The hashcode, computed only once */
     private int hash;
 
 
-    // ~ Constructors
-    // -------------------------------------------------------------------------------
     /**
      * Creates a new OID object.
      */
@@ -234,7 +229,7 @@ public class OID implements Serializable
         boolean dotSeen = false;
 
         // Count the number of int to allocate.
-        for ( char c:chars )
+        for ( char c : chars )
         {
             if ( c == '.' )
             {
@@ -271,9 +266,9 @@ public class OID implements Serializable
         // The first value
         switch ( chars[pos] )
         {
-            case '0' : // itu-t
-            case '1' : // iso
-            case '2' : // joint-iso-itu-t
+            case '0': // itu-t
+            case '1': // iso
+            case '2': // joint-iso-itu-t
                 ituOrIso = true;
                 oidValues[intPos++] = chars[pos++] - '0';
                 break;
@@ -507,12 +502,12 @@ public class OID implements Serializable
     {
         int h = 37;
 
-        for ( long val:oidValues )
+        for ( long val : oidValues )
         {
-            int low = (int)(val & 0x0000FFFFL);
-            int high = (int)(val >> 32);
-            h = h*17 + high;
-            h = h*17 + low;
+            int low = ( int ) ( val & 0x0000FFFFL );
+            int high = ( int ) ( val >> 32 );
+            h = h * 17 + high;
+            h = h * 17 + low;
         }
 
         return h;
@@ -536,7 +531,7 @@ public class OID implements Serializable
         boolean dotSeen = false;
 
         // Count the number of int to allocate.
-        for ( byte b:bytes )
+        for ( byte b : bytes )
         {
             if ( b == '.' )
             {
@@ -570,13 +565,13 @@ public class OID implements Serializable
         // The first value
         switch ( bytes[pos++] )
         {
-            case '0' : // itu-t
-            case '1' : // iso
-            case '2' : // joint-iso-itu-t
+            case '0': // itu-t
+            case '1': // iso
+            case '2': // joint-iso-itu-t
                 ituOrIso = true;
                 break;
 
-            default : // error, this value is not allowed
+            default: // error, this value is not allowed
                 return false;
         }
 
@@ -682,7 +677,7 @@ public class OID implements Serializable
             return false;
         }
 
-        OID instance = (OID)oid;
+        OID instance = ( OID ) oid;
 
         if ( instance.hash != hash )
         {



Mime
View raw message