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/SynchronousConnection.java |   27 +++++++++++----------------
 1 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/sdk/src/org/opends/sdk/SynchronousConnection.java b/sdk/src/org/opends/sdk/SynchronousConnection.java
index 3ebef74..87caee7 100644
--- a/sdk/src/org/opends/sdk/SynchronousConnection.java
+++ b/sdk/src/org/opends/sdk/SynchronousConnection.java
@@ -74,7 +74,7 @@
       InterruptedException, UnsupportedOperationException,
       IllegalStateException, NullPointerException
   {
-    ResultFuture<Result> future = connection.add(request, null, null);
+    ResultFuture<Result> future = connection.add(request, null);
     try
     {
       return future.get();
@@ -102,8 +102,7 @@
       UnsupportedOperationException, IllegalStateException,
       NullPointerException
   {
-    ResultFuture<BindResult> future = connection.bind(request, null,
-        null);
+    ResultFuture<BindResult> future = connection.bind(request, null);
     try
     {
       return future.get();
@@ -138,7 +137,7 @@
       NullPointerException
   {
     ResultFuture<CompareResult> future = connection.compare(request,
-        null, null);
+        null);
     try
     {
       return future.get();
@@ -157,8 +156,7 @@
       UnsupportedOperationException, IllegalStateException,
       NullPointerException
   {
-    ResultFuture<Result> future = connection
-        .delete(request, null, null);
+    ResultFuture<Result> future = connection.delete(request, null);
     try
     {
       return future.get();
@@ -177,8 +175,7 @@
       UnsupportedOperationException, IllegalStateException,
       NullPointerException
   {
-    ResultFuture<R> future = connection.extendedRequest(request, null,
-        null);
+    ResultFuture<R> future = connection.extendedRequest(request, null);
     try
     {
       return future.get();
@@ -197,8 +194,7 @@
       UnsupportedOperationException, IllegalStateException,
       NullPointerException
   {
-    ResultFuture<Result> future = connection
-        .modify(request, null, null);
+    ResultFuture<Result> future = connection.modify(request, null);
     try
     {
       return future.get();
@@ -217,8 +213,7 @@
       UnsupportedOperationException, IllegalStateException,
       NullPointerException
   {
-    ResultFuture<Result> future = connection.modifyDN(request, null,
-        null);
+    ResultFuture<Result> future = connection.modifyDN(request, null);
     try
     {
       return future.get();
@@ -243,13 +238,13 @@
   /**
    * {@inheritDoc}
    */
-  public <P> Result search(SearchRequest request,
-      SearchResultHandler<P> handler, P p) throws ErrorResultException,
+  public Result search(SearchRequest request,
+      SearchResultHandler handler) throws ErrorResultException,
       InterruptedException, UnsupportedOperationException,
       IllegalStateException, NullPointerException
   {
     ResultFuture<Result> future = connection.search(request, null,
-        handler, p);
+        handler);
     try
     {
       return future.get();
@@ -281,7 +276,7 @@
       UnsupportedOperationException, IllegalStateException
   {
     ResultFuture<Schema> future = connection.readSchemaForEntry(name,
-        null, null);
+        null);
     try
     {
       return future.get();

--
Gitblit v1.10.0