PicoContainer
  1. PicoContainer
  2. PICO-313

ReflectionLifecycleStrategy and StartableLifecycleStrategy handle exceptions inconsistently

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: None
    • Component/s: PicoContainer (Java)
    • Labels:
      None
    • Number of attachments :
      1

      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.

        People

        • Assignee:
          Paul Hammant
          Reporter:
          Mark J. Sinke
        • Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: