Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-4524

Substituted exports may cause IndexOutOfBoundsException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • resolver-1.2.0
    • Resolver
    • None

    Description

      In some cases substituted exports can cause IndexOutOfBoundsException. This can happen if you have a substituted export for which the exported capability is the only capability that can satisfy one or more other requirements. For example:

      BSN: A
      Import-Package; substituted; version="[1.0,1.1)"

      BSN: B
      Export-Package: substituted; version=1.0
      Import-Package: substituted; version=1.0

      BSN: C
      Export-Package: substituted; version=1.1
      Import-Package: substituted; version=1.1

      Resolving A as a root resource will cause something like the following exception:

      java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
      at java.util.ArrayList.rangeCheck(ArrayList.java:635)
      at java.util.ArrayList.get(ArrayList.java:411)
      at org.apache.felix.resolver.ResolverImpl.calculatePackageSpaces(ResolverImpl.java:692)
      at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:251)

      Attachments

        Activity

          People

            rickhall Richard S. Hall
            tjwatson Tom Watson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: