Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ObjectLockingIndexedCollection's StripedLock does not handle negative hashcodes #35

Open
GoogleCodeExporter opened this issue May 13, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Create a class that overrides hashCode method and produces a negative hash 
code.

2. Create an indexed collection of the class created in step 1 that is backed 
by an ObjectLockingIndexedCollection.

3. Attempt to add an instance of the test class to the collection.

What is the expected output? What do you see instead?
Expected: object added to collection.
Instead: ArrayIndexOutOfBoundsException

What version of the product are you using? On what operating system?
1.2.6, Windows 7 Enterprise


Please provide any additional information below.
The StripedLock class needs to account for negative hash code values to avoid 
indexing into the array of locks with a negative index value.

Original issue reported on code.google.com by mbje...@gmail.com on 7 Apr 2014 at 9:59

@GoogleCodeExporter
Copy link
Author

Thanks for reporting this.

It's now fixed, and the fix is in CQEngine 1.2.7. It should sync to Maven 
central in the next few hours.

Original comment by ni...@npgall.com on 7 Apr 2014 at 10:23

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant