From 376189cf767a3455899fcb8e3fed243a10c43d72 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Tue, 26 Mar 2013 16:57:29 +0000
Subject: [PATCH] OPENDJ-832 Leverage the work queue for processing requests received on the HTTP connection handler
---
opendj-sdk/opends/src/server/org/opends/server/replication/protocol/ModifyDNMsg.java | 28 ++++++++--------------------
1 files changed, 8 insertions(+), 20 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/replication/protocol/ModifyDNMsg.java b/opendj-sdk/opends/src/server/org/opends/server/replication/protocol/ModifyDNMsg.java
index 46a9887..2b7a27b 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/replication/protocol/ModifyDNMsg.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/replication/protocol/ModifyDNMsg.java
@@ -23,7 +23,7 @@
*
*
* Copyright 2006-2010 Sun Microsystems, Inc.
- * Portions Copyright 2011-2012 ForgeRock AS
+ * Portions Copyright 2011-2013 ForgeRock AS
*/
package org.opends.server.replication.protocol;
@@ -37,12 +37,12 @@
import org.opends.server.protocols.asn1.ASN1Exception;
import org.opends.server.protocols.internal.InternalClientConnection;
import org.opends.server.replication.common.ChangeNumber;
-import org.opends.server.types.AbstractOperation;
import org.opends.server.types.ByteString;
import org.opends.server.types.DN;
import org.opends.server.types.DirectoryException;
import org.opends.server.types.LDAPException;
import org.opends.server.types.Modification;
+import org.opends.server.types.Operation;
import org.opends.server.types.RDN;
import org.opends.server.types.operation.PostOperationModifyDNOperation;
@@ -165,9 +165,8 @@
* {@inheritDoc}
*/
@Override
- public AbstractOperation createOperation(
- InternalClientConnection connection, String newDn)
- throws LDAPException, ASN1Exception
+ public Operation createOperation(InternalClientConnection connection,
+ String newDn) throws LDAPException, ASN1Exception
{
ModifyDNOperationBasis moddn = new ModifyDNOperationBasis(connection,
InternalClientConnection.nextOperationID(),
@@ -328,6 +327,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public byte[] getBytes_V45(short reqProtocolVersion)
throws UnsupportedEncodingException
{
@@ -707,11 +707,7 @@
try
{
DN newDN = computeNewDN();
-
- if (newDN.isAncestorOf(targetDn))
- return true;
- else
- return false;
+ return newDN.isAncestorOf(targetDn);
} catch (DirectoryException e)
{
// The DN was not a correct DN, and therefore does not a parent of the
@@ -734,11 +730,7 @@
try
{
DN newDN = computeNewDN();
-
- if (newDN.equals(targetDN))
- return true;
- else
- return false;
+ return newDN.equals(targetDN);
} catch (DirectoryException e)
{
// The DN was not a correct DN, and therefore does not match the
@@ -761,11 +753,7 @@
try
{
DN newSuperiorDN = DN.decode(newSuperior);
-
- if (newSuperiorDN.equals(targetDN))
- return true;
- else
- return false;
+ return newSuperiorDN.equals(targetDN);
} catch (DirectoryException e)
{
// The newsuperior was not a correct DN, and therefore does not match the
--
Gitblit v1.10.0