File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
src/test/java/io/appium/java_client/service/local Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -64,21 +64,18 @@ public class ServerBuilderTest {
6464 private OutputStream stream ;
6565
6666 private static String getLocalIP (NetworkInterface intf ) {
67- String result = null ;
6867 for (Enumeration <InetAddress > enumIpAddr = intf .getInetAddresses (); enumIpAddr
6968 .hasMoreElements (); ) {
70- String calculated ;
7169 InetAddress inetAddress = enumIpAddr .nextElement ();
7270 if (!inetAddress .isLoopbackAddress ()) {
7371 InetAddressValidator validator = InetAddressValidator .getInstance ();
74- calculated = inetAddress .getHostAddress ().toString ();
72+ String calculated = inetAddress .getHostAddress ().toString ();
7573 if (validator .isValid (calculated )) {
76- result = calculated ;
77- break ;
74+ return calculated ;
7875 }
7976 }
8077 }
81- return result ;
78+ return null ;
8279 }
8380
8481 /**
You can’t perform that action at this time.
0 commit comments