You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by da...@apache.org on 2018/11/07 11:45:35 UTC

[sling-org-apache-sling-feature-apiregions] 15/19: Fix a small bug relating a capability coming from no feature.

This is an automated email from the ASF dual-hosted git repository.

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-apiregions.git

commit ce4c71fbf8953980dd08bc7c8a074b57509e8a46
Author: David Bosschaert <bo...@adobe.com>
AuthorDate: Mon Nov 5 16:35:38 2018 +0000

    Fix a small bug relating a capability coming from no feature.
---
 .../org/apache/sling/feature/apiregions/impl/ResolverHookImpl.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/sling/feature/apiregions/impl/ResolverHookImpl.java b/src/main/java/org/apache/sling/feature/apiregions/impl/ResolverHookImpl.java
index ae446cd..dc1d08d 100644
--- a/src/main/java/org/apache/sling/feature/apiregions/impl/ResolverHookImpl.java
+++ b/src/main/java/org/apache/sling/feature/apiregions/impl/ResolverHookImpl.java
@@ -119,8 +119,11 @@ class ResolverHookImpl implements ResolverHook {
             Version capBundleVersion = capBundle.getVersion();
 
             List<String> capBundleArtifacts = bsnVerMap.get(new AbstractMap.SimpleEntry<String, Version>(capBundleName, capBundleVersion));
-            if (capBundleArtifacts == null)
-                return; // Capability is not in any feature, everyone can access
+            if (capBundleArtifacts == null) {
+                // Capability is not in any feature, everyone can access
+                coveredCaps.add(bc);
+                continue nextCapability;
+            }
 
             List<String> capFeatures = new ArrayList<>();
             for (String ba : capBundleArtifacts) {