flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] zentol commented on a change in pull request #15883: [FLINK-22556][ci] Extend JarFileChecker to search for traces of incompatible licenses
Date Tue, 11 May 2021 08:22:02 GMT

zentol commented on a change in pull request #15883:
URL: https://github.com/apache/flink/pull/15883#discussion_r629953945



##########
File path: tools/ci/java-ci-tools/src/main/java/org/apache/flink/tools/ci/licensecheck/JarFileChecker.java
##########
@@ -188,4 +276,24 @@ private static int getNumLicenseFilesOutsideMetaInfDirectory(Path jar,
Path jarR
     private static String getFileName(Path path) {
         return path.getFileName().toString().toLowerCase();
     }
+
+    private static boolean pathStartsWith(Path file, String path) {
+        return file.startsWith(file.getFileSystem().getPath(path));
+    }
+
+    private static boolean equals(Path file, String path) {
+        return file.equals(file.getFileSystem().getPath(path));
+    }
+
+    private static boolean isNoClassFile(Path file) {
+        return !getFileName(file).endsWith(".class");
+    }
+
+    private static boolean isJavaxManifest(Path jar, Path potentialManifestFile) {
+        final String jarFileName = getFileName(jar);
+
+        return (jarFileName.startsWith("flink-s3-fs-hadoop")
+                        || jarFileName.startsWith("flink-s3-fs-presto"))

Review comment:
       found a more general solution




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message