Java 17 features (A-G) (#15516)
- 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 Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
*/
|
||||
package org.openhab.binding.dlinksmarthome.internal;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
@@ -32,7 +31,7 @@ public class DLinkSmartHomeBindingConstants {
|
||||
// List of all Thing Type UIDs
|
||||
public static final ThingTypeUID THING_TYPE_DCHS150 = new ThingTypeUID(BINDING_ID, "DCH-S150");
|
||||
|
||||
public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Collections.singleton(THING_TYPE_DCHS150);
|
||||
public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Set.of(THING_TYPE_DCHS150);
|
||||
|
||||
// Motion trigger channel
|
||||
public static final String MOTION = "motion";
|
||||
|
||||
@@ -87,7 +87,7 @@ public class DLinkSmartHomeDiscoveryParticipant implements MDNSDiscoveryParticip
|
||||
|
||||
if (model == null) {
|
||||
return null;
|
||||
} else if (model.equals("DCH-S150")) {
|
||||
} else if ("DCH-S150".equals(model)) {
|
||||
return THING_TYPE_DCHS150;
|
||||
} else {
|
||||
logger.debug("D-Link HNAP Type: {}", model);
|
||||
|
||||
Reference in New Issue
Block a user