private static boolean licenseFileExistsAndIsValid()

in tools/ci/paimon-ci-tools/src/main/java/org/apache/paimon/tools/ci/licensecheck/JarFileChecker.java [122:137]


    private static boolean licenseFileExistsAndIsValid(Path licenseFile, Path jar)
            throws IOException {
        if (!Files.exists(licenseFile)) {
            LOG.error("Missing META-INF/LICENSE in {}", jar);
            return false;
        }

        final String licenseFileContents = readFile(licenseFile);
        if (!licenseFileContents.contains("Apache License")
                || !licenseFileContents.contains("Version 2.0, January 2004")) {
            LOG.error("The license file in {} does not contain the expected entries.", jar);
            return false;
        }

        return true;
    }