From fb4ca733c544339f15ab0667488daa57482967e3 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Thu, 15 Jan 2009 10:26:22 +0000
Subject: [PATCH] Use directly the constant OID of the control instead of creating a control object.

---
 opendj-sdk/opends/src/guitools/org/opends/guitools/controlpanel/task/DeleteEntryTask.java |    6 ++++--
 opendj-sdk/opends/src/guitools/org/opends/guitools/controlpanel/util/Utilities.java       |    7 -------
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/opendj-sdk/opends/src/guitools/org/opends/guitools/controlpanel/task/DeleteEntryTask.java b/opendj-sdk/opends/src/guitools/org/opends/guitools/controlpanel/task/DeleteEntryTask.java
index db00ddd..c6751b4 100644
--- a/opendj-sdk/opends/src/guitools/org/opends/guitools/controlpanel/task/DeleteEntryTask.java
+++ b/opendj-sdk/opends/src/guitools/org/opends/guitools/controlpanel/task/DeleteEntryTask.java
@@ -62,6 +62,7 @@
 import org.opends.messages.Message;
 import org.opends.server.types.DN;
 import org.opends.server.types.DirectoryException;
+import org.opends.server.util.ServerConstants;
 import org.opends.server.util.cli.CommandBuilder;
 
 /**
@@ -457,7 +458,8 @@
       ctx1 = ConnectionUtils.cloneInitialLdapContext(ctx,
           ConnectionUtils.getDefaultLDAPTimeout(),
           getInfo().getTrustManager(), null);
-      Control[] ctls = {new BasicControl(Utilities.SUBTREE_CTRL_OID)};
+      Control[] ctls = {
+          new BasicControl(ServerConstants.OID_SUBTREE_DELETE_CONTROL)};
       ctx1.setRequestControls(ctls);
       ctx1.destroySubcontext(Utilities.getJNDIName(dn.toString()));
     }
@@ -518,7 +520,7 @@
     if (usingControl)
     {
       args.add("-J");
-      args.add(Utilities.SUBTREE_CTRL_OID);
+      args.add(ServerConstants.OID_SUBTREE_DELETE_CONTROL);
     }
     args.add(dn.toString());
     StringBuilder sb = new StringBuilder();
diff --git a/opendj-sdk/opends/src/guitools/org/opends/guitools/controlpanel/util/Utilities.java b/opendj-sdk/opends/src/guitools/org/opends/guitools/controlpanel/util/Utilities.java
index 6c1f9e2..b6942fd 100644
--- a/opendj-sdk/opends/src/guitools/org/opends/guitools/controlpanel/util/Utilities.java
+++ b/opendj-sdk/opends/src/guitools/org/opends/guitools/controlpanel/util/Utilities.java
@@ -82,7 +82,6 @@
 import javax.swing.table.TableColumn;
 import javax.swing.table.TableColumnModel;
 
-import org.opends.admin.ads.SubtreeDeleteControl;
 import org.opends.guitools.controlpanel.ControlPanel;
 import org.opends.guitools.controlpanel.browser.IconPool;
 import org.opends.guitools.controlpanel.datamodel.ConfigReadException;
@@ -2073,12 +2072,6 @@
     }
   }
 
-  /**
-   * The OID of the delete subtree control.
-   */
-  public static final String SUBTREE_CTRL_OID =
-    (new SubtreeDeleteControl()).getID();
-
 
   /**
    * Sets the required icon to the provided label.

--
Gitblit v1.10.0