summaryrefslogtreecommitdiffstats
path: root/vespaclient-container-plugin
diff options
context:
space:
mode:
authorArne Juul <arnej@yahoo-inc.com>2016-06-19 12:41:14 +0200
committerArne Juul <arnej@yahoo-inc.com>2016-06-19 12:41:14 +0200
commit1c7e21189cbf494fac8dd3a471a062e2e52b9ffb (patch)
tree70400baff23c5107f7e2adbc6ba45c2971fc82a0 /vespaclient-container-plugin
parentea6499086b656357b8be2f14773ef3af102450eb (diff)
LinuxInetAddress.getLocalHost() no longer throws
Diffstat (limited to 'vespaclient-container-plugin')
-rw-r--r--vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/FeedHandler.java12
1 files changed, 4 insertions, 8 deletions
diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/FeedHandler.java b/vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/FeedHandler.java
index 3c532d94b24..2e16b4a2dd0 100644
--- a/vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/FeedHandler.java
+++ b/vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/FeedHandler.java
@@ -278,16 +278,12 @@ public class FeedHandler extends LoggingRequestHandler {
}
private static String resolveLocalHostname() {
- try {
- InetAddress inetAddress = LinuxInetAddress.getLocalHost();
- String hostname = inetAddress.getCanonicalHostName();
- if (hostname.equals("localhost")) {
- return "";
- }
- return inetAddress.getCanonicalHostName();
- } catch (UnknownHostException e) {
+ InetAddress inetAddress = LinuxInetAddress.getLocalHost();
+ String hostname = inetAddress.getCanonicalHostName();
+ if (hostname.equals("localhost")) {
return "";
}
+ return hostname;
}
/**