You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Chesnay Schepler (JIRA)" <ji...@apache.org> on 2017/07/19 14:54:00 UTC
[jira] [Closed] (FLINK-5541) Missing null check for localJar in
FlinkSubmitter#submitTopology()
[ https://issues.apache.org/jira/browse/FLINK-5541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chesnay Schepler closed FLINK-5541.
-----------------------------------
Resolution: Fixed
Fix Version/s: 1.4.0
1.4: 9beccec4501e84cf8c9fa5e8ee0a491afb39f4ac
> 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
> Fix For: 1.4.0
>
>
> {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)