PicoContainer
  1. PicoContainer
  2. PICO-168

wrong implementation of InterfaceFinder.getClass

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0-RC-1
    • Fix Version/s: 1.0-RC-1
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      InterfaceFinder.getClass should return the most common superclass of all given objects. The function fails as already demonstrated (and manifested) with InterfaceFinderTest.testMostCommonSuperclassForObjectIdsAndSequentialListIsAbstractSequentialList, since the most common superclass is not the AbstractSequentialList, but LinkedList. The problem is more obvious, if the list of given objects is in reverse order:

      http://cvs.codehaus.org/viewcvs.cgi/java/picocontainer/src/test/org/picocontainer/defaults/InterfaceFinderTestCase.java?r1=1.1&r2=1.2&root=picocontainer

        Activity

        Hide
        Jörg Schaible added a comment -

        Fixed implementation. Improved unit tests. Fixed endless loop. Added Javadoc.

        Show
        Jörg Schaible added a comment - Fixed implementation. Improved unit tests. Fixed endless loop. Added Javadoc.
        Jörg Schaible made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Jörg Schaible
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: