[
https://issues.apache.org/jira/browse/KARAF-7522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jean-Baptiste Onofré updated KARAF-7522:
----------------------------------------
Component/s: karaf
> Duplicate feature name and version cause stack overflow errors
> --------------------------------------------------------------
>
> Key: KARAF-7522
> URL: https://issues.apache.org/jira/browse/KARAF-7522
> Project: Karaf
> Issue Type: Bug
> Components: karaf
> Affects Versions: 4.2.7
> Reporter: Łukasz Dywicki
> Assignee: Łukasz Dywicki
> Priority: Major
>
> Karaf feature resolver computation is prone to an error when same feature is
> defined in two descriptors. While it can be an user error, quite often this
> error is spot when feature generation is being used.
> First occurrence of this error is seen in KARAF-6536 which links it with
> Windows and version ranges. I was able to reproduce issue with much simpler
> setup, validation with two feature files where one is "plain" and other is
> "aggregated".
> {code:java}
> Exception in thread "main" java.lang.StackOverflowError
> at
> java.base/java.util.AbstractCollection.<init>(AbstractCollection.java:66)
> at java.base/java.util.AbstractList.<init>(AbstractList.java:78)
> at
> java.base/java.util.Collections$SingletonList.<init>(Collections.java:4837)
> at java.base/java.util.Collections.singletonList(Collections.java:4823)
> at
> org.apache.felix.utils.resource.SimpleFilter.parseSubstring(SimpleFilter.java:367)
> at
> org.apache.felix.utils.resource.SimpleFilter.convert(SimpleFilter.java:564)
> at
> org.apache.felix.utils.resource.RequirementImpl.getFilter(RequirementImpl.java:133)
> at
> org.apache.felix.utils.resource.RequirementImpl.<init>(RequirementImpl.java:77)
> at
> org.apache.felix.utils.resource.RequirementImpl.<init>(RequirementImpl.java:44)
> at
> org.apache.karaf.features.internal.resolver.ResourceUtils.addIdentityRequirement(ResourceUtils.java:127)
> at
> org.apache.karaf.features.internal.resolver.ResourceUtils.addIdentityRequirement(ResourceUtils.java:107)
> at
> org.apache.karaf.features.internal.resolver.ResourceUtils.addIdentityRequirement(ResourceUtils.java:99)
> at
> org.apache.karaf.features.internal.region.Subsystem.requireFeature(Subsystem.java:284)
> at
> org.apache.karaf.features.internal.region.Subsystem.doBuild(Subsystem.java:350)
> at
> org.apache.karaf.features.internal.region.Subsystem.build(Subsystem.java:332)
> at
> org.apache.karaf.features.internal.region.Subsystem.doBuild(Subsystem.java:390)
> at
> org.apache.karaf.features.internal.region.Subsystem.build(Subsystem.java:332)
> at
> org.apache.karaf.features.internal.region.Subsystem.doBuild(Subsystem.java:390)
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)