directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1063561 - in /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls: CodecControl.java CodecControlDecorator.java ControlImpl.java
Date Wed, 26 Jan 2011 01:48:26 GMT
Author: akarasulu
Date: Wed Jan 26 01:48:26 2011
New Revision: 1063561

URL: http://svn.apache.org/viewvc?rev=1063561&view=rev
Log:
minor cleanups to get rid of IDEA warnings

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CodecControl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CodecControlDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlImpl.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CodecControl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CodecControl.java?rev=1063561&r1=1063560&r2=1063561&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CodecControl.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CodecControl.java
Wed Jan 26 01:48:26 2011
@@ -23,6 +23,7 @@ import java.nio.ByteBuffer;
 
 import org.apache.directory.shared.asn1.EncoderException;
 
+
 /**
  * Define the transform method to be implemented by all the codec Controls
  *
@@ -63,9 +64,11 @@ public interface CodecControl
      *                  [+ Length(0x01) + 1 + 1]
      *                  [+ Length(0x04) + Length(L3) + L3]
      * </pre>
+     * @return The computed length of the Control
      */
     int computeLength();
 
+
     /**
      * Get the associated decoder
      *

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CodecControlDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CodecControlDecorator.java?rev=1063561&r1=1063560&r2=1063561&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CodecControlDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CodecControlDecorator.java
Wed Jan 26 01:48:26 2011
@@ -34,18 +34,13 @@ import java.nio.ByteBuffer;
 
 
 /**
- * Example to show decorator application. The decorator interface is CodecControl which
- * adds the additional functionality. This class would be the concrete decorator for the
- * CodecControl. The decorated component is Control, and an example of a concrete
- * decorated component would be LdifControl.
+ * Decorates Control objects enabling the codec to store transient information
+ * with the object.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class CodecControlDecorator extends AbstractAsn1Object implements Control, CodecControl
 {
-    // ~ Instance fields
-    // ----------------------------------------------------------------------------
-
     /** The decorated Control */
     private final Control decoratedComponent;
 
@@ -60,11 +55,13 @@ public class CodecControlDecorator exten
 
 
     /**
-     * Default constructor.
+     * Creates a ControlDecorator to codec enable it.
+     *
+     * @param decoratedControl The Control to decorate.
      */
-    public CodecControlDecorator( Control decoratedComponent)
+    public CodecControlDecorator( Control decoratedControl )
     {
-        this.decoratedComponent = decoratedComponent;
+        this.decoratedComponent = decoratedControl;
     }
 
 
@@ -248,7 +245,8 @@ public class CodecControlDecorator exten
             return false;
         }
 
-        if ( isCritical() != otherControl.isCritical() )
+        //noinspection SimplifiableIfStatement
+        if ( otherControl.isCritical() != isCritical() )
         {
             return false;
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlImpl.java?rev=1063561&r1=1063560&r2=1063561&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlImpl.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlImpl.java
Wed Jan 26 01:48:26 2011
@@ -44,8 +44,11 @@ public class ControlImpl extends Abstrac
     /** Speedup for logs */
     static final boolean IS_DEBUG = LOG.isDebugEnabled();
 
+
     /**
-     * Default constructor.
+     * Creates a Control with an OID.
+     *
+     * @param oid The OID of the Control.
      */
     public ControlImpl( String oid )
     {
@@ -58,7 +61,7 @@ public class ControlImpl extends Abstrac
     /**
      * Set the encoded control value
      * 
-     * @param encodedValue The encoded control value to store
+     * @param value The encoded control value to store
      */
     public void setValue( byte[] value )
     {



Mime
View raw message