Issue Details (XML | Word | Printable)

Key: SPR-4025
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Sam Brannen
Reporter: Rick Evans
Votes: 0
Watchers: 0
Operations

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

SpringJUnit4ClassRunner silently swallows Exceptions

Created: 31/Oct/07 03:48 AM   Updated: 07/Nov/07 10:50 AM   Resolved: 31/Oct/07 06:21 AM
Component/s: SpringCORE
Affects Version/s: 2.5 RC1
Fix Version/s: 2.5 RC2

Time Tracking:
Original Estimate: 0d 0h 5m
Original Estimate - 0d 0h 5m
Remaining Estimate: 0d 0h 5m
Remaining Estimate - 0d 0h 5m
Time Spent: Not Specified
Time Spent - Not Specified

File Attachments: 1. Java Source File SpringJUnit4ClassRunnerTests.java (0.9 kB)



 Description  « Hide

Hola campers!

SpringJUnit4ClassRunner, createTest() contains this code (sans comment):

final Object testInstance = super.createTest();
try { getTestContextManager().prepareTestInstance(testInstance); }
catch (Throwable t) { new Exception(t); // <--------------- eh? }
return testInstance;

The line 'new Exception(t)' needs to be 'throw new Exception(t);' (At least I think it does.)

Cheers
Rick



Sam Brannen added a comment - 31/Oct/07 06:21 AM

Hi Rick,

Thanks for spotting this one before 2.5 final!

cheers,

Sam