public FeatureDiffReaderImpl getDifferences(
      String fromVersion, String toVersion, Filter filter, String[] userIds) throws IOException {
    if (filter == null) filter = Filter.INCLUDE;

    RevisionInfo r1 = new RevisionInfo(fromVersion);
    RevisionInfo r2 = new RevisionInfo(toVersion);

    // gather modified ids
    ModifiedFeatureIds mfids =
        store.getModifiedFeatureFIDs(
            schema.getTypeName(), fromVersion, toVersion, filter, userIds, getTransaction());

    // build all the filters to gather created, deleted and modified features at the appropriate
    // revisions, depending also on wheter creation/deletion should be swapped or not
    FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
    VersionedFIDMapper mapper = (VersionedFIDMapper) store.getFIDMapper(schema.getTypeName());

    return new FeatureDiffReaderImpl(store, getTransaction(), schema, r1, r2, mapper, mfids);
  }