bigqueue icon indicating copy to clipboard operation
bigqueue copied to clipboard

IBigQueue.applyForEach does not work

Open pshterev opened this issue 2 years ago • 0 comments

IBigQueue.applyForEach does not work - my iterator is never called with any element. No errors are thrown it just behaves as if the queue is empty which is definitely not - I tried queue and dequeue items also print the size and isEmpty just before applyForEach. I think the problem is here:

for (long i = index; i < this.innerArray.size(); i++) { iterator.forEach(this.innerArray.get(i)); }

and more specifically it seems that innerArray.size() could return a negative value. I see it's not used on other places to maybe IBigArray.size() is faulty.

pshterev avatar Feb 22 '23 09:02 pshterev