Return-Path: X-Original-To: apmail-flink-commits-archive@minotaur.apache.org Delivered-To: apmail-flink-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 80262174F9 for ; Wed, 22 Apr 2015 12:58:24 +0000 (UTC) Received: (qmail 81745 invoked by uid 500); 22 Apr 2015 12:58:21 -0000 Delivered-To: apmail-flink-commits-archive@flink.apache.org Received: (qmail 81712 invoked by uid 500); 22 Apr 2015 12:58:21 -0000 Mailing-List: contact commits-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 commits@flink.apache.org Received: (qmail 81702 invoked by uid 99); 22 Apr 2015 12:58:21 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Apr 2015 12:58:21 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 35746E00BA; Wed, 22 Apr 2015 12:58:21 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sewen@apache.org To: commits@flink.apache.org Message-Id: <3dd746f65b2246d4a8940279dd8f11c7@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: flink git commit: [client] Work around limitations of JDK 1.6 in InetSocketAddress Date: Wed, 22 Apr 2015 12:58:21 +0000 (UTC) Repository: flink Updated Branches: refs/heads/master 2b8db40ac -> 8fc847e5b [client] Work around limitations of JDK 1.6 in InetSocketAddress Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/8fc847e5 Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/8fc847e5 Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/8fc847e5 Branch: refs/heads/master Commit: 8fc847e5b632c5f311f7a4dfc55204c486283c58 Parents: 2b8db40 Author: Stephan Ewen Authored: Wed Apr 22 14:48:22 2015 +0200 Committer: Stephan Ewen Committed: Wed Apr 22 14:48:22 2015 +0200 ---------------------------------------------------------------------- .../src/main/java/org/apache/flink/client/program/Client.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/8fc847e5/flink-clients/src/main/java/org/apache/flink/client/program/Client.java ---------------------------------------------------------------------- diff --git a/flink-clients/src/main/java/org/apache/flink/client/program/Client.java b/flink-clients/src/main/java/org/apache/flink/client/program/Client.java index c61e814..e219a38 100644 --- a/flink-clients/src/main/java/org/apache/flink/client/program/Client.java +++ b/flink-clients/src/main/java/org/apache/flink/client/program/Client.java @@ -114,7 +114,11 @@ public class Client { if (jobManagerAddress.isUnresolved()) { // address is unresolved, resolve it - String host = jobManagerAddress.getHostString(); + String host = jobManagerAddress.getHostName(); + if (host == null) { + throw new IllegalArgumentException("Host in jobManagerAddress is null"); + } + try { InetAddress address = InetAddress.getByName(host); this.jobManagerAddress = new InetSocketAddress(address, jobManagerAddress.getPort());