From issues-return-176232-apmail-flink-issues-archive=flink.apache.org@flink.apache.org Tue Jul 10 10:04:06 2018 Return-Path: X-Original-To: apmail-flink-issues-archive@minotaur.apache.org Delivered-To: apmail-flink-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2E3F41858A for ; Tue, 10 Jul 2018 10:04:06 +0000 (UTC) Received: (qmail 72162 invoked by uid 500); 10 Jul 2018 10:04:06 -0000 Delivered-To: apmail-flink-issues-archive@flink.apache.org Received: (qmail 72121 invoked by uid 500); 10 Jul 2018 10:04:06 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 72112 invoked by uid 99); 10 Jul 2018 10:04:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jul 2018 10:04:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 8734518035C for ; Tue, 10 Jul 2018 10:04:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id ltq_zdW0XvlE for ; Tue, 10 Jul 2018 10:04:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id E40A55F42F for ; Tue, 10 Jul 2018 10:04:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 74D82E0F69 for ; Tue, 10 Jul 2018 10:04:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 22CD721EE9 for ; Tue, 10 Jul 2018 10:04:00 +0000 (UTC) Date: Tue, 10 Jul 2018 10:04:00 +0000 (UTC) From: "Florian Schmidt (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (FLINK-9787) Change ExecutionConfig#getGlobalJobParameters to return an instance of GlobalJobParameters instead of null if no custom globalJobParameters are set yet MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLINK-9787?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Florian Schmidt updated FLINK-9787: ----------------------------------- Fix Version/s: 2.0.0 Description:=20 Currently when accessing=C2=A0ExecutionConfig#getGlobalJobParameters this w= ill return `null` if no globalJobParameters are set. This can easily lead t= o NullPointerExceptions when used with getGlobalJobParameters.toMap() An easy improvement for this would be to just return a new instance of Glob= alJobParameters if none is set with the empty map as the parameters This would be a breaking change since we expose=C2=A0this=C2=A0via RuntimeC= ontext#getExecutionConfig was: Currently when accessing=C2=A0 =C2=A0 ExecutionConfig#getGlobalJobParameters this will return `null` if no global= JobParameters are set. This can easily lead to NullPointerExceptions when u= sed with getGlobalJobParameters.toMap() =C2=A0 An easy improvement for this would be to just return a new instance of Glob= alJobParameters if none is set with the empty map as the parameters > Change ExecutionConfig#getGlobalJobParameters to return an instance of Gl= obalJobParameters instead of null if no custom globalJobParameters are set = yet > -------------------------------------------------------------------------= ---------------------------------------------------------------------------= --- > > Key: FLINK-9787 > URL: https://issues.apache.org/jira/browse/FLINK-9787 > Project: Flink > Issue Type: Improvement > Reporter: Florian Schmidt > Assignee: Florian Schmidt > Priority: Minor > Fix For: 2.0.0 > > > Currently when accessing=C2=A0ExecutionConfig#getGlobalJobParameters this= will return `null` if no globalJobParameters are set. This can easily lead= to NullPointerExceptions when used with getGlobalJobParameters.toMap() > An easy improvement for this would be to just return a new instance of Gl= obalJobParameters if none is set with the empty map as the parameters > This would be a breaking change since we expose=C2=A0this=C2=A0via Runtim= eContext#getExecutionConfig -- This message was sent by Atlassian JIRA (v7.6.3#76005)