Details
-
Type: Bug
-
Status: Closed
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.0-beta-5
-
Component/s: PicoContainer (Java)
-
Labels:None
-
Number of attachments :
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))
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
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 ] |
fixed. thanks!