void filterReflectConfigInJar()

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


        void filterReflectConfigInJar(final Path jar, final ReflectConfigFilter filter) throws IOException {
            final URI jarFileSystemRoot;
            try {
                jarFileSystemRoot = new URI("jar", jar.toUri().toASCIIString(), null);
            } catch (final URISyntaxException e) {
                throw new IllegalArgumentException(e);
            }
            try (final FileSystem fileSystem = FileSystems.newFileSystem(jarFileSystemRoot, Collections.emptyMap())) {
                final Path rootPath = fileSystem.getPath("/");
                final Path nativeImagePath = rootPath.resolve("META-INF/native-image");
                if (Files.isDirectory(nativeImagePath)) {
                    try (final Stream<Path> paths = Files.walk(nativeImagePath, 3)) {
                        paths.filter(p -> "reflect-config.json"
                                        .equals(p.getFileName().toString()))
                                .forEach(p -> filterReflectConfig(rootPath, p, filter));
                    }
                }
            }
        }