You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ma...@apache.org on 2024/01/31 11:42:46 UTC

(flink) 02/08: [hotfix][ci] Fixes condition for filtering NOTICE files

This is an automated email from the ASF dual-hosted git repository.

mapohl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit f10702b8c235a3e4fb25f7efc89da5d775e74b2d
Author: Matthias Pohl <ma...@aiven.io>
AuthorDate: Fri Dec 8 17:17:05 2023 +0100

    [hotfix][ci] Fixes condition for filtering NOTICE files
---
 .../java/org/apache/flink/tools/ci/licensecheck/NoticeFileChecker.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/ci/flink-ci-tools/src/main/java/org/apache/flink/tools/ci/licensecheck/NoticeFileChecker.java b/tools/ci/flink-ci-tools/src/main/java/org/apache/flink/tools/ci/licensecheck/NoticeFileChecker.java
index 9a8b10db810..e39bcda1c50 100644
--- a/tools/ci/flink-ci-tools/src/main/java/org/apache/flink/tools/ci/licensecheck/NoticeFileChecker.java
+++ b/tools/ci/flink-ci-tools/src/main/java/org/apache/flink/tools/ci/licensecheck/NoticeFileChecker.java
@@ -359,7 +359,8 @@ public class NoticeFileChecker {
                 .filter(
                         file -> {
                             int nameCount = file.getNameCount();
-                            return file.getName(nameCount - 3).toString().equals("resources")
+                            return nameCount >= 3
+                                    && file.getName(nameCount - 3).toString().equals("resources")
                                     && file.getName(nameCount - 2).toString().equals("META-INF")
                                     && file.getName(nameCount - 1).toString().equals("NOTICE");
                         })