[infrastructure] move infered nullness warnings to error and update EEA (#8949)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
This commit is contained in:
@@ -12,12 +12,8 @@
|
||||
*/
|
||||
package org.openhab.binding.dsmr.internal.discovery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
@@ -148,8 +144,9 @@ public class DSMRMeterDiscoveryService extends DSMRDiscoveryService implements P
|
||||
.filter(DSMRMeterHandler.class::isInstance)
|
||||
.map(DSMRMeterHandler.class::cast)
|
||||
.map(h -> h == null ? null : h.getMeterDescriptor())
|
||||
.map(d -> d == null ? null : d.getMeterType())
|
||||
.filter(Objects::nonNull)
|
||||
.map(d -> Optional.ofNullable(d == null ? null : d.getMeterType()))
|
||||
.filter(Optional::isPresent)
|
||||
.map(Optional::get)
|
||||
.collect(Collectors.toSet());
|
||||
// @formatter:on
|
||||
// Create list of all configured meters that are not in the detected list. If not empty meters might not be
|
||||
|
||||
Reference in New Issue
Block a user