static Optional parseNoticeFile()

in tools/ci/paimon-ci-tools/src/main/java/org/apache/paimon/tools/ci/utils/notice/NoticeParser.java [65:82]


    static Optional<NoticeContents> parseNoticeFile(List<String> noticeContents) {
        if (noticeContents.isEmpty()) {
            return Optional.empty();
        }

        final String noticeModuleName = noticeContents.get(0);

        Collection<Dependency> declaredDependencies = new ArrayList<>();
        for (String line : noticeContents) {
            Optional<Dependency> dependency = tryParsing(NOTICE_DEPENDENCY_PATTERN, line);
            if (!dependency.isPresent()) {
                dependency = tryParsing(NOTICE_BUNDLES_DEPENDENCY_PATTERN, line);
            }
            dependency.ifPresent(declaredDependencies::add);
        }

        return Optional.of(new NoticeContents(noticeModuleName, declaredDependencies));
    }