Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.0-beta-1
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
I've attached a bunch of unit test cases for using RegistrationPicoContainer in a registry style - using a mixture of interface classes or String keys.
There seems to be 2 bugs outstanding right now. The main one is - changing DefaultPicoContainer's getComponents() method to this...
public Object[] getComponents()
{ return componentKeyToInstanceMap.values().toArray(); }which fixes it - though it breaks some other tests.
The other thing that doesn't seem to work is
pico.registerComponent("foo", SomeClass.class):
pico.hasComponent("foo");
pico.getComponent("foo");
So we're close. I hope to provide patches to fix this soon if noone else jumps in first.
Activity

Field | Original Value | New Value |
---|---|---|
Attachment | patch.txt [ 10465 ] |


Status | Unassigned [ 1 ] | Closed [ 6 ] |
Resolution | Fixed [ 1 ] | |
Fix Version/s | 1.0-beta-1 [ 10144 ] |
Here's the test case. doesn't quite pass yet.