jiajunwang commented on a change in pull request #1740:
URL: https://github.com/apache/helix/pull/1740#discussion_r633827503



##########
File path: 
zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/NetworkUtil.java
##########
@@ -120,7 +120,7 @@ public static String getLocalhostName() {
         try {
             return InetAddress.getLocalHost().getHostName();
         } catch (final UnknownHostException e) {
-            throw new RuntimeException("unable to retrieve localhost name");
+            return "UNKNOWN";

Review comment:
       Then I think we should not change it.
   1. Throw exception is the right way when the tool hits any problem.
   2. If you are convinced that no one is using this method, just remove or 
deprecate it.
   
   This change does not make sense to me.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to