Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Commit

Permalink
Refactor hostname logic (#2718)
Browse files Browse the repository at this point in the history
* Refactor hostname logic

* Fix checksytle issues
  • Loading branch information
aahmed-se authored and kramasamy committed Feb 13, 2018
1 parent a2f0008 commit 68643ed
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,12 @@ private String getHostNameOrIP() {
// Override hostname if provided in flags
if (StringUtil.isNotBlank(getDownloadHostName())) {
return getDownloadHostName();
} else if (StringUtil.isNotBlank(hostname)) {
return hostname;
} else if (ip != null && StringUtil.isNotBlank(ip.toString())) {
return ip.toString();
}
return (hostname != null) ? hostname : ((ip != null) ? ip.toString() : "");
return "";
}

}

0 comments on commit 68643ed

Please sign in to comment.