directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r569051 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/CascadeControl.java
Date Thu, 23 Aug 2007 15:54:11 GMT
Author: akarasulu
Date: Thu Aug 23 08:54:10 2007
New Revision: 569051

URL: http://svn.apache.org/viewvc?rev=569051&view=rev
Log:
cleaning up some useless code in the CascadeControl thanks to emmanuels instruction

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/CascadeControl.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/CascadeControl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/CascadeControl.java?rev=569051&r1=569050&r2=569051&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/CascadeControl.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/CascadeControl.java
Thu Aug 23 08:54:10 2007
@@ -20,12 +20,6 @@
 package org.apache.directory.shared.ldap.message;
 
 
-import org.apache.directory.shared.asn1.codec.EncoderException;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
 /**
  * The control for peforming a cascade of operations like delete and modify.
  * 
@@ -35,12 +29,10 @@
 public class CascadeControl extends ControlImpl
 {
     private static final long serialVersionUID = -2356861450876343999L;
-
-    private static final Logger log = LoggerFactory.getLogger( CascadeControl.class );
-
+    private static final byte[] EMPTY_ARRAY = new byte[0];
+    
     public static final String CONTROL_OID = "1.3.6.1.4.1.18060.0.0.1";
 
-
     public CascadeControl()
     {
         super();
@@ -50,21 +42,6 @@
 
     public byte[] getEncodedValue()
     {
-        if ( getValue() == null )
-        {
-            org.apache.directory.shared.ldap.codec.controls.CascadeControl ctl = 
-                new org.apache.directory.shared.ldap.codec.controls.CascadeControl();
-
-            try
-            {
-                setValue( ctl.encode( null ).array() );
-            }
-            catch ( EncoderException e )
-            {
-                log.error( "Failed to encode CascadeControl", e );
-            }
-        }
-
-        return getValue();
+        return EMPTY_ARRAY;
     }
 }



Mime
View raw message