Throwable.initCause should return 'this'

This commit is contained in:
Joel Dice 2008-01-03 10:08:33 -07:00
parent df20ce92f7
commit 86704591e7

View File

@ -31,9 +31,10 @@ public class Throwable {
return cause;
}
public void initCause(Throwable e) {
public Throwable initCause(Throwable e) {
if (cause == null) {
cause = e;
return this;
} else {
throw new IllegalStateException();
}