You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2019/12/09 11:32:17 UTC
[sling-org-apache-sling-feature-analyser] branch master updated:
SLING-8900 - Rename sourceId attribute to source-ids
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-analyser.git
The following commit(s) were added to refs/heads/master by this push:
new 2bfdf2c SLING-8900 - Rename sourceId attribute to source-ids
2bfdf2c is described below
commit 2bfdf2c091cb59997d98844ab3b4cfc6c8f5c5c7
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Mon Dec 9 12:00:30 2019 +0100
SLING-8900 - Rename sourceId attribute to source-ids
---
.../sling/feature/analyser/task/impl/CheckApisJarsProperties.java | 6 +++---
.../feature/analyser/task/impl/CheckApisJarsPropertiesTest.java | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/sling/feature/analyser/task/impl/CheckApisJarsProperties.java b/src/main/java/org/apache/sling/feature/analyser/task/impl/CheckApisJarsProperties.java
index 01f1177..c73af1f 100644
--- a/src/main/java/org/apache/sling/feature/analyser/task/impl/CheckApisJarsProperties.java
+++ b/src/main/java/org/apache/sling/feature/analyser/task/impl/CheckApisJarsProperties.java
@@ -37,7 +37,7 @@ import org.apache.sling.feature.analyser.task.AnalyserTaskContext;
public class CheckApisJarsProperties implements AnalyserTask {
// TODO - also defined in ApisJarMojo
- private static final String SOURCE_ID = "sourceId";
+ private static final String SOURCE_IDS = "source-ids";
@Override
public String getId() {
@@ -54,12 +54,12 @@ public class CheckApisJarsProperties implements AnalyserTask {
ctx.getFeature().getBundles().getBundlesByStartOrder().values().stream()
.flatMap( List::stream )
- .filter ( artifact -> artifact.getMetadata().containsKey(SOURCE_ID) )
+ .filter ( artifact -> artifact.getMetadata().containsKey(SOURCE_IDS) )
.forEach( artifact -> checkSourceIdValidity(artifact, ctx));
}
private void checkSourceIdValidity(Artifact a, AnalyserTaskContext ctx) {
- String sourceId = a.getMetadata().get(SOURCE_ID);
+ String sourceId = a.getMetadata().get(SOURCE_IDS);
Arrays.stream(sourceId.split(","))
.map( String::trim )
.filter( el -> el.length() > 0)
diff --git a/src/test/java/org/apache/sling/feature/analyser/task/impl/CheckApisJarsPropertiesTest.java b/src/test/java/org/apache/sling/feature/analyser/task/impl/CheckApisJarsPropertiesTest.java
index 7307b25..34ea6f6 100644
--- a/src/test/java/org/apache/sling/feature/analyser/task/impl/CheckApisJarsPropertiesTest.java
+++ b/src/test/java/org/apache/sling/feature/analyser/task/impl/CheckApisJarsPropertiesTest.java
@@ -97,7 +97,7 @@ public class CheckApisJarsPropertiesTest {
public void addArtifactWithSourceId(String artifactId, String sourceId) {
Artifact artifact = new Artifact(ArtifactId.parse(artifactId));
if ( sourceId != null )
- artifact.getMetadata().put("sourceId", sourceId);
+ artifact.getMetadata().put("source-ids", sourceId);
getBundles().add(artifact);
}