sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [sling-org-apache-sling-feature-analyser] 17/28: Move functionality of LambdaUtil to where its actually used.
Date Fri, 27 Apr 2018 09:53:33 GMT
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-analyser.git

commit 919cdaf5d6627e655efbe33c5a15c7dca85ca87f
Author: David Bosschaert <david.bosschaert@gmail.com>
AuthorDate: Wed Apr 18 21:04:47 2018 +0300

    Move functionality of LambdaUtil to where its actually used.
---
 .../sling/feature/scanner/impl/FelixFrameworkScanner.java | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/main/java/org/apache/sling/feature/scanner/impl/FelixFrameworkScanner.java
b/src/main/java/org/apache/sling/feature/scanner/impl/FelixFrameworkScanner.java
index a3fb70b..c2faeac 100644
--- a/src/main/java/org/apache/sling/feature/scanner/impl/FelixFrameworkScanner.java
+++ b/src/main/java/org/apache/sling/feature/scanner/impl/FelixFrameworkScanner.java
@@ -16,7 +16,6 @@
  */
 package org.apache.sling.feature.scanner.impl;
 
-import static org.apache.sling.feature.support.util.LambdaUtil.rethrowFunction;
 import static org.apache.sling.feature.support.util.ManifestParser.convertProvideCapabilities;
 import static org.apache.sling.feature.support.util.ManifestParser.normalizeCapabilityClauses;
 import static org.apache.sling.feature.support.util.ManifestParser.parseStandardHeader;
@@ -44,6 +43,7 @@ import org.apache.sling.feature.scanner.BundleDescriptor;
 import org.apache.sling.feature.scanner.spi.FrameworkScanner;
 import org.apache.sling.feature.support.util.PackageInfo;
 import org.apache.sling.feature.support.util.SubstVarUtil;
+import org.osgi.framework.BundleException;
 import org.osgi.framework.Constants;
 import org.osgi.resource.Capability;
 
@@ -106,10 +106,15 @@ public class FelixFrameworkScanner implements FrameworkScanner {
                     fwkProps.get(Constants.FRAMEWORK_SYSTEMCAPABILITIES_EXTRA)
                 )
                 .filter(Objects::nonNull)
-                .flatMap(
-                        rethrowFunction(header ->
-                            convertProvideCapabilities(normalizeCapabilityClauses(parseStandardHeader(header),
"2")).stream()
-                )).collect(Collectors.toSet());
+                .flatMap(header -> {
+                        try {
+                            return convertProvideCapabilities(normalizeCapabilityClauses(parseStandardHeader(header),
"2"))
+                                    .stream();
+                        } catch (BundleException ex) {
+                            throw new RuntimeException(ex);
+                        }
+                    })
+                .collect(Collectors.toSet());
     }
 
     private Set<PackageInfo> calculateSystemPackages(final KeyValueMap fwkProps) {

-- 
To stop receiving notification emails like this one, please contact
davidb@apache.org.

Mime
View raw message