Skip to content

Commit

Permalink
[client] Work around limitations of JDK 1.6 in InetSocketAddress
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanEwen committed Apr 22, 2015
1 parent 2b8db40 commit 8fc847e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ public Client(InetSocketAddress jobManagerAddress, Configuration config,

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());
Expand Down

0 comments on commit 8fc847e

Please sign in to comment.