Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.1
-
Fix Version/s: 1.2
-
Component/s: PicoContainer (Java)
-
Labels:None
-
Number of attachments :
Description
The ImplementationHidingPC does not respect the special functionality of the used ComponentAdapterFactory, since it is caching its components in certain cases, that even might break the functionality (e.g. ThreadLocalCAF).
Test case:
public void testUsageOfADifferentComponentAdapterFactory()
{ MutablePicoContainer parent = new DefaultPicoContainer(); ImplementationHidingPicoContainer pico = new ImplementationHidingPicoContainer(new ConstructorInjectionComponentAdapterFactory(), parent); pico.registerComponentImplementation(List.class, ArrayList.class); List list1 = (List) pico.getComponentInstanceOfType(List.class); List list2 = (List) pico.getComponentInstanceOfType(List.class); assertNotNull(list1); assertNotNull(list2); assertFalse(list1 == list2); }Activity
Jörg Schaible
made changes -
Field | Original Value | New Value |
---|---|---|
Assignee | Paul Hammant [ paul ] |
Jörg Schaible
made changes -
Fix Version/s | 1.2 [ 11330 ] | |
Environment |
Jörg Schaible
made changes -
Assignee | Paul Hammant [ paul ] | Joerg Schaible [ joehni ] |
Paul Hammant
made changes -
Status | Open [ 1 ] | Closed [ 6 ] |
Resolution | Fixed [ 1 ] |
Paul, you know, why you've added the special code ...