Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2.3
-
Fix Version/s: None
-
Component/s: PicoContainer (Java)
-
Labels:None
-
Number of attachments :
Description
StartableLifecycleStrategy passes a RuntimeException thrown to to the lifecycleInvocationFailed method in the component monitor, which will throw by default.
The ReflectionLifecycleStrategy however, passes it to the lifecycleInvocationFailed method and then proceeds to throw it itself.
That is inconsistent.
In my code I want to be able to swallow the exception and have the start() of other components proceed. I can do that with StartableLifecycleStrategy, but not using ReflectionLifecycleStrategy.
I would suggest to remove the explicit throw statement in ReflectionLifecycleStrategy. It is on line 129 in ReflectionLifecycleStrategy.java.
attached is a JUnit test case that exposes the behavior