From 98a5df3565beaa1999020a16fcb5338d13d5b50f Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Tue, 26 Aug 2014 08:11:29 +0000
Subject: [PATCH] Removed useless getChangeNumber() and setChangeNumber methods from *Operation interfaces. These methods are useless because setChangeNumber() is never set inside production code, so changeNumber is always equal to -1 for all the update operations. In addition it is very unlikely the ChangeNumberIndexer could have computed the changeNumber before a results are sent to a persistent search.

---
 opends/src/server/org/opends/server/core/ModifyOperation.java |   41 +++++++++++------------------------------
 1 files changed, 11 insertions(+), 30 deletions(-)

diff --git a/opends/src/server/org/opends/server/core/ModifyOperation.java b/opends/src/server/org/opends/server/core/ModifyOperation.java
index 150393b..ba92ea3 100644
--- a/opends/src/server/org/opends/server/core/ModifyOperation.java
+++ b/opends/src/server/org/opends/server/core/ModifyOperation.java
@@ -22,6 +22,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions copyright 2014 ForgeRock AS
  */
 package org.opends.server.core;
 
@@ -42,7 +43,7 @@
    *
    * @return  The raw, unprocessed entry DN as included in the client request.
    */
-  public abstract ByteString getRawEntryDN();
+  ByteString getRawEntryDN();
 
   /**
    * Specifies the raw, unprocessed entry DN as included in the client request.
@@ -51,7 +52,7 @@
    * @param  rawEntryDN  The raw, unprocessed entry DN as included in the client
    *                     request.
    */
-  public abstract void setRawEntryDN(ByteString rawEntryDN);
+  void setRawEntryDN(ByteString rawEntryDN);
 
   /**
    * Retrieves the DN of the entry to modify.  This should not be called by
@@ -61,7 +62,7 @@
    * @return  The DN of the entry to modify, or <CODE>null</CODE> if the raw
    *          entry DN has not yet been processed.
    */
-  public abstract DN getEntryDN();
+  DN getEntryDN();
 
   /**
    * Retrieves the set of raw, unprocessed modifications as included in the
@@ -72,7 +73,7 @@
    * @return  The set of raw, unprocessed modifications as included in the
    *          client request.
    */
-  public abstract List<RawModification> getRawModifications();
+  List<RawModification> getRawModifications();
 
   /**
    * Adds the provided modification to the set of raw modifications for this
@@ -81,15 +82,14 @@
    * @param  rawModification  The modification to add to the set of raw
    *                          modifications for this modify operation.
    */
-  public abstract void addRawModification(RawModification rawModification);
+  void addRawModification(RawModification rawModification);
 
   /**
    * Specifies the raw modifications for this modify operation.
    *
    * @param  rawModifications  The raw modifications for this modify operation.
    */
-  public abstract void setRawModifications(
-      List<RawModification> rawModifications);
+  void setRawModifications(List<RawModification> rawModifications);
 
   /**
    * Retrieves the set of modifications for this modify operation.  Its contents
@@ -99,7 +99,7 @@
    *          <CODE>null</CODE> if the modifications have not yet been
    *          processed.
    */
-  public abstract List<Modification> getModifications();
+  List<Modification> getModifications();
 
   /**
    * Adds the provided modification to the set of modifications to this modify
@@ -111,26 +111,7 @@
    * @throws  DirectoryException  If an unexpected problem occurs while applying
    *                              the modification to the entry.
    */
-  public abstract void addModification(Modification modification)
-      throws DirectoryException;
-
-  /**
-   * Retrieves the change number that has been assigned to this operation.
-   *
-   * @return  The change number that has been assigned to this operation, or -1
-   *          if none has been assigned yet or if there is no applicable
-   *          synchronization mechanism in place that uses change numbers.
-   */
-  public abstract long getChangeNumber();
-
-  /**
-   * Specifies the change number that has been assigned to this operation by the
-   * synchronization mechanism.
-   *
-   * @param  changeNumber  The change number that has been assigned to this
-   *                       operation by the synchronization mechanism.
-   */
-  public abstract void setChangeNumber(long changeNumber);
+  void addModification(Modification modification) throws DirectoryException;
 
   /**
    * Retrieves the proxied authorization DN for this operation if proxied
@@ -140,7 +121,7 @@
    *          authorization has been requested, or {@code null} if proxied
    *          authorization has not been requested.
    */
-  public abstract DN getProxiedAuthorizationDN();
+  DN getProxiedAuthorizationDN();
 
   /**
    * Set the proxied authorization DN for this operation if proxied
@@ -151,6 +132,6 @@
    *          authorization has been requested, or {@code null} if proxied
    *          authorization has not been requested.
    */
-  public abstract void setProxiedAuthorizationDN(DN proxiedAuthorizationDN);
+  void setProxiedAuthorizationDN(DN proxiedAuthorizationDN);
 
 }

--
Gitblit v1.10.0