From 2e5dfe551bd5dad6aa08a45acd0f97e48f11fb46 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Mon, 06 Jun 2011 14:49:01 +0000
Subject: [PATCH] Make NO_OPERATION result code non-exceptional, and add additional documentation to the isExceptional method describing exactly which result codes are not error results.
---
opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/ResultCode.java | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/ResultCode.java b/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/ResultCode.java
index dc05ce7..431448e 100644
--- a/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/ResultCode.java
+++ b/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/ResultCode.java
@@ -554,7 +554,7 @@
* processing on the associated operation because the request included the
* LDAP No-Op control.
*/
- public static final ResultCode NO_OPERATION = registerErrorResultCode(16654,
+ public static final ResultCode NO_OPERATION = registerSuccessResultCode(16654,
INFO_RESULT_NO_OPERATION.get());
@@ -720,10 +720,19 @@
/**
- * Indicates whether or not this result code represents an error result. In
- * order to make it easier for application to detect referrals, the {@code
- * REFERRAL} result code is treated as an error result (the LDAP RFCs treat
- * referrals as a success response).
+ * Indicates whether or not this result code represents an error result.
+ * <p>
+ * The following result codes are NOT interpreted as error results:
+ * <ul>
+ * <li>{@link #SUCCESS}
+ * <li>{@link #COMPARE_FALSE}
+ * <li>{@link #COMPARE_TRUE}
+ * <li>{@link #SASL_BIND_IN_PROGRESS}
+ * <li>{@link #NO_OPERATION}
+ * </ul>
+ * In order to make it easier for application to detect referrals, the
+ * {@link #REFERRAL} result code is interpreted as an error result (the LDAP
+ * RFCs treat referrals as a success response).
*
* @return {@code true} if this result code represents an error result,
* otherwise {@code false}.
--
Gitblit v1.10.0