From f134ef63e016bf13b70bef1ec277603b8a9a6f21 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Wed, 25 Apr 2012 11:06:50 +0000
Subject: [PATCH] Fix OPENDJ-474: Remove requirement for clients to deal with InterruptedExceptions in synchronous APIs
---
opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/ConnectionFactory.java | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/ConnectionFactory.java b/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/ConnectionFactory.java
index b5b1ccf..3be6d5c 100644
--- a/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/ConnectionFactory.java
+++ b/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/ConnectionFactory.java
@@ -22,7 +22,7 @@
*
*
* Copyright 2009-2010 Sun Microsystems, Inc.
- * Portions copyright 2011 ForgeRock AS.
+ * Portions copyright 2011-2012 ForgeRock AS.
*/
package org.forgerock.opendj.ldap;
@@ -68,13 +68,16 @@
* Returns a connection to the Directory Server associated with this
* connection factory. The connection returned by this method can be used
* immediately.
+ * <p>
+ * If the calling thread is interrupted while waiting for the connection
+ * attempt to complete then the calling thread unblock and throw a
+ * {@link CancelledResultException} whose cause is the underlying
+ * {@link InterruptedException}.
*
* @return A connection to the Directory Server associated with this
* connection factory.
* @throws ErrorResultException
* If the connection request failed for some reason.
- * @throws InterruptedException
- * If the current thread was interrupted while waiting.
*/
- Connection getConnection() throws ErrorResultException, InterruptedException;
+ Connection getConnection() throws ErrorResultException;
}
--
Gitblit v1.10.0