mirror of
https://github.com/rapid7/metasploit-payloads
synced 2025-03-18 15:14:10 +01:00
Land #461, fix empty string comparison
This commit is contained in:
commit
38ca7adb8b
@ -29,7 +29,7 @@ public class Utils {
|
|||||||
public static String getHostname() {
|
public static String getHostname() {
|
||||||
try {
|
try {
|
||||||
String result = InetAddress.getLocalHost().getHostName();
|
String result = InetAddress.getLocalHost().getHostName();
|
||||||
if (result != "") {
|
if (result.length() != 0) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
} catch (UnknownHostException e) { }
|
} catch (UnknownHostException e) { }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user