- 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:
Otis Gospodnetic 2002-06-05 01:46:39 +00:00
parent abefb1b48e
commit a7bd647dd6
1 changed files with 7 additions and 7 deletions

View File

@ -120,7 +120,7 @@ public abstract class PriorityQueue {
/** Removes all entries from the PriorityQueue. */
public final void clear() {
for (int i = 0; i < size; i++)
for (int i = 0; i <= size; i++)
heap[i] = null;
size = 0;
}