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:
@@ -86,7 +86,7 @@ public class AutelisDiscoveryParticipant implements UpnpDiscoveryParticipant {
|
||||
device.getDetails().getModelDetails().getModelNumber());
|
||||
if (device.getDetails().getManufacturerDetails().getManufacturer().toLowerCase().startsWith(MANUFACTURER)) {
|
||||
logger.debug("Autelis Pool Control Found at {}", device.getDetails().getBaseURL());
|
||||
String id = device.getIdentity().getUdn().getIdentifierString().replaceAll(":", "").toUpperCase();
|
||||
String id = device.getIdentity().getUdn().getIdentifierString().replace(":", "").toUpperCase();
|
||||
if (device.getDetails().getModelDetails().getModelNumber().toLowerCase().startsWith(MODEL_PENTAIR)) {
|
||||
return new ThingUID(AutelisBindingConstants.PENTAIR_THING_TYPE_UID, id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user