You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2020/11/23 10:50:35 UTC

[sling-org-apache-sling-feature-cpconverter] branch master updated: SLING-9921 : service.pid and service.factoryPid should be ignored for configuration properties

This is an automated email from the ASF dual-hosted git repository.

cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-cpconverter.git


The following commit(s) were added to refs/heads/master by this push:
     new f1d850e  SLING-9921 : service.pid and service.factoryPid should be ignored for configuration properties
f1d850e is described below

commit f1d850e4ace7c96338c53193452adf8936fdaa4c
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Nov 23 11:50:00 2020 +0100

    SLING-9921 : service.pid and service.factoryPid should be ignored for configuration properties
---
 .../sling/feature/cpconverter/features/DefaultFeaturesManager.java   | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/main/java/org/apache/sling/feature/cpconverter/features/DefaultFeaturesManager.java b/src/main/java/org/apache/sling/feature/cpconverter/features/DefaultFeaturesManager.java
index da88784..f272adb 100644
--- a/src/main/java/org/apache/sling/feature/cpconverter/features/DefaultFeaturesManager.java
+++ b/src/main/java/org/apache/sling/feature/cpconverter/features/DefaultFeaturesManager.java
@@ -47,6 +47,7 @@ import org.apache.sling.feature.extension.apiregions.api.ApiExport;
 import org.apache.sling.feature.extension.apiregions.api.ApiRegion;
 import org.apache.sling.feature.extension.apiregions.api.ApiRegions;
 import org.apache.sling.feature.io.json.FeatureJSONWriter;
+import org.osgi.framework.Constants;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -225,6 +226,10 @@ public class DefaultFeaturesManager implements FeaturesManager {
 
             configuration.getProperties().put(key, value);
         }
+        // remove internal properties (these are ignored anyway)
+        configuration.getProperties().remove(Constants.SERVICE_PID);
+        configuration.getProperties().remove("service.bundleLocation");
+        configuration.getProperties().remove("service.factoryPid");
     }
 
     private void addAPIRegions(Feature feature, List<String> exportedPackages) throws IOException {