core/src/main/java/com/orientechnologies/orient/core/index/OIndexChangesWrapper.java
@Override
  public Set<Map.Entry<Object, OIdentifiable>> toEntries() {
    if (source.isRebuilding())
      throwRebuildException();

    final Set<Map.Entry<Object, OIdentifiable>> entries = delegate.toEntries();

    if (source.getRebuildVersion() != indexRebuildVersion)
      throwRebuildException();

    return entries;
  }
@Override
  public Set<Map.Entry<Object, OIdentifiable>> toEntries() {
    if (source.isRebuilding())
      throwRebuildException();

    final Set<Map.Entry<Object, OIdentifiable>> entries = delegate.toEntries();

    if (source.getRebuildVersion() != indexRebuildVersion)
      throwRebuildException();

    return entries;
  }
{@inheritDoc}