[tr064] log warning if config invalid (#9529)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
This commit is contained in:
parent
ee93229d3c
commit
883b251626
@ -12,7 +12,6 @@
|
||||
*/
|
||||
package org.openhab.binding.tr064.internal.config;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
@ -27,7 +26,7 @@ public class Tr064SubConfiguration extends Tr064BaseThingConfiguration {
|
||||
public String uuid = "";
|
||||
|
||||
// Lan Device
|
||||
public List<String> macOnline = Collections.emptyList();
|
||||
public List<String> macOnline = List.of();
|
||||
|
||||
public boolean isValid() {
|
||||
return !uuid.isEmpty();
|
||||
|
||||
@ -259,7 +259,15 @@ public class Util {
|
||||
// validate parameter against pattern
|
||||
String parameterPattern = parameter.getPattern();
|
||||
if (parameterPattern != null) {
|
||||
parameters.removeIf(param -> !param.matches(parameterPattern));
|
||||
parameters.removeIf(param -> {
|
||||
if (!param.matches(parameterPattern)) {
|
||||
LOGGER.warn("Removing {} while processing {}, does not match pattern {}, check config.", param,
|
||||
channelId, parameterPattern);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// validate parameter against SCPD (if not internal only)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user