Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
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)