Skip to content
This repository was archived by the owner on Feb 23, 2018. It is now read-only.

Fix findItemByIndex in case of hash collisions #9

Merged
merged 1 commit into from
Jul 28, 2015

Conversation

lrytz
Copy link
Member

@lrytz lrytz commented Jul 16, 2015

The method findItemByIndex only looked at the first item in each
bucket of the items hash table.

Also, in case the item was not found, the counter i would be at
items.length, therefore the access items[i] crashed with an
ArrayIndexOutOfBoundsException.

Fixes the issue scala/scala-asm#8.

The method `findItemByIndex` only looked at the first item in each
bucket of the `items` hash table.

Also, in case the item was not found, the counter `i` would be at
`items.length`, therefore the access `items[i]` crashed with an
ArrayIndexOutOfBoundsException.

Fixes the issue scala/scala-asm#8.
@lrytz
Copy link
Member Author

lrytz commented Jul 17, 2015

review by @adriaanm (original author of the patch lrytz/scala@34e3220)

@retronym
Copy link
Member

LGTM

lrytz added a commit that referenced this pull request Jul 28, 2015
Fix findItemByIndex in case of hash collisions
@lrytz lrytz merged commit e7851a4 into scala:master Jul 28, 2015
@lrytz lrytz deleted the findItem branch September 9, 2015 10:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants