From 716ff091f474a7694027a26eb6f82828d5d71b02 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 08 Dec 2014 14:16:51 +0000
Subject: [PATCH] Index.java, NullIndex.java, AttributeIndex.java: Removed unnecessary and incorrect return types.

---
 opendj3-server-dev/src/server/org/opends/server/backends/jeb/Index.java |   23 ++++-------------------
 1 files changed, 4 insertions(+), 19 deletions(-)

diff --git a/opendj3-server-dev/src/server/org/opends/server/backends/jeb/Index.java b/opendj3-server-dev/src/server/org/opends/server/backends/jeb/Index.java
index 6bcc52d..f8a318a 100644
--- a/opendj3-server-dev/src/server/org/opends/server/backends/jeb/Index.java
+++ b/opendj3-server-dev/src/server/org/opends/server/backends/jeb/Index.java
@@ -166,14 +166,10 @@
    * @param buffer The index buffer to insert the ID into.
    * @param keyBytes         The index key bytes.
    * @param entryID     The entry ID.
-   * @return True if the entry ID is inserted or ignored because the entry limit
-   *         count is exceeded. False if it already exists in the entry ID set
-   *         for the given key.
    */
-  public boolean insertID(IndexBuffer buffer, ByteString keyBytes, EntryID entryID)
+  public void insertID(IndexBuffer buffer, ByteString keyBytes, EntryID entryID)
   {
     getBufferedIndexValues(buffer, keyBytes).addEntryID(keyBytes, entryID);
-    return true;
   }
 
   private void deleteKey(DatabaseEntry key, ImportIDSet importIdSet, DatabaseEntry data) throws DatabaseException {
@@ -458,14 +454,10 @@
    * @param buffer The index buffer to insert the ID into.
    * @param keyBytes    The index key bytes.
    * @param entryID     The entry ID.
-   * @return True if the entry ID is inserted or ignored because the entry limit
-   *         count is exceeded. False if it already exists in the entry ID set
-   *         for the given key.
    */
-  public boolean removeID(IndexBuffer buffer, ByteString keyBytes, EntryID entryID)
+  public void removeID(IndexBuffer buffer, ByteString keyBytes, EntryID entryID)
   {
     getBufferedIndexValues(buffer, keyBytes).deleteEntryID(keyBytes, entryID);
-    return true;
   }
 
   private void logIndexCorruptError(Transaction txn, DatabaseEntry key)
@@ -754,26 +746,19 @@
    * @param entryID     The entry ID.
    * @param entry       The entry to be indexed.
    * @param options     The indexing options to use
-   * @return True if all the indexType keys for the entry are added. False if
-   *         the entry ID already exists for some keys.
    * @throws DatabaseException If an error occurs in the JE database.
    * @throws DirectoryException If a Directory Server error occurs.
    */
-  public boolean addEntry(IndexBuffer buffer, EntryID entryID, Entry entry,
+  public void addEntry(IndexBuffer buffer, EntryID entryID, Entry entry,
       IndexingOptions options) throws DatabaseException, DirectoryException
   {
     HashSet<ByteString> addKeys = new HashSet<ByteString>();
     indexer.indexEntry(entry, addKeys, options);
 
-    boolean success = true;
     for (ByteString keyBytes : addKeys)
     {
-      if(!insertID(buffer, keyBytes, entryID))
-      {
-        success = false;
-      }
+      insertID(buffer, keyBytes, entryID);
     }
-    return success;
   }
 
   /**

--
Gitblit v1.10.0