mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
07.56.2015 db93ec4b30becada5f744e1ab625edbd9129a570
Code cleanup
1 files modified
23 ■■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/VLVIndex.java 23 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/VLVIndex.java
@@ -568,20 +568,12 @@
      }
      else
      {
        /*
         * Treat an non-matching assertion as matching beyond the end of the index.
         */
        // Treat a non-matching assertion as matching beyond the end of the index.
        targetPosition = currentCount;
      }
      searchOperation.addResponseControl(new VLVResponseControl(targetPosition + 1, currentCount,
          LDAPResultCode.SUCCESS));
      final long[] result = new long[selectedIDs.size()];
      int i = 0;
      for (Long entryID : selectedIDs)
      {
        result[i++] = entryID;
      }
      return newDefinedSet(result);
      return newDefinedSet(toPrimitiveLongArray(selectedIDs));
    }
    finally
    {
@@ -589,6 +581,17 @@
    }
  }
  private long[] toPrimitiveLongArray(final List<Long> entryIDs)
  {
    final long[] result = new long[entryIDs.size()];
    int i = 0;
    for (Long entryID : entryIDs)
    {
      result[i++] = entryID;
    }
    return result;
  }
  /**
   * Normalize the assertion using the primary key's ordering matching rule.
   */