# java.lang.ArrayIndexOutOfBoundsException: -1 in ImmutableIntArrayDocIdSet

## Description

Please see attached patch for the error and suggested fix for the following exception:

None

## Activity

Show:
hao yan
July 5, 2012, 5:35 PM

Pawel, Thanks for catching this! I am in the middle of investigating it.

Pawel Krol
July 9, 2012, 7:34 AM

Excellent! Thank you very much for such a quick reaction!

hao yan
July 9, 2012, 7:11 PM

Hi, Pawei

I just fixed it as your patch suggested. Yes, you are absolutely right. Thanks for catching this bug. Fortunately, the ImmutableIntArrayDocIdSet class is not being used by PForDelta. Therefore, it should not affect important things!

thanks again!

hao

hao yan
July 9, 2012, 8:12 PM

This has been fixed as Pawel suggested in his patch! In particular, in immutableIntArryDocIDSet's advance(target) function, replace:
if (index > 0)
with
if (index >= 0)

Pawel Krol
July 13, 2012, 12:29 PM

Thank you very much for applying the fix immediately and thank you for this excellent piece of software you have developed! Thanks!

hao yan

Pawel Krol

None

Major
Configure