[
https://issues.apache.org/jira/browse/SLING-10434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17353520#comment-17353520
]
Dirk Rudolph edited comment on SLING-10434 at 6/4/21, 3:33 PM:
---------------------------------------------------------------
I extended
[RegionConfigurationTest#testLoadBundleFeatureMapAndConfig|https://github.com/apache/sling-org-apache-sling-feature-apiregions/pull/15/commits/46e30a435d44779b9da4736d75416dfcaa4ec4dc]
to show the issue.
The
[fix|https://github.com/apache/sling-org-apache-sling-feature-apiregions/pull/15]
is simple, but I am not sure if it is the expected behaviour. At least
according to
[sling-org-apache-sling-installer-factory-feature|https://github.com/Buuhuu/sling-org-apache-sling-installer-factory-feature/commit/a8f5a97fa8ea584539ad9675bd9fe4382a6207df]
the case is possible.
was (Author: diru):
I extended
[RegionConfigurationTest#testLoadBundleFeatureMapAndConfig|https://github.com/apache/sling-org-apache-sling-feature-apiregions/pull/15/commits/46e30a435d44779b9da4736d75416dfcaa4ec4dc]
to show the issue.
The
[fix|https://github.com/apache/sling-org-apache-sling-feature-apiregions/pull/15]
is simple, but I am not sure if is the expected behaviour. At least according
to
[sling-org-apache-sling-installer-factory-feature|https://github.com/Buuhuu/sling-org-apache-sling-installer-factory-feature/commit/a8f5a97fa8ea584539ad9675bd9fe4382a6207df]
the case is possible.
> ArrayIndexOutOfBoundsException in RegionConfiguration#handleMapConfig
> ---------------------------------------------------------------------
>
> Key: SLING-10434
> URL: https://issues.apache.org/jira/browse/SLING-10434
> Project: Sling
> Issue Type: Bug
> Components: Feature Model
> Affects Versions: Feature Model API Regions Runtime Fragment 1.1.6
> Reporter: Dirk Rudolph
> Priority: Major
> Fix For: Feature Model API Regions Runtime Fragment 1.1.8
>
>
> I get the following ArrayIndexOutOfBoundsException for a similar feature
> model as provided below:
> {code:java}
> 28.05.2021 17:06:09.328 *ERROR* [FelixLogListener]
> org.apache.felix.configadmin Service
> [org.apache.felix.cm.ConfigurationAdmin,39,
> [org.osgi.service.cm.ConfigurationAdmin]] Unexpected problem delivering
> configuration event to [org.osgi.service.cm.SynchronousConfigurationListener,
> id=40, bundle=0/System Bundle] (java.lang.ArrayIndexOutOfBoundsException:
> Index 1 out of bounds for length 1)
> java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
> at
> org.apache.sling.feature.apiregions.impl.RegionConfiguration.handleMapConfig(RegionConfiguration.java:268)
> at
> org.apache.sling.feature.apiregions.impl.RegionConfiguration.updateConfiguration(RegionConfiguration.java:236)
> at
> org.apache.sling.feature.apiregions.impl.RegionConfiguration.setConfig(RegionConfiguration.java:471)
> at
> org.apache.sling.feature.apiregions.impl.Activator$3.invoke(Activator.java:269)
> at com.sun.proxy.$Proxy6.configurationEvent(Unknown Source)
> at
> org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:1720)
> at
> org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:1662)
> at
> org.apache.felix.cm.impl.ConfigurationManager.fireConfigurationEvent(ConfigurationManager.java:658)
> at
> org.apache.felix.cm.impl.ConfigurationManager.updated(ConfigurationManager.java:613)
> at
> org.apache.felix.cm.impl.ConfigurationImpl.update(ConfigurationImpl.java:467)
> at
> org.apache.felix.cm.impl.ConfigurationAdapter.update(ConfigurationAdapter.java:145)
> at
> org.apache.sling.installer.factories.configuration.impl.ConfigInstallTask.execute(ConfigInstallTask.java:78)
> at
> org.apache.sling.installer.core.impl.OsgiInstallerImpl.doExecuteTasks(OsgiInstallerImpl.java:918)
> at
> org.apache.sling.installer.core.impl.OsgiInstallerImpl.executeTasks(OsgiInstallerImpl.java:755)
> at
> org.apache.sling.installer.core.impl.OsgiInstallerImpl.run(OsgiInstallerImpl.java:304)
> at java.base/java.lang.Thread.run(Thread.java:834)
> {code}
> Example Feature Model
> {code:java}
> {
>
> "id":"com.exmaple:my-cloud-ready-feature-pkg:slingosgifeature:tiera:12345-SNAPSHOT",
> "bundles":[
> {
> "id":"com.example:my-bundle:1.2.3-SNAPSHOT",
> "start-order":"20"
> }
> ],
> "api-regions:JSON|false":[
> {
> "name":"global",
> "exports":[
> "com.example.my"
> ]
> }
> ]
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)