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

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

commit 227f50b2b66ec8963d637d8929088aca91d88c04
Author: Matthias Pohl <[email protected]>
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");
                         })

Reply via email to