From 9c8493a28711aff83940445f42f923c587eea4f8 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 02 Sep 2013 14:57:25 +0000
Subject: [PATCH] OPENDJ-1116 Introduce abstraction for the changelog DB
---
opends/tests/unit-tests-testng/src/server/org/opends/server/plugins/ShortCircuitPlugin.java | 53 +++++++++++++++++++++++++++--------------------------
1 files changed, 27 insertions(+), 26 deletions(-)
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/plugins/ShortCircuitPlugin.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/plugins/ShortCircuitPlugin.java
index 016d9db..c6276e5 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/plugins/ShortCircuitPlugin.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/plugins/ShortCircuitPlugin.java
@@ -28,30 +28,27 @@
-import java.util.Set;
-import java.util.Map;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.concurrent.ConcurrentHashMap;
import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
-import org.opends.server.admin.std.server.PluginCfg;
-import org.opends.server.api.plugin.*;
-import org.opends.server.config.ConfigException;
-import org.opends.server.protocols.asn1.ASN1;
-import org.opends.server.protocols.asn1.ASN1Writer;
-import org.opends.server.protocols.asn1.ASN1Reader;
-import org.opends.server.types.ByteString;
-import org.opends.server.types.Control;
-import org.opends.server.types.DirectoryException;
-import org.opends.server.types.ResultCode;
-import org.opends.server.types.OperationType;
-import org.opends.server.types.operation.*;
-import org.opends.server.controls.ControlDecoder;
import org.opends.messages.Message;
+import org.opends.server.admin.std.server.PluginCfg;
+import org.opends.server.api.plugin.DirectoryServerPlugin;
+import org.opends.server.api.plugin.PluginResult;
+import org.opends.server.api.plugin.PluginType;
+import org.opends.server.config.ConfigException;
+import org.opends.server.controls.ControlDecoder;
+import org.opends.server.protocols.asn1.ASN1;
+import org.opends.server.protocols.asn1.ASN1Reader;
+import org.opends.server.protocols.asn1.ASN1Writer;
+import org.opends.server.types.*;
+import org.opends.server.types.operation.*;
-import static org.opends.server.protocols.asn1.ASN1Constants.
- UNIVERSAL_OCTET_STRING_TYPE;
+import static org.opends.server.protocols.asn1.ASN1Constants.*;
/**
@@ -85,6 +82,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public ShortCircuitRequestControl decode(boolean isCritical,
ByteString value)
throws DirectoryException
@@ -108,6 +106,7 @@
}
}
+ @Override
public String getOID()
{
return OID_SHORT_CIRCUIT_REQUEST;
@@ -126,12 +125,15 @@
private String section;
/**
- * Constructs a new change number control.
+ * Constructs a new control of this class.
*
- * @param isCritical Indicates whether support for this control should be
- * considered a critical part of the server processing.
- * @param resultCode The result code to return to the client.
- * @param section The section to use to determine when to short circuit.
+ * @param isCritical
+ * Indicates whether support for this control should be considered
+ * a critical part of the server processing.
+ * @param resultCode
+ * The result code to return to the client.
+ * @param section
+ * The section to use to determine when to short circuit.
*/
public ShortCircuitRequestControl(boolean isCritical, int resultCode,
String section)
@@ -647,7 +649,6 @@
{
ShortCircuitRequestControl control =
operation.getRequestControl(ShortCircuitRequestControl.DECODER);
-
if (control != null && section.equalsIgnoreCase(control.getSection()))
{
return control.resultCode;
--
Gitblit v1.10.0