What steps will reproduce the problem?
Throwable cause = new Exception("root cause");
Throwable t = new RepositoryException();
t.initCause(cause);
return t.getCause();
What is the expected output? What do you see instead?
This code should return the value of "cause", but instead it returns null. The
getCause method only returns a cause passed to the constructor, and not a cause
passed to initCause. This is because the constructors and getCause use a local
field, but initCause is not overridden and returns the null cause from the
super class.
Please use labels and text to provide additional information.
Original issue reported on code.google.com by jla...@google.com on 25 Jun 2010 at 7:21
Original issue reported on code.google.com by
jla...@google.com
on 25 Jun 2010 at 7:21