Skip to content

Commit

Permalink
constant
Browse files Browse the repository at this point in the history
  • Loading branch information
qingliang.ql committed Feb 25, 2019
1 parent 2b38145 commit 47e7531
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ public class InetUtils {
selfIp = nacosIp;

if (StringUtils.isBlank(selfIp)) {
preferHostnameOverIp = Boolean.valueOf(System.getProperty("nacos.preferHostnameOverIp"));
preferHostnameOverIp = Boolean.parseBoolean(System.getProperty("nacos.preferHostnameOverIp"));

if (!preferHostnameOverIp) {
preferHostnameOverIp = Boolean.valueOf(PropertyUtil.getProperty(PREFER_HOSTNAME_OVER_IP));
preferHostnameOverIp = Boolean.parseBoolean(PropertyUtil.getProperty(PREFER_HOSTNAME_OVER_IP));
}

if (preferHostnameOverIp) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ public class SystemUtils {

private static final Logger logger = LoggerFactory.getLogger(SystemUtils.class);

/**
* Flag to say that, when guessing a hostname, the hostname of the server should be used in preference to the IP
* address reported by the OS.
*/
public static boolean PREFER_HOSTNAME_OVER_IP = Boolean.getBoolean(PREFER_HOSTNAME_OVER_IP_PROPERTY_NAME);

/**
* Standalone mode or not
*/
Expand Down

0 comments on commit 47e7531

Please sign in to comment.