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:
@@ -93,8 +93,7 @@ public final class AnalogMessage extends Message {
|
||||
public AnalogValue getAnalogValue(int portNumber) {
|
||||
// Get the internal index for portNumber within the message
|
||||
int idx = (portNumber - 1) % 4;
|
||||
AnalogValue value = new AnalogValue(this.getValue(idx), getMeasureType(idx));
|
||||
return value;
|
||||
return new AnalogValue(this.getValue(idx), getMeasureType(idx));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.openhab.core.types.State;
|
||||
@NonNullByDefault
|
||||
public class ApiPageEntry {
|
||||
|
||||
static enum Type {
|
||||
enum Type {
|
||||
READ_ONLY_SWITCH(true),
|
||||
READ_ONLY_NUMERIC(true),
|
||||
NUMERIC_FORM(false),
|
||||
|
||||
@@ -30,7 +30,7 @@ public class ChangerX2Entry {
|
||||
public static final String NUMBER_MAX = "max";
|
||||
public static final String NUMBER_STEP = "step";
|
||||
|
||||
static enum OptionType {
|
||||
enum OptionType {
|
||||
NUMBER,
|
||||
SELECT,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user