Skip to content

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

Merged
nlevitt merged 1 commit intointernetarchive:masterfrom
kngenie:patch-beanbrowser-failure
Oct 4, 2014
Merged

FIX corner-case of bean browser failing due to an exception from hashCode()#95
nlevitt merged 1 commit intointernetarchive:masterfrom
kngenie:patch-beanbrowser-failure

Conversation

@kngenie
Copy link
Copy Markdown
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