Let's make this member final!

I vaguely remember this was tried before and it was ... difficult?  But I
could not find that past attempt!  Maybe it was just a horrible nightmare.

Mike

On Thu, Jul 22, 2021 at 12:36 PM Michael Sokolov <[email protected]> wrote:

> We encountered a very rare strange bug (looks like it must be a JVM
> bug) where we have a Scorer.docid() method like this:
>
>   if (curDocIdx >= topDocs.scoreDocs.length) {
>      return NO_MORE_DOCS;
>    }
>    return topDocs.scoreDocs[curDocIdx].doc;
>
> And this was very rarely, not reproducibly, but repeatedly raising
> ArrayIndexOutOfBoundsException!
>
> It made us notice that topDocs.scoreDocs is not final, which maybe
> would have prevented this. Is there any reason why we would not make
> this member final?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
> --
Mike McCandless

http://blog.mikemccandless.com

Reply via email to