Uploaded image for project: 'Aries'
  1. Aries
  2. ARIES-1439

Aries ResolveContext.insertHostedCapability() calls unsupported add() method on capabilies

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • subsystem-core-2.0.4
    • subsystem-2.0.6
    • Subsystem
    • None

    Description

      The method

      org.apache.aries.subsystem.core.internal.ResolveContext.insertHostedCapability(List<Capability> capabilities, HostedCapability hostedCapability)

      calls capabilities.add(hostedCapability).

      However the key reason for this callback is to insert this capability at the correct position in the capabilities list. The Felix implementation of the List provided insist on a call to add(idx, capability) which seems to make sense in this context.

      Currently this call causes the following exception:

      java.lang.UnsupportedOperationException: null
      	at org.apache.felix.resolver.util.CopyOnWriteList.add(CopyOnWriteList.java:135)
      	at org.apache.aries.subsystem.core.internal.ResolveContext.insertHostedCapability(ResolveContext.java:101)
      	at org.apache.felix.resolver.Candidates.prepare(Candidates.java:934)
      	at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:232)
      	at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:158)
      	at org.apache.aries.subsystem.core.internal.SubsystemResource.computeDependencies(SubsystemResource.java:372)

      Attachments

        Activity

          People

            bosschaert David Bosschaert
            bosschaert David Bosschaert
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: