PicoContainer
  1. PicoContainer
  2. PICO-274

DefaultPicoContainer.registerComponentInstance() does not return adapter from .registerComponent()

    Details

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

      Description

      I have subclassed DefaultPicoContainer so that it will always wrap component adaptors with my own scoped caching component adapter.

      To do this I have overriden registerComponent which is called by all the other register* methods. However, registerComponentInstance() does not return the adapter that was returned by registerComponent. It always returns its own InstanceComponentAdapter.

      This is how it works now:

      ComponentAdapter componentAdapter = new InstanceCompone...
      registerComponent(componentAdapter);
      return componentAdapter;

      I expected it to work like this:

      ComponentAdapter componentAdapter = new InstanceCompone...
      return registerComponent(componentAdapter);

      Thanks,

      John

        Activity

        Hide
        Jörg Schaible added a comment -

        Fixed in two places.

        Show
        Jörg Schaible added a comment - Fixed in two places.
        Jörg Schaible made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 1.2 [ 11330 ]
        Assignee Joerg Schaible [ joehni ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Jörg Schaible
            Reporter:
            John Patterson
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: