Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0-beta-5
    • Component/s: PicoContainer (Java)
    • Labels:
      None
    • Number of attachments :
      0

      Description

      hi,

      when looking into PICO-115 I found this:

      public void registerComponent(ComponentAdapter componentAdapter) throws DuplicateComponentKeyRegistrationException {
      componentAdapter.setContainer(this);
      componentAdapters.add(componentAdapter);
      Object componentKey = componentAdapter.getComponentKey();
      if (componentKeyToAdapterCache.containsKey(componentKey))

      { throw new DuplicateComponentKeyRegistrationException(componentKey); }

      componentKeyToAdapterCache.put(componentKey, componentAdapter);
      }

      If there is a duplicate key the component will not be available by key but it will be available via getComponentInstanceOfType. Don't have a test-case but please take a look. If this is intended please document it anywhere. Its not marked as critical since most containers won't start when there is a registration error, but still its a bug IMO.

        Activity

        Hide
        Aslak Hellesøy added a comment -

        fixed. thanks!

        Show
        Aslak Hellesøy added a comment - fixed. thanks!
        Aslak Hellesøy made changes -
        Field Original Value New Value
        Assignee Aslak Hellesoy [ rinkrank ]
        Resolution Fixed [ 1 ]
        Fix Version/s 1.0-beta-5 [ 10145 ]
        Status Open [ 1 ] Closed [ 6 ]

          People

          • Assignee:
            Aslak Hellesøy
            Reporter:
            Thomas Heller
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: