private static Collection validateClassPath()

in log4j-converter-plugin-descriptor/src/main/java/org/apache/logging/log4j/converter/plugins/PluginCacheConverter.java [111:126]


    private static Collection<Path> validateClassPath(final Collection<String> classPath) {
        return classPath.stream()
                .flatMap(classPathElement -> Arrays.stream(classPathElement.split(File.pathSeparator, -1)))
                .map(classPathElement -> {
                    final Path inputPath = Paths.get(classPathElement);
                    if (!Files.isRegularFile(inputPath)) {
                        throw new IllegalArgumentException("Input file " + inputPath + " is not a file.");
                    }
                    if (!inputPath.getFileName().toString().endsWith(".jar")) {
                        throw new IllegalArgumentException(
                                "Invalid input file, only JAR files are supported: " + inputPath);
                    }
                    return inputPath;
                })
                .collect(Collectors.toList());
    }