Skip to content

Commit c0eb7c2

Browse files
authored
Replace NetIdentity with standard NetworkUtils (#285)
1 parent 3e2cc30 commit c0eb7c2

File tree

2 files changed

+3
-54
lines changed

2 files changed

+3
-54
lines changed

src/main/java/com/nordstrom/automation/selenium/core/GridUtility.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import org.openqa.selenium.Capabilities;
3939
import org.openqa.selenium.MutableCapabilities;
4040
import org.openqa.selenium.WebDriver;
41+
import org.openqa.selenium.net.NetworkUtils;
4142
import org.openqa.selenium.remote.RemoteWebDriver;
4243
import org.slf4j.Logger;
4344
import org.slf4j.LoggerFactory;
@@ -46,7 +47,6 @@
4647
import com.nordstrom.automation.selenium.DriverPlugin;
4748
import com.nordstrom.automation.selenium.SeleniumConfig;
4849
import com.nordstrom.automation.selenium.exceptions.GridServerLaunchFailedException;
49-
import com.nordstrom.automation.selenium.utility.NetIdentity;
5050
import com.nordstrom.common.base.UncheckedThrow;
5151
import com.nordstrom.common.file.PathUtils;
5252
import com.nordstrom.common.uri.UriUtils;
@@ -57,7 +57,7 @@
5757
public final class GridUtility {
5858

5959
private static final Logger LOGGER = LoggerFactory.getLogger(GridUtility.class);
60-
private static final NetIdentity IDENTITY = new NetIdentity();
60+
private static final NetworkUtils IDENTITY = new NetworkUtils();
6161

6262
/**
6363
* Private constructor to prevent instantiation.
@@ -310,7 +310,7 @@ public static HttpHost extractHost(URL url) {
310310
* @return IP address for the machine we're running on (a.k.a. - 'localhost')
311311
*/
312312
public static String getLocalHost() {
313-
return IDENTITY.getHostAddress();
313+
return IDENTITY.getNonLoopbackAddressOfThisMachine();
314314
}
315315

316316
/**

src/main/java/com/nordstrom/automation/selenium/utility/NetIdentity.java

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)