if (usingBundles == null) {
return Collections.emptyList();
} else {
- return Arrays.asList(usingBundles).stream()
- .map(bundle -> bundle.getSymbolicName()).collect(Collectors.toList());
+ return Arrays.stream(usingBundles).map(Bundle::getSymbolicName).collect(Collectors.toList());
}
}
condition -> LOG.info("checkBundleDiagInfos: Elapsed time {}s, remaining time {}s, {}",
condition.getElapsedTimeInMS() / 1000, condition.getRemainingTimeInMS() / 1000,
((BundleDiagInfos) condition.getValue()).getFullDiagnosticText()))
- .until(() -> getBundleDiagInfos(), new BundleServiceSummaryMatcher());
+ .until(this::getBundleDiagInfos, new BundleServiceSummaryMatcher());
// If we're here then either BundleServiceSummaryMatcher quit because of Active, Failure or Stopping..
BundleDiagInfos bundleInfos = getBundleDiagInfos();
if (usingBundles == null) {
return Collections.emptyList();
} else {
- return Arrays.asList(usingBundles).stream()
- .map(bundle -> bundle.getSymbolicName()).collect(Collectors.toList());
+ return Arrays.stream(usingBundles).map(Bundle::getSymbolicName).collect(Collectors.toList());
}
}
condition -> LOG.info("checkBundleDiagInfos: Elapsed time {}s, remaining time {}s, {}",
condition.getElapsedTimeInMS() / 1000, condition.getRemainingTimeInMS() / 1000,
((BundleDiagInfos) condition.getValue()).getFullDiagnosticText()))
- .until(() -> getBundleDiagInfos(), new BundleServiceSummaryMatcher());
+ .until(this::getBundleDiagInfos, new BundleServiceSummaryMatcher());
// If we're here then either BundleServiceSummaryMatcher quit because of Active, Failure or Stopping..
BundleDiagInfos bundleInfos = getBundleDiagInfos();
ClassPath classPath = ClassPath.from(classLoader);
// inspired by https://github.com/vorburger/ch.vorburger.minecraft.osgi/blob/master/ch.vorburger.minecraft.osgi/src/main/java/ch/vorburger/osgi/embedded/PackagesBuilder.java
return classPath.getTopLevelClassesRecursive(packageName)
- .stream().map(classInfo -> classInfo.load())
+ .stream().map(ClassPath.ClassInfo::load)
// to include all inner classes, including anonymous inner classes:
- .flatMap(clazz -> getDeclaredAndAnonymousInnerClass(clazz));
+ .flatMap(ReflectionUtil::getDeclaredAndAnonymousInnerClass);
} catch (IOException e) {
throw new IllegalStateException("ClassPath.from(classLoader) failed", e);
}