List of usage examples for java.lang Throwable equals
public boolean equals(Object obj)
From source file:org.openstreetmap.josm.tools.Utils.java
/** * Returns the root cause of a throwable object. * @param t The object to get root cause for * @return the root cause of {@code t}/* w ww .ja va 2s . c o m*/ * @since 6639 */ public static Throwable getRootCause(Throwable t) { Throwable result = t; if (result != null) { Throwable cause = result.getCause(); while (cause != null && !cause.equals(result)) { result = cause; cause = result.getCause(); } } return result; }