private static int recursiveHashCode(ThrowableInfo instance, IdentityHashMap<ThrowableInfo, Object> dejaVu)
{
if(instance == null)
{
return 0;
}
if(dejaVu.containsKey(instance))
{
return 0;
}
dejaVu.put(instance, null);
int result = instance.getOmittedElements();
String name = instance.getName();
result = 29 * result + (name != null ? name.hashCode() : 0);
String message = instance.getMessage();
result = 29 * result + (message != null ? message.hashCode() : 0);
ThrowableInfo cause = instance.getCause();
result = 29 * result + recursiveHashCode(cause, dejaVu);
ThrowableInfo[] suppressed = instance.getSuppressed();
if(suppressed != null)
{
for (ThrowableInfo throwableInfo : suppressed)
{
result = 29 * result + recursiveHashCode(throwableInfo, dejaVu);
}
}
return result;
}