You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Andreas Schaefer (Jira)" <ji...@apache.org> on 2021/03/01 19:32:00 UTC
[jira] [Comment Edited] (SLING-10157) Converter fails with
duplicate configuration PIDs
[ https://issues.apache.org/jira/browse/SLING-10157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17293125#comment-17293125 ]
Andreas Schaefer edited comment on SLING-10157 at 3/1/21, 7:31 PM:
-------------------------------------------------------------------
It works but I ran into a few issues:
- in AbstractJcrNodeParser this line failed:
this.primaryTypes = ImmutableSet.of(primaryTypes);
and I had to replace it with:
this.primaryTypes = new HashSet<String>(java.util.Arrays.asList(primaryTypes));
In DefaultFeaturesManager when I only have two configurations it did not work well because the first configuration is not added to the map. So I had to add this line (233):
if (configuration == null) {
configuration = new Configuration(pid);
feature.getConfigurations().add(configuration);
// Add this so that the first configuration is considered in an Ordered configuration
this.pidToPathMapping.put(pid, path);
was (Author: schaefa):
It works but I ran into a few issues:
- in AbstractJcrNodeParser this line failed:
this.primaryTypes = ImmutableSet.of(primaryTypes);
and I had to replace it with:
this.primaryTypes = new HashSet<String>(java.util.Arrays.asList(primaryTypes));
In DefaultFeaturesManager when I only have two configurations it did not work well because the first configuration is not added to the map. So I had to add this line:
if (configuration == null) {
configuration = new Configuration(pid);
feature.getConfigurations().add(configuration);
// Add this so that the first configuration is considered in an Ordered configuration
this.pidToPathMapping.put(pid, path);
> Converter fails with duplicate configuration PIDs
> -------------------------------------------------
>
> Key: SLING-10157
> URL: https://issues.apache.org/jira/browse/SLING-10157
> Project: Sling
> Issue Type: Bug
> Components: Content-Package to Feature Model Converter
> Affects Versions: Content-Package to Feature Model Converter 1.0.24
> Reporter: Carsten Ziegeler
> Assignee: Carsten Ziegeler
> Priority: Major
> Fix For: Content-Package to Feature Model Converter 1.0.26
>
>
> If there is a configuration for the same PID multiple times, either in the same or different content packages, the converter fails with an error.
> We should handle this similar to how the OSGi installer does it, and pick the right configuration based on the repository path.
> A warning should be logged for these cases as well.
> We could add a strict option, throwing an exception in this case like today
--
This message was sent by Atlassian Jira
(v8.3.4#803005)