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:
@@ -36,7 +36,7 @@ public class OnOffResponse implements LGSerialResponse {
|
||||
this.success = success;
|
||||
|
||||
if (success) {
|
||||
state = data.equals("01") ? OnOffType.ON : OnOffType.OFF;
|
||||
state = "01".equals(data) ? OnOffType.ON : OnOffType.OFF;
|
||||
} else {
|
||||
state = new StringType(data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user