summaryrefslogtreecommitdiffstats
path: root/vespaclient-container-plugin
diff options
context:
space:
mode:
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;
}
/**