nachetecanon / google-enterprise-connector-manager

Automatically exported from code.google.com/p/google-enterprise-connector-manager
Apache License 2.0
0 stars 0 forks source link

RepositoryException overrides getCause but not initCause #224

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
Fixed in revision 2527.

Original comment by jla...@google.com on 27 Jun 2010 at 6:37

GoogleCodeExporter commented 8 years ago

Original comment by jla...@google.com on 9 Dec 2010 at 10:18