directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1069592 - in /directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/ber: AbstractContainer.java Asn1Container.java
Date Thu, 10 Feb 2011 22:30:56 GMT
Author: elecharny
Date: Thu Feb 10 22:30:56 2011
New Revision: 1069592

URL: http://svn.apache.org/viewvc?rev=1069592&view=rev
Log:
Fixed some warnings

Modified:
    directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/ber/AbstractContainer.java
    directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Container.java

Modified: directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/ber/AbstractContainer.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/ber/AbstractContainer.java?rev=1069592&r1=1069591&r2=1069592&view=diff
==============================================================================
--- directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/ber/AbstractContainer.java
(original)
+++ directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/ber/AbstractContainer.java
Thu Feb 10 22:30:56 2011
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.asn1.ber;
 
@@ -32,13 +32,13 @@ import org.apache.directory.shared.asn1.
  * This class is the abstract container used to store the current state of a PDU
  * being decoded. It also stores the grammars used to decode the PDU, and all
  * the informations needed to decode a PDU.
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public abstract class AbstractContainer implements Asn1Container
 {
     /** All the possible grammars */
-    protected Grammar grammar;
+    protected Grammar<?> grammar;
 
     /** Store a stack of the current states used when switching grammars */
     protected int[] stateStack;
@@ -69,9 +69,9 @@ public abstract class AbstractContainer 
 
     /** The Stream being decoded */
     private ByteBuffer stream;
-    
-    /** A flag telling if the Value should be accumulated before being decoded 
-     * for constructed types */ 
+
+    /** A flag telling if the Value should be accumulated before being decoded
+     * for constructed types */
     private boolean isGathering = false;
 
     /**
@@ -83,25 +83,25 @@ public abstract class AbstractContainer 
         state = TLVStateEnum.TAG_STATE_START;
     }
 
-    
+
     /**
      * Creates a new instance of AbstractContainer with a starting state.
-     * 
+     *
      * @param stream the buffer containing the data to decode
      */
-    protected AbstractContainer( ByteBuffer stream ) 
+    protected AbstractContainer( ByteBuffer stream )
     {
         state = TLVStateEnum.TAG_STATE_START;
         this.stream = stream;
     }
 
-    
+
     /**
      * Get the current grammar
-     * 
+     *
      * @return Returns the grammar used to decode a LdapMessage.
      */
-    public Grammar getGrammar()
+    public Grammar<?> getGrammar()
     {
         return grammar;
     }
@@ -109,7 +109,7 @@ public abstract class AbstractContainer 
 
     /**
      * Get the current grammar state
-     * 
+     *
      * @return Returns the current grammar state
      */
     public TLVStateEnum getState()
@@ -120,7 +120,7 @@ public abstract class AbstractContainer 
 
     /**
      * Set the new current state
-     * 
+     *
      * @param state The new state
      */
     public void setState( TLVStateEnum state )
@@ -131,7 +131,7 @@ public abstract class AbstractContainer 
 
     /**
      * Check that we can have a end state after this transition
-     * 
+     *
      * @return true if this can be the last transition
      */
     public boolean isGrammarEndAllowed()
@@ -142,7 +142,7 @@ public abstract class AbstractContainer 
 
     /**
      * Set the flag to allow a end transition
-     * 
+     *
      * @param grammarEndAllowed true or false, depending on the next transition
      * being an end or not.
      */
@@ -154,7 +154,7 @@ public abstract class AbstractContainer 
 
     /**
      * Get the transition
-     * 
+     *
      * @return Returns the transition from the previous state to the new state
      */
     public Enum<?> getTransition()
@@ -165,7 +165,7 @@ public abstract class AbstractContainer 
 
     /**
      * Update the transition from a state to another
-     * 
+     *
      * @param transition The transition to set
      */
     public void setTransition( Enum<?> transition )
@@ -176,7 +176,7 @@ public abstract class AbstractContainer 
 
     /**
      * Set the current TLV
-     * 
+     *
      * @param currentTLV The current TLV
      */
     public void setCurrentTLV( TLV currentTLV )
@@ -187,7 +187,7 @@ public abstract class AbstractContainer 
 
     /**
      * Get the current TLV
-     * 
+     *
      * @return Returns the current TLV being decoded
      */
     public TLV getCurrentTLV()
@@ -198,7 +198,7 @@ public abstract class AbstractContainer 
 
     /**
      * Get the parent TLV;
-     * 
+     *
      * @return Returns the parent TLV, if any.
      */
     public TLV getParentTLV()
@@ -209,7 +209,7 @@ public abstract class AbstractContainer 
 
     /**
      * Set the parent TLV.
-     * 
+     *
      * @param parentTLV The parent TLV to set.
      */
     public void setParentTLV( TLV parentTLV )
@@ -232,7 +232,7 @@ public abstract class AbstractContainer 
 
     /**
      * Return a new ID and increment the counter
-     * @return A new TLV id. 
+     * @return A new TLV id.
      */
     public int getNewTlvId()
     {
@@ -295,8 +295,8 @@ public abstract class AbstractContainer 
             this.maxPDUSize = Integer.MAX_VALUE;
         }
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -304,8 +304,8 @@ public abstract class AbstractContainer 
     {
         return stream;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -314,30 +314,30 @@ public abstract class AbstractContainer 
         this.stream = stream;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
     public void rewind()
     {
-        
+
         int start = stream.position() - 1 - tlv.getLengthNbBytes();
         stream.position( start );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public void updateParent()
     {
         TLV parentTlv = tlv.getParent();
-        
+
         while ( ( parentTlv != null ) && ( parentTlv.getExpectedLength() == 0 ) )
         {
             parentTlv = parentTlv.getParent();
         }
-        
+
         this.parentTLV = parentTlv;
     }
 
@@ -349,7 +349,7 @@ public abstract class AbstractContainer 
     {
         return isGathering;
     }
-    
+
 
     /**
      * {@inheritDoc}

Modified: directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Container.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Container.java?rev=1069592&r1=1069591&r2=1069592&view=diff
==============================================================================
--- directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Container.java
(original)
+++ directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Container.java
Thu Feb 10 22:30:56 2011
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.asn1.ber;
 
@@ -29,30 +29,30 @@ import org.apache.directory.shared.asn1.
 
 /**
  * Every ASN1 container must implement this interface.
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public interface Asn1Container
 {
     /**
      * Gets the current stream containing the bytes to decode
-     * 
+     *
      * @return The current stream
      */
     ByteBuffer getStream();
-    
-    
+
+
     /**
      * Stores the Stream being decoded
-     * 
+     *
      * @param stream The stream being decoded
      */
     void setStream( ByteBuffer stream );
-    
-    
+
+
     /**
      * Get the current grammar state
-     * 
+     *
      * @return Returns the current grammar state
      */
     TLVStateEnum getState();
@@ -60,7 +60,7 @@ public interface Asn1Container
 
     /**
      * Set the new current state
-     * 
+     *
      * @param state The new state
      */
     void setState( TLVStateEnum state );
@@ -68,7 +68,7 @@ public interface Asn1Container
 
     /**
      * Get the currentTLV
-     * 
+     *
      * @return Returns the current TLV being decoded
      */
     TLV getCurrentTLV();
@@ -76,7 +76,7 @@ public interface Asn1Container
 
     /**
      * Set the current TLV
-     * 
+     *
      * @param tlv The current TLV
      */
     void setCurrentTLV( TLV tlv );
@@ -84,7 +84,7 @@ public interface Asn1Container
 
     /**
      * Get the grammar
-     * 
+     *
      * @return Returns the grammar used to decode a LdapMessage.
      */
     Grammar getGrammar();
@@ -92,7 +92,7 @@ public interface Asn1Container
 
     /**
      * Get the transition
-     * 
+     *
      * @return Returns the transition from the previous state to the new state
      */
     Enum<?> getTransition();
@@ -100,7 +100,7 @@ public interface Asn1Container
 
     /**
      * Update the transition from a state to another
-     * 
+     *
      * @param transition The transition to set
      */
     void setTransition( Enum<?> transition );
@@ -114,7 +114,7 @@ public interface Asn1Container
 
     /**
      * Set the parent TLV
-     * 
+     *
      * @param parentTLV The new parent TLV
      */
     void setParentTLV( TLV parentTLV );
@@ -122,7 +122,7 @@ public interface Asn1Container
 
     /**
      * Check that we can have a end state after this transition
-     * 
+     *
      * @return true if this can be the last transition
      */
     boolean isGrammarEndAllowed();
@@ -130,7 +130,7 @@ public interface Asn1Container
 
     /**
      * Set the flag to allow a end transition
-     * 
+     *
      * @param grammarEndAllowed true or false, depending on the next transition
      * being an end or not.
      */
@@ -178,8 +178,8 @@ public interface Asn1Container
      * replaced by the max integer value)
      */
     void setMaxPDUSize( int maxPDUSize );
-    
-    
+
+
     /**
      * Move backward in the stream to the first byte for a given TLV. This is useful when
we have
      * read some Tag and Length in order to define the next transition, and if this transition
@@ -187,22 +187,22 @@ public interface Asn1Container
      * @param tlv The TLV to rollback
      */
     void rewind();
-    
-    
+
+
     /**
      * Look for the closest parent which has an expected length above 0
      */
     void updateParent();
-    
-    
+
+
     /**
      * @return true if the container should gather the value into itself, false
-     * if the decoding of the Value part should be done immediately for 
+     * if the decoding of the Value part should be done immediately for
      * constructed types.
      */
     boolean isGathering();
-    
-    
+
+
     /**
      * Set the isGathering flag
      * @param isGathering true to ask the Asn1Decoder to gather the data



Mime
View raw message