in sonar-plugin-agent/src/main/java/jetbrains/buildserver/sonarplugin/util/SSLTools.java [67:80]
private static int storeCertificates(KeyStore ks, String syncCertPath) {
Path certificateFolder = new File(syncCertPath).toPath();
AtomicInteger counter = new AtomicInteger(0);
try {
Files.walk(certificateFolder, 1)
.filter(Files::isRegularFile)
.map(it -> storeCertificate(ks, it))
.filter(Objects::nonNull)
.forEach(t -> counter.incrementAndGet());
} catch (IOException e) {
log.error("Error while copying certificates from {}", syncCertPath, e);
}
return counter.get();
}