[ 
https://issues.apache.org/jira/browse/FLINK-5541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16085233#comment-16085233
 ] 

ASF GitHub Bot commented on FLINK-5541:
---------------------------------------

GitHub user zhangminglei opened a pull request:

    https://github.com/apache/flink/pull/4315

    [FLINK-5541] Missing null check for localJar in FlinkSubmitter#submit…

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zhangminglei/flink flink-5541

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/4315.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4315
    
----
commit 105ea265b9c565c8036b5a4de3b633885938aeff
Author: zhangminglei <zml13856086...@163.com>
Date:   2017-07-13T06:01:33Z

    [FLINK-5541] Missing null check for localJar in 
FlinkSubmitter#submitTopology

----


> Missing null check for localJar in FlinkSubmitter#submitTopology()
> ------------------------------------------------------------------
>
>                 Key: FLINK-5541
>                 URL: https://issues.apache.org/jira/browse/FLINK-5541
>             Project: Flink
>          Issue Type: Bug
>          Components: Storm Compatibility
>            Reporter: Ted Yu
>            Assignee: mingleizhang
>            Priority: Minor
>
> {code}
>       if (localJar == null) {
>         try {
>           for (final URL url : ((ContextEnvironment) 
> ExecutionEnvironment.getExecutionEnvironment())
>               .getJars()) {
>             // TODO verify that there is only one jar
>             localJar = new File(url.toURI()).getAbsolutePath();
>           }
>         } catch (final URISyntaxException e) {
>           // ignore
>         } catch (final ClassCastException e) {
>           // ignore
>         }
>       }
>       logger.info("Submitting topology " + name + " in distributed mode with 
> conf " + serConf);
>       client.submitTopologyWithOpts(name, localJar, topology);
> {code}
> Since the try block may encounter URISyntaxException / ClassCastException, we 
> should check that localJar is not null before calling 
> submitTopologyWithOpts().



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to