PicoContainer
  1. PicoContainer
  2. PICO-196

Why does InstanceComponentAdapter check if instance is concrete ?

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 1.1
    • Component/s: PicoContainer (Java)
    • Labels:
      None
    • Number of attachments :
      3

      Description

      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...

      1. Descriptor.java
        0.1 kB
        Nicolas AVERSENG
      2. DescriptorDep.java
        0.2 kB
        Nicolas AVERSENG
      3. DescriptorTestCase.java
        0.7 kB
        Nicolas AVERSENG

        Activity

        Nicolas AVERSENG made changes -
        Field Original Value New Value
        Attachment Descriptor.java [ 12424 ]
        Nicolas AVERSENG made changes -
        Attachment DescriptorDep.java [ 12425 ]
        Nicolas AVERSENG made changes -
        Attachment DescriptorTestCase.java [ 12426 ]
        Aslak Hellesøy made changes -
        Assignee Aslak Hellesoy [ rinkrank ]
        Aslak Hellesøy made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Aslak Hellesøy added a comment -

        This works correctly in PicoContainer 1.1 (use the SNAPSHOT until it is released)

        Show
        Aslak Hellesøy added a comment - This works correctly in PicoContainer 1.1 (use the SNAPSHOT until it is released)
        Aslak Hellesøy made changes -
        Fix Version/s 1.1 [ 10307 ]
        Resolution Fixed [ 1 ]
        Status In Progress [ 3 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: