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:
Holger Friedrich
2023-09-08 14:36:59 +02:00
committed by GitHub
parent 3751fd0646
commit edaf17b345
519 changed files with 2703 additions and 2660 deletions

View File

@@ -143,7 +143,7 @@ public class Mhub4K431Handler extends BaseThingHandler {
String content = "{CMD=";
content = content + command.toString() + "B";
content = content + String.valueOf(outputPort) + ".";
content = content + outputPort + ".";
InputStream stream = new ByteArrayInputStream(content.getBytes(StandardCharsets.UTF_8));

View File

@@ -114,11 +114,11 @@ public class MultiroomPlusHandler extends BaseThingHandler {
String httpMethod = "GET";
String url = "http://" + host + "/switch.cgi?command=3&data0=";
url = url + String.valueOf(outputPort) + "&data1=";
url = url + outputPort + "&data1=";
url = url + command.toString() + "&checksum=";
int checksum = 3 + outputPort + sourcePort;
url = url + String.valueOf(checksum);
url = url + checksum;
try {
HttpUtil.executeUrl(httpMethod, url, null, null, null, timeout);