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 2021/08/18 06:33:57 UTC

[sling-org-apache-sling-feature-analyser] branch master updated: SLING-10729 : BundleDescriptor should not try to get artifact url if the metadata is cached.

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-analyser.git


The following commit(s) were added to refs/heads/master by this push:
     new 960ed88  SLING-10729 : BundleDescriptor should not try to get artifact url if the metadata is cached.
960ed88 is described below

commit 960ed8839e454dbc7f0c2f3c480e017792c5aace
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Aug 18 08:33:50 2021 +0200

    SLING-10729 : BundleDescriptor should not try to get artifact url if the metadata is cached.
---
 .../org/apache/sling/feature/scanner/impl/BundleDescriptorImpl.java    | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/sling/feature/scanner/impl/BundleDescriptorImpl.java b/src/main/java/org/apache/sling/feature/scanner/impl/BundleDescriptorImpl.java
index 39479e4..0543170 100644
--- a/src/main/java/org/apache/sling/feature/scanner/impl/BundleDescriptorImpl.java
+++ b/src/main/java/org/apache/sling/feature/scanner/impl/BundleDescriptorImpl.java
@@ -226,8 +226,7 @@ public class BundleDescriptorImpl
             this.getImportedPackages().addAll(extractImportedPackages(this.manifest));
             this.getDynamicImportedPackages().addAll(extractDynamicImportedPackages(this.manifest));
             try {
-                final URL url = this.getArtifactFile();
-                ResourceImpl resource = ResourceBuilder.build(url == null ? null : url.toURI().toString(), this.manifest.getMainAttributes().entrySet().stream()
+                ResourceImpl resource = ResourceBuilder.build(this.artifact.getId().toMvnUrl(), this.manifest.getMainAttributes().entrySet().stream()
                     .collect(Collectors.toMap(entry -> entry.getKey().toString(), entry -> entry.getValue().toString())));
                 this.getCapabilities().addAll(resource.getCapabilities(null));
                 this.getRequirements().addAll(resource.getRequirements(null).stream()