PicoContainer
  1. PicoContainer
  2. PICO-266

CCA throws exception when attempting to stop a component that was never started

    Details

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

      Description

      the CCA throws an exception if you attempt to stop a component that was never started, because the underlying component has no lifecycle.

      CCA.stop() should allow stop() to be called without having called start(), ie, you can try to stop a component that was never started, but it won't do anything, since it was never started.

        Issue Links

          Activity

          Hide
          peter royal added a comment -

          The CCA doesn't know what lifecycle the underlying component may support, so it cannot make the decision about stopping a component that was never started.

          Show
          peter royal added a comment - The CCA doesn't know what lifecycle the underlying component may support, so it cannot make the decision about stopping a component that was never started.
          Hide
          peter royal added a comment -

          This test fails. It shouldn't

          Show
          peter royal added a comment - This test fails. It shouldn't
          peter royal made changes -
          Field Original Value New Value
          Attachment CachingComponentAdapterTestCase.diff [ 17039 ]
          Jörg Schaible made changes -
          Link This issue is related to PICO-264 [ PICO-264 ]
          Hide
          Jörg Schaible added a comment -

          The impl of the CA should use the new hasLifecycle method to test if the component actually has a LC.

          Show
          Jörg Schaible added a comment - The impl of the CA should use the new hasLifecycle method to test if the component actually has a LC.
          Hide
          Paul Hammant added a comment -

          Fixed in revision 2666.
          Joerg - you coulda fixed this, the answer was at your fingertips

          Show
          Paul Hammant added a comment - Fixed in revision 2666. Joerg - you coulda fixed this, the answer was at your fingertips
          Paul Hammant made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Hide
          Jörg Schaible added a comment -

          You did my homework for today ...I mainly typed it in so I would have not forget it

          Show
          Jörg Schaible added a comment - You did my homework for today ...I mainly typed it in so I would have not forget it
          Jörg Schaible made changes -
          Link This issue is depended upon by NANOWAR-22 [ NANOWAR-22 ]
          Hide
          Jörg Schaible added a comment -

          Jake, can you test with the latest PICO-SNAPSHOT?

          Show
          Jörg Schaible added a comment - Jake, can you test with the latest PICO-SNAPSHOT?
          Hide
          Jacob Kjome added a comment -

          Yep, as I said in my recent comment in NANOWAR-22, my sample app now works with the latest pico/nano/nanowar snapshots! Thanks

          Jake

          Show
          Jacob Kjome added a comment - Yep, as I said in my recent comment in NANOWAR-22 , my sample app now works with the latest pico/nano/nanowar snapshots! Thanks Jake

            People

            • Assignee:
              peter royal
              Reporter:
              peter royal
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: