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

@@ -273,8 +273,7 @@ public abstract class WeatherCompanyAbstractHandler extends BaseThingHandler {
protected DateTimeType getLocalDateTimeType(long epochSeconds) {
Instant instant = Instant.ofEpochSecond(epochSeconds);
ZonedDateTime localDateTime = instant.atZone(getZoneId());
DateTimeType dateTimeType = new DateTimeType(localDateTime);
return dateTimeType;
return new DateTimeType(localDateTime);
}
/*