Skip to content

Dead code in io.roach.data.jpa.RetryableTransactionAspect #11

@louispool

Description

@louispool

Hi guys,

Any reason why the following block of code exists at line 67 of io.roach.data.jpa.RetryableTransactionAspect?

Throwable t = ex.getUndeclaredThrowable();
while (t instanceof UndeclaredThrowableException) {
    t = ((UndeclaredThrowableException) t).getUndeclaredThrowable();
}

Looks like code that was written before Throwable.getCause() was introduced.

Link to line:
https://github.com/cockroachlabs/roach-data/blob/7a0c18bde7996fb8a556109b733629caacdd6267/roach-data-jpa/src/main/java/io/roach/data/jpa/RetryableTransactionAspect.java#L67C17-L67C17

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions