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 2019/06/13 05:50:16 UTC
[sling-org-apache-sling-feature-launcher] branch master updated:
SLING-8485 : Feature Launcher should keep order of features
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-launcher.git
The following commit(s) were added to refs/heads/master by this push:
new e65f12d SLING-8485 : Feature Launcher should keep order of features
e65f12d is described below
commit e65f12d7d552b4661a66a01edb305d558f0c4196
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Jun 13 07:50:07 2019 +0200
SLING-8485 : Feature Launcher should keep order of features
---
.../feature/launcher/impl/FeatureProcessor.java | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/src/main/java/org/apache/sling/feature/launcher/impl/FeatureProcessor.java b/src/main/java/org/apache/sling/feature/launcher/impl/FeatureProcessor.java
index 340b2d9..f92eaf4 100644
--- a/src/main/java/org/apache/sling/feature/launcher/impl/FeatureProcessor.java
+++ b/src/main/java/org/apache/sling/feature/launcher/impl/FeatureProcessor.java
@@ -91,15 +91,17 @@ public class FeatureProcessor {
.toArray(PostProcessHandler[]::new));
List<Feature> features = new ArrayList<>();
- for (final String initFile : IOUtils.getFeatureFiles(config.getHomeDirectory(), config.getFeatureFiles())) {
- logger.debug("Reading feature file {}", initFile);
- final ArtifactHandler featureArtifact = artifactManager.getArtifactHandler(initFile);
- try (final Reader r = new InputStreamReader(featureArtifact.getLocalURL().openStream(), "UTF-8")) {
- final Feature f = FeatureJSONReader.read(r, featureArtifact.getUrl());
- loadedFeatures.put(f.getId(), f);
- features.add(f);
- } catch (Exception ex) {
- throw new IOException("Error reading feature: " + initFile, ex);
+ for (final String featureFile : config.getFeatureFiles()) {
+ for (final String initFile : IOUtils.getFeatureFiles(config.getHomeDirectory(), featureFile)) {
+ logger.debug("Reading feature file {}", initFile);
+ final ArtifactHandler featureArtifact = artifactManager.getArtifactHandler(initFile);
+ try (final Reader r = new InputStreamReader(featureArtifact.getLocalURL().openStream(), "UTF-8")) {
+ final Feature f = FeatureJSONReader.read(r, featureArtifact.getUrl());
+ loadedFeatures.put(f.getId(), f);
+ features.add(f);
+ } catch (Exception ex) {
+ throw new IOException("Error reading feature: " + initFile, ex);
+ }
}
}