lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 9454] - PriorityQueue.clear() does not set last element to null
Date Wed, 05 Jun 2002 01:52:43 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9454>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9454

PriorityQueue.clear() does not set last element to null

otis@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From otis@apache.org  2002-06-05 01:52 -------
You are right.  The heap actually puts the first element at heap[1] and not
heap[0] like I thought, so the for loop in the clear() method had to be changed to:

public final void clear() {
    for (int i = 0; i <= size; i++)
      heap[i] = null;
    size = 0;
}

Thanks for the report.

--
To unsubscribe, e-mail:   <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>


Mime
View raw message