Java 17 features (T-Z) (#15576)

- 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-21 07:58:53 +02:00
committed by GitHub
parent bf1aa3deb2
commit 1b122a53b9
277 changed files with 1402 additions and 1298 deletions

View File

@@ -151,7 +151,7 @@ public class WindcentraleDiscoveryService extends AbstractDiscoveryService
}
private void addWindmillDiscoveryResult(ThingUID bridgeUID, Windmill windmill, int shares) {
String deviceId = windmill.getName().toLowerCase().replaceAll(" ", "-");
String deviceId = windmill.getName().toLowerCase().replace(" ", "-");
ThingUID thingUID = new ThingUID(THING_TYPE_WINDMILL, bridgeUID, deviceId);
thingDiscovered(DiscoveryResultBuilder.create(thingUID) //