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

FIX corner-case of bean browser failing due to an exception from hashCode() #95

Merged
merged 1 commit into from
Oct 4, 2014

Conversation

kngenie
Copy link
Member

@kngenie kngenie commented Sep 11, 2014

I know this is a corner-case, but when a bean exposes an object as a property whose hashCode() method can fail, it kills entire bean browser. For example, with an ArrayList being changed at high frequency, its hashCode() can throw ConcurrentModificationExcpetion.

Doing object-identity based test for alreadyWritten will fix it, but I don't know the good way to implement it (there's System.identityHashCode(Object), but there's no real guarantee for uniqueness). For now, this patch simply catches exceptions from hashCode() and assumes it's never seen before.

nlevitt added a commit that referenced this pull request Oct 4, 2014
FIX corner-case of bean browser failing due to an exception from hashCode()
@nlevitt nlevitt merged commit 5f7dc49 into internetarchive:master Oct 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants