Move comment of PaginatingSource.read()
Move the comment about restarting the DataSource for back filling
results skipped for visibility. The comment in fact is valid for
any PaginationType specified.
Adress the comment in change 413358 [1].
[1]: https://gerrit-review.googlesource.com/c/gerrit/+/413358/comment/d7a90bb0_0f8ebc9f/
Release-Notes: skip
Change-Id: I9826b8be4005a946c7952ae89eb81f8c191997e3
diff --git a/java/com/google/gerrit/index/query/PaginatingSource.java b/java/com/google/gerrit/index/query/PaginatingSource.java
index 8847005..9ec64e6 100644
--- a/java/com/google/gerrit/index/query/PaginatingSource.java
+++ b/java/com/google/gerrit/index/query/PaginatingSource.java
@@ -67,14 +67,14 @@
}
if (last != null && source instanceof Paginated) {
+ // Restart source and continue if we have not filled the
+ // full limit the caller wants.
+ //
// TODO: this fix is only for the stable branches and the real refactoring would be to
// restore the logic
// for the filtering in AndSource (L58 - 64) as per
// https://gerrit-review.googlesource.com/c/gerrit/+/345634/9
if (!indexConfig.paginationType().equals(PaginationType.NONE)) {
- // Restart source and continue if we have not filled the
- // full limit the caller wants.
- //
@SuppressWarnings("unchecked")
Paginated<T> p = (Paginated<T>) source;
QueryOptions opts = p.getOptions();