PathFacetCountCollector.ensureCapacity throws IndexOutOfBounds exception

Description

The System.arraycopy calls in the PathFacetCountCollector.ensureCapacity method is wrong. The way it is today, it will not copy the source array in the destination array at all and it will throw an IndexOutOfBounds all the time when increasing the size of the array

It reads:
System.arraycopy(oldData, 0, _stringData, Math.min(oldData.length, newCapacity), newCapacity);

It should read:
System.arraycopy(oldData, 0, _stringData, 0, Math.min(oldData.length, newCapacity));

Environment

None

Activity

Show:
John Wang
May 17, 2013, 7:17 PM

Hi Francois:

Good catch!

We have moved jira hosting for bobo. I have clone the ticket here: https://senseidb.atlassian.net/browse/BOBO-275

-John

Assignee

John Wang

Reporter

Francois Rochette

Labels

Time tracking

24h

Affects versions

Priority

Major
Configure