Another attempted fix at Network nulling

See title.
This commit is contained in:
Matthew Bell
2015-06-25 14:43:20 -04:00
parent afdc4901b3
commit f11339bce5
@@ -47,11 +47,14 @@ public class NetworkInterface {
if (realMac != null) if (realMac != null)
return realMac; return realMac;
try { try {
return realMac = java.net.NetworkInterface.getByInetAddress( byte[] b = java.net.NetworkInterface.getByInetAddress(
InetAddress.getLocalHost()).getHardwareAddress(); InetAddress.getLocalHost()).getHardwareAddress();
if(b == null)
b = mac;
realMac = b;
} catch (Exception ignored) { } catch (Exception ignored) {
} }
return mac; return realMac = mac;
} }
public static NetworkInterface getByInetAddress(InetAddress addr) { public static NetworkInterface getByInetAddress(InetAddress addr) {