From 89b548f1b79335af2dc6b409fb4829ed03d22076 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Thu, 29 Aug 2013 20:14:33 +0000
Subject: [PATCH] Back-port fix OPENDJ-1124: Connection.search() return value not mockable
---
opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldif/ConnectionEntryReader.java | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldif/ConnectionEntryReader.java b/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldif/ConnectionEntryReader.java
index d1fa617..fdfcf4d 100644
--- a/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldif/ConnectionEntryReader.java
+++ b/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldif/ConnectionEntryReader.java
@@ -22,7 +22,7 @@
*
*
* Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2011-2012 ForgeRock AS.
+ * Portions copyright 2011-2013 ForgeRock AS.
*/
package org.forgerock.opendj.ldif;
@@ -97,8 +97,16 @@
* reader.close();
* }
* </pre>
+ *
+ * <b>NOTE:</b> although this class is non-final, sub-classing is not supported
+ * except when creating mock objects for unit tests. This class has been
+ * selected specifically because it is the only aspect of the {@code Connection}
+ * interface which is not mockable.
*/
-public final class ConnectionEntryReader implements EntryReader {
+public class ConnectionEntryReader implements EntryReader {
+ /*
+ * See OPENDJ-1124 for more discussion about why this class is non-final.
+ */
/**
* Result handler that places all responses in a queue.
--
Gitblit v1.10.0