Java 17 features (H-M) (#15520)
- add missing @override - Java style array syntax - remove redundant modifiers - always move String constants to left side in comparisons - simplify lambda expressions and return statements - use replace instead of replaceAll w/o regex - instanceof matching and multiline strings - remove null check before instanceof Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
@@ -98,7 +98,7 @@ public class IpObserverDiscoveryService extends AbstractDiscoveryService {
|
||||
InetAddress currentIP = InetAddress.getByAddress(ByteBuffer.allocate(4).putInt(i).array());
|
||||
// Try to reach each IP with a timeout of 500ms which is enough for local network
|
||||
if (currentIP.isReachable(500)) {
|
||||
String host = currentIP.getHostAddress().toString();
|
||||
String host = currentIP.getHostAddress();
|
||||
logger.debug("Unknown device was found at: {}", host);
|
||||
discoverySearchPool.execute(new IpObserverDiscoveryJob(this, host));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user