From a415256cc798baf286d618a2c9ddd427c26a518d Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Mon, 14 Dec 2009 13:21:39 +0000
Subject: [PATCH] Remove optional P parameter from result handlers as it is hardly ever needed in practice and just pollutes the APIs.

---
 sdk/src/org/opends/sdk/RootDSE.java |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/sdk/src/org/opends/sdk/RootDSE.java b/sdk/src/org/opends/sdk/RootDSE.java
index d9b579f..1a32f78 100644
--- a/sdk/src/org/opends/sdk/RootDSE.java
+++ b/sdk/src/org/opends/sdk/RootDSE.java
@@ -140,9 +140,6 @@
    * request will fail with an {@link EntryNotFoundException}. More
    * specifically, the returned future will never return {@code null}.
    *
-   * @param <P>
-   *          The type of the additional parameter to the handler's
-   *          methods.
    * @param connection
    *          A connection to the Directory Server whose Root DSE is to
    *          be read.
@@ -150,8 +147,6 @@
    *          A result handler which can be used to asynchronously
    *          process the operation result when it is received, may be
    *          {@code null}.
-   * @param p
-   *          Optional additional handler parameter.
    * @return A future representing the result of the operation.
    * @throws UnsupportedOperationException
    *           If the connection does not support search operations.
@@ -161,14 +156,14 @@
    * @throws NullPointerException
    *           If the {@code connection} was {@code null}.
    */
-  public static <P> ResultFuture<RootDSE> readRootDSE(
+  public static ResultFuture<RootDSE> readRootDSE(
       AsynchronousConnection connection,
-      ResultHandler<RootDSE, P> handler, P p)
+      ResultHandler<RootDSE> handler)
       throws UnsupportedOperationException, IllegalStateException,
       NullPointerException
   {
-    final ResultTransformer<SearchResultEntry, RootDSE, P> future =
-      new ResultTransformer<SearchResultEntry, RootDSE, P>(handler)
+    final ResultTransformer<SearchResultEntry, RootDSE> future =
+      new ResultTransformer<SearchResultEntry, RootDSE>(handler)
     {
 
       protected RootDSE transformResult(SearchResultEntry result)
@@ -180,7 +175,7 @@
     };
 
     ResultFuture<SearchResultEntry> innerFuture = connection
-        .searchSingleEntry(SEARCH_REQUEST, future, p);
+        .searchSingleEntry(SEARCH_REQUEST, future);
     future.setResultFuture(innerFuture);
     return future;
   }

--
Gitblit v1.10.0