diff --git a/lucene/core/src/java/org/apache/lucene/util/SorterTemplate.java b/lucene/core/src/java/org/apache/lucene/util/SorterTemplate.java index 435b09ae59d..af877a9c00e 100644 --- a/lucene/core/src/java/org/apache/lucene/util/SorterTemplate.java +++ b/lucene/core/src/java/org/apache/lucene/util/SorterTemplate.java @@ -313,8 +313,8 @@ public abstract class SorterTemplate { } - /** Sorts using TimSort, see http://svn.python.org/projects/python/trunk/Objects/listsort.txt - * and http://svn.python.org/projects/python/trunk/Objects/listobject.c. + /** Sorts using TimSort, see + * also source code. * TimSort is a stable sorting algorithm based on MergeSort but known to * perform extremely well on partially-sorted inputs. * For small collections, falls back to {@link #binarySort(int, int)}. */ @@ -343,7 +343,8 @@ public abstract class SorterTemplate { merge(lo, mid, hi, mid - lo, hi - mid); } - private void merge(int lo, int pivot, int hi, int len1, int len2) { + // pkg-protected for access from TimSort class + void merge(int lo, int pivot, int hi, int len1, int len2) { if (len1 == 0 || len2 == 0) { return; }