tianchen92 commented on a change in pull request #8552: [FLINK-12631]:Check if 
proper JAR file in JobWithJars
URL: https://github.com/apache/flink/pull/8552#discussion_r292009168
 
 

 ##########
 File path: 
flink-clients/src/main/java/org/apache/flink/client/program/JobWithJars.java
 ##########
 @@ -122,7 +123,11 @@ public static void checkJarFile(URL jar) throws 
IOException {
                if (!jarFile.canRead()) {
                        throw new IOException("JAR file can't be read '" + 
jarFile.getAbsolutePath() + "'");
                }
-               // TODO: Check if proper JAR file
+               try (JarFile f = new JarFile(jarFile)) {
+
+               } catch (IOException e) {
+                       throw new IOException("Error while opening jar file '" 
+ jarFile.getAbsolutePath() + "'", e);
+               }
 
 Review comment:
   Good suggestion, I have updated this PR, please help take a look, thanks a 
lot!

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to