protected static void checkRuntimeHintsConfigurations(final String arg) throws IOException {
        var count = new AtomicInteger(0);

        Files.walk(Paths.get(arg))
            .filter(file -> Files.isDirectory(file) && file.toFile().getAbsolutePath().endsWith("src/main/resources/META-INF/spring"))
            .forEach(dir -> {
                var projectPath = dir.getParent().getParent().getParent().getParent().getParent().toFile().getPath();
                try {
                    var factoriesFile = new File(dir.toFile(), "aot.factories");

                    if (factoriesFile.exists()) {
                        var properties = new Properties();

                        try (var reader = new FileReader(factoriesFile)) {
                            properties.load(reader);
                        }

                        if (properties.isEmpty()) {
                            print("aot.factories file %s is empty", factoriesFile);
                            count.incrementAndGet();
                        }

                        if (properties.containsKey("org.springframework.aot.hint.RuntimeHintsRegistrar")) {
                            var classes = (String) properties.get("org.springframework.aot.hint.RuntimeHintsRegistrar");
                            if (!checkForRuntimeHintsFactories(projectPath, classes, factoriesFile, ",")) {
                                count.incrementAndGet();
                            }
                        }
                    }
                } catch (final Exception e) {
                    throw new RuntimeException(e);
                }
            });

        Files.walk(Paths.get(arg))
            .filter(Files::isRegularFile)
            .filter(file -> file.toFile().getAbsolutePath().matches(".*src/main/java/.+RuntimeHints\\.java"))
            .forEach(file -> {
                var projectPath = file.getParent().getParent().getParent().getParent().getParent().getParent().toFile().getPath();
                var factoriesFile = new File(projectPath, "resources/META-INF/spring/aot.factories");
                var runtimeHint = file.toFile().getName().replace(".java", "");
                if (!factoriesFile.exists()) {
                    print("aot.factories file %s does not exist. It must contain the following:", factoriesFile);
                    print("org.springframework.aot.hint.RuntimeHintsRegistrar=org.apereo.cas.nativex.%s"
                        .formatted(runtimeHint));
                    count.incrementAndGet();
                }
                var factories = readFile(factoriesFile.toPath());
                if (!factories.contains(runtimeHint)) {
                    print("aot.factories file %s does not reference %s", factoriesFile, runtimeHint);
                    count.incrementAndGet();
                }
            });
            
        if (count.intValue() > 0) {
            System.exit(1);
        }
    }
This is {@link CheckNativeRuntimeHints}.

@author Misagh Moayyed
@since 7.0.0
ci/checks/CheckNativeRuntimeHints.java