Issue Details (XML | Word | Printable)

Key: PICO-196
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Aslak Hellesoy
Reporter: Nicolas AVERSENG
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
PicoContainer

Why does InstanceComponentAdapter check if instance is concrete ?

Created: 05/Jul/04 12:17 PM   Updated: 05/Jul/04 03:33 PM
Component/s: PicoContainer (Java)
Affects Version/s: 1.0
Fix Version/s: 1.1

Time Tracking:
Not Specified

File Attachments: 1. Java Source File Descriptor.java (0.1 kB)
2. Java Source File DescriptorDep.java (0.2 kB)
3. Java Source File DescriptorTestCase.java (0.7 kB)



 Description  « Hide
InstanceComponentAdapter extends AbstractComponentAdapter, which checks in its constructor for the concreteness of the component class.
I have a case where this concreteness check fails (still clearly does not get why...), and i was wondering why this test was useful at all for the InstanceComponentAdapter...

I do not know if the test should be removed, but i will try anyway to describe my case hereafter (test case attached):

public interface Descriptor
{
...

public static class DescriptorData

{ ... }

}

I register into pico an instance of type Descriptor$DescriptorData[] and this fails... It work of course ok if i comment the call to checkConcrete in AbstractComponentAdapter constructor...



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Aslak Hellesoy added a comment - 05/Jul/04 03:33 PM
This works correctly in PicoContainer 1.1 (use the SNAPSHOT until it is released)