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 701a79a SLING-11220 : Feature launcher loads from repository even if
artifact is in FAR
701a79a is described below
commit 701a79ae57d84a83fa9af33154c10497cdf8d772
Author: Carsten Ziegeler <[email protected]>
AuthorDate: Mon Mar 28 07:40:15 2022 +0200
SLING-11220 : Feature launcher loads from repository even if artifact is in
FAR
---
.../sling/feature/launcher/impl/FeatureProcessor.java | 17 +++++++----------
1 file changed, 7 insertions(+), 10 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 0014e6e..379b0e6 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
@@ -116,17 +116,14 @@ public class FeatureProcessor {
final ArtifactHandler featureArtifact =
artifactManager.getArtifactHandler(initFile);
try (final InputStream is =
featureArtifact.getLocalURL().openStream()) {
for(final Feature feature : ArchiveReader.read(is,
(id, stream) -> {
-
- if ( provider.provide(id) == null ) {
- final File artifactFile = new
File(config.getCacheDirectory(),
+ final File artifactFile = new
File(config.getCacheDirectory(),
id.toMvnPath().replace('/',
File.separatorChar));
- if (!artifactFile.exists()) {
- artifactFile.getParentFile().mkdirs();
- try (final OutputStream os = new
FileOutputStream(artifactFile)) {
- int l = 0;
- while ((l = stream.read(buffer)) >
0) {
- os.write(buffer, 0, l);
- }
+ if (!artifactFile.exists()) {
+ artifactFile.getParentFile().mkdirs();
+ try (final OutputStream os = new
FileOutputStream(artifactFile)) {
+ int l = 0;
+ while ((l = stream.read(buffer)) > 0) {
+ os.write(buffer, 0, l);
}
}
}