mirror of https://github.com/apache/lucene.git
- Fixed clear() method that wasn't setting the very last heap element to null,
as reported at http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9454. PR: 9454 Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@149767 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
abefb1b48e
commit
a7bd647dd6
|
@ -120,7 +120,7 @@ public abstract class PriorityQueue {
|
||||||
|
|
||||||
/** Removes all entries from the PriorityQueue. */
|
/** Removes all entries from the PriorityQueue. */
|
||||||
public final void clear() {
|
public final void clear() {
|
||||||
for (int i = 0; i < size; i++)
|
for (int i = 0; i <= size; i++)
|
||||||
heap[i] = null;
|
heap[i] = null;
|
||||||
size = 0;
|
size = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue