diff options
author | Martin Polden <mpolden@mpolden.no> | 2019-05-07 09:13:29 +0200 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2019-05-07 13:57:42 +0200 |
commit | 63b5ec1acff2ab812b33e0ef549836f07355b0df (patch) | |
tree | 2583088e7caf6beabbda67a2940b0a151850e0d0 /node-repository | |
parent | 0cfcb882df47df13b58ac3fd1a7f12db55d48ba7 (diff) |
Use unwrapped optional in exception message
Diffstat (limited to 'node-repository')
-rw-r--r-- | node-repository/src/main/java/com/yahoo/vespa/hosted/provision/node/IP.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/node/IP.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/node/IP.java index 544585c43ed..7433b92e1fa 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/node/IP.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/node/IP.java @@ -155,7 +155,7 @@ public class IP { } Optional<String> ipv4Address = ipv4Addresses.stream().findFirst(); ipv4Address.ifPresent(addr -> { - String hostname4 = resolver.getHostname(addr).orElseThrow(() -> new IllegalArgumentException("Could not resolve IP address: " + ipv4Address)); + String hostname4 = resolver.getHostname(addr).orElseThrow(() -> new IllegalArgumentException("Could not resolve IP address: " + addr)); if (!hostname6.equals(hostname4)) { throw new IllegalArgumentException(String.format("Hostnames resolved from each IP address do not " + "point to the same hostname [%s -> %s, %s -> %s]", |