Java 17 features (N-S) (#15565)
- 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 Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
@@ -200,7 +200,6 @@ public class NetworkOceanicThingHandler extends OceanicThingHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} catch (IOException e) {
|
||||
logger.debug("An exception occurred while quering host {}:{} : '{}'", config.ipAddress,
|
||||
|
||||
@@ -67,7 +67,6 @@ public class SerialOceanicThingHandler extends OceanicThingHandler implements Se
|
||||
SerialOceanicBindingConfiguration config = getConfigAs(SerialOceanicBindingConfiguration.class);
|
||||
|
||||
if (serialPort == null && config.port != null) {
|
||||
|
||||
SerialPortIdentifier portIdentifier = serialPortManager.getIdentifier(config.port);
|
||||
|
||||
if (portIdentifier == null) {
|
||||
@@ -172,7 +171,7 @@ public class SerialOceanicThingHandler extends OceanicThingHandler implements Se
|
||||
}
|
||||
|
||||
long timeStamp = System.currentTimeMillis();
|
||||
while (lastLineReceived.equals("")) {
|
||||
while ("".equals(lastLineReceived)) {
|
||||
try {
|
||||
Thread.sleep(50);
|
||||
} catch (InterruptedException e) {
|
||||
|
||||
Reference in New Issue
Block a user