Adapt to changes in ExecUtil (#8690)
Signed-off-by: Connor Petty <mistercpp2000+gitsignoff@gmail.com>
This commit is contained in:
@@ -15,8 +15,25 @@ package org.openhab.binding.network.internal.utils;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.*;
|
||||
import java.util.*;
|
||||
import java.net.ConnectException;
|
||||
import java.net.DatagramPacket;
|
||||
import java.net.DatagramSocket;
|
||||
import java.net.Inet4Address;
|
||||
import java.net.InetAddress;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.NetworkInterface;
|
||||
import java.net.NoRouteToHostException;
|
||||
import java.net.PortUnreachableException;
|
||||
import java.net.Socket;
|
||||
import java.net.SocketAddress;
|
||||
import java.net.SocketException;
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.time.Duration;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
@@ -185,7 +202,7 @@ public class NetworkUtils {
|
||||
* Return true if the external arp ping utility (arping) is available and executable on the given path.
|
||||
*/
|
||||
public ArpPingUtilEnum determineNativeARPpingMethod(String arpToolPath) {
|
||||
String result = ExecUtil.executeCommandLineAndWaitResponse(arpToolPath + " --help", 100);
|
||||
String result = ExecUtil.executeCommandLineAndWaitResponse(Duration.ofMillis(100), arpToolPath, "--help");
|
||||
if (StringUtils.isBlank(result)) {
|
||||
return ArpPingUtilEnum.UNKNOWN_TOOL;
|
||||
} else if (result.contains("Thomas Habets")) {
|
||||
|
||||
Reference in New Issue
Block a user