karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggrzy...@apache.org
Subject [karaf] branch master updated: [KARAF-5458] Use correct location to calculate target path for downloaded artifact
Date Fri, 03 Nov 2017 17:07:58 GMT
This is an automated email from the ASF dual-hosted git repository.

ggrzybek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/master by this push:
     new 75e051f  [KARAF-5458] Use correct location to calculate target path for downloaded
artifact
75e051f is described below

commit 75e051fc1e9acaffe61c7ab0e50bbdc94cb21c94
Author: Grzegorz Grzybek <gr.grzybek@gmail.com>
AuthorDate: Fri Nov 3 18:07:46 2017 +0100

    [KARAF-5458] Use correct location to calculate target path for downloaded artifact
---
 .../java/org/apache/karaf/profile/assembly/ArtifactInstaller.java  | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/profile/src/main/java/org/apache/karaf/profile/assembly/ArtifactInstaller.java
b/profile/src/main/java/org/apache/karaf/profile/assembly/ArtifactInstaller.java
index 273d9e4..c06ebf2 100644
--- a/profile/src/main/java/org/apache/karaf/profile/assembly/ArtifactInstaller.java
+++ b/profile/src/main/java/org/apache/karaf/profile/assembly/ArtifactInstaller.java
@@ -56,12 +56,13 @@ public class ArtifactInstaller {
             LOGGER.warn("Ignoring non maven artifact " + location);
             return;
         }
+        final String finalLocation = location;
         downloader.download(location, provider -> {
             String uri = provider.getUrl();
-            if (blacklist.isBundleBlacklisted(uri)) {
-                throw new RuntimeException("Bundle " + uri + " is blacklisted");
+            if (blacklist.isBundleBlacklisted(finalLocation)) {
+                throw new RuntimeException("Bundle " + finalLocation + " is blacklisted");
             }
-            Path path = pathFromProviderUrl(systemDirectory, uri);
+            Path path = pathFromProviderUrl(systemDirectory, finalLocation);
             synchronized (provider) {
                 Files.createDirectories(path.getParent());
                 Files.copy(provider.getFile().toPath(), path, StandardCopyOption.REPLACE_EXISTING);

-- 
To stop receiving notification emails like this one, please contact
['"commits@karaf.apache.org" <commits@karaf.apache.org>'].

Mime
View raw message