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/AbstractConnectionFactory.java |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/sdk/src/org/opends/sdk/AbstractConnectionFactory.java b/sdk/src/org/opends/sdk/AbstractConnectionFactory.java
index 93fb7c4..ea77f1a 100644
--- a/sdk/src/org/opends/sdk/AbstractConnectionFactory.java
+++ b/sdk/src/org/opends/sdk/AbstractConnectionFactory.java
@@ -59,8 +59,8 @@
   /**
    * {@inheritDoc}
    */
-  public abstract <P> ConnectionFuture<? extends C> getAsynchronousConnection(
-      ConnectionResultHandler<? super C, P> handler, P p);
+  public abstract ConnectionFuture<? extends C> getAsynchronousConnection(
+      ConnectionResultHandler<? super C> handler);
 
 
 
@@ -104,8 +104,7 @@
   protected final C blockingGetAsynchronousConnection()
       throws ErrorResultException
   {
-    ConnectionFuture<? extends C> future =
-        getAsynchronousConnection(null, null);
+    ConnectionFuture<? extends C> future = getAsynchronousConnection(null);
     try
     {
       return future.get();
@@ -115,10 +114,9 @@
       // Cancel the request if possible.
       future.cancel(false);
 
-      Result result =
-          Responses.newResult(ResultCode.CLIENT_SIDE_CONNECT_ERROR)
-              .setCause(e)
-              .setDiagnosticMessage(e.getLocalizedMessage());
+      Result result = Responses.newResult(
+          ResultCode.CLIENT_SIDE_CONNECT_ERROR).setCause(e)
+          .setDiagnosticMessage(e.getLocalizedMessage());
       throw ErrorResultException.wrap(result);
     }
   }

--
Gitblit v1.10.0