String getHostName() { String hostName = getEnv("HOSTNAME"); if (hostName == null || hostName.isEmpty()) { hostName = getEnv("COMPUTERNAME"); if (hostName == null || hostName.isEmpty()) { hostName = InetAddressUtil.getLocalHostName(); if (hostName == null || hostName.isEmpty()) { hostName = environment.getHostName(); } } } return hostName; }
String getHostName() { String hostName = getEnv("HOSTNAME"); if (hostName == null || hostName.isEmpty()) { hostName = getEnv("COMPUTERNAME"); if (hostName == null || hostName.isEmpty()) { hostName = InetAddressUtil.getLocalHostName(); if (hostName == null || hostName.isEmpty()) { hostName = environment.getHostName(); } } } return hostName; }