Issue Details (XML | Word | Printable)

Key: BATCH-545
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Robert Kasanicky
Reporter: Robert Kasanicky
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Spring Batch

RetryTemplate swallows Throwables that are not Exception or Error

Created: 02/Apr/08 08:26 AM   Updated: 07/Aug/08 10:07 AM
Component/s: Infrastructure
Affects Version/s: 1.0.0
Fix Version/s: 1.0.1

Time Tracking:
Not Specified


 Description  « Hide
The following code is missing an else clause that would rethrow unclassified throwable as RetryException perhaps:

private static void unwrapAndThrow(Throwable ex) throws Exception {
if (ex instanceof Exception) {
throw (Exception) ex;
}
else if (ex instanceof Error) {
throw (Error) ex;
}
}


 All   Comments   Work Log   Change History   FishEye   Builds      Sort Order: Ascending order - Click to sort in descending order
Robert Kasanicky added a comment - 02/Apr/08 08:51 AM
RetryTemplate should probably also unwrap RetryExceptions before passing them to listeners.

Robert Kasanicky added a comment - 02/Apr/08 09:45 AM
Retry template now rethrows unclassified Throwables as private inner UnclassifiedRetryException and unwraps this type of exception before passing throwable to collaborators.

Dave Syer added a comment - 07/Aug/08 10:07 AM
Assume closed as resolved and released