Skip to content

org.jruby.RubyLoadError getCause returns itself #7861

@cstamas

Description

@cstamas

Seems some JRuby exceptions are (misusing) Throwable.getCause, by returning "this" instead null. Throwable.getCause should return some other instance, or null, never this. Moreover, this really smells like some method override in some Throwable that does not do like all throwables do:

public synchronized Throwable getCause() {
    return (cause==this ? null : cause);
}

For original report, see this:
https://issues.apache.org/jira/browse/MNG-7846

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions