PicoContainer
  1. PicoContainer
  2. PICO-162

obsolete call in LifecycleContainerBuilder

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0-RC-1
    • Component/s: PicoContainer (Java)
    • Labels:
      None
    • Environment:
      heavy duty web server
    • Number of attachments :
      0

      Description

      Guilty code in buildContainer():
      --%<----------
      // register the child in the parent so that lifecycle can be propagated down the hierarchy
      if (parentContainer != null && parentContainer instanceof MutablePicoContainer)

      { MutablePicoContainer mutableContainer = (MutablePicoContainer) parentContainer; mutableContainer.unregisterComponentByInstance(container); mutableContainer.registerComponentInstance(containerRef, container); }

      --%<----------

      It makes no sense for me to unregister component by instance, when
      you have just build new container. It's clear that this instance is not there.

      So mutableContainer.unregisterComponentByInstance(container) is just obsolete and is alrteady done in killContainer();

        Activity

        Aslak Hellesøy made changes -
        Field Original Value New Value
        Assignee Konstantin Pribluda [ ko5tik ]
        Hide
        Konstantin Pribluda added a comment -

        commited

        Show
        Konstantin Pribluda added a comment - commited
        Konstantin Pribluda made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 1.0-RC-1 [ 10461 ]

          People

          • Assignee:
            Konstantin Pribluda
            Reporter:
            Konstantin Pribluda
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: