Remove Map null annotation workarounds (#8916)

These workarounds to prevent false positives can be removed now the EEAs allow for proper null analysis.

Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
Wouter Born
2020-11-04 13:57:24 +01:00
committed by GitHub
parent 1dccf67909
commit b423f93b1f
124 changed files with 315 additions and 387 deletions

View File

@@ -68,8 +68,8 @@ import org.slf4j.LoggerFactory;
@Component(service = ThingHandlerFactory.class, configurationPid = "binding.netatmo")
public class NetatmoHandlerFactory extends BaseThingHandlerFactory {
private final Logger logger = LoggerFactory.getLogger(NetatmoHandlerFactory.class);
private final Map<ThingUID, @Nullable ServiceRegistration<?>> discoveryServiceRegs = new HashMap<>();
private final Map<ThingUID, @Nullable ServiceRegistration<?>> webHookServiceRegs = new HashMap<>();
private final Map<ThingUID, ServiceRegistration<?>> discoveryServiceRegs = new HashMap<>();
private final Map<ThingUID, ServiceRegistration<?>> webHookServiceRegs = new HashMap<>();
private final HttpService httpService;
private final NATherm1StateDescriptionProvider stateDescriptionProvider;
private final TimeZoneProvider timeZoneProvider;
@@ -158,7 +158,7 @@ public class NetatmoHandlerFactory extends BaseThingHandlerFactory {
if (bundleContext != null) {
NetatmoModuleDiscoveryService discoveryService = new NetatmoModuleDiscoveryService(netatmoBridgeHandler,
localeProvider, translationProvider);
Map<String, @Nullable Object> configProperties = new HashMap<>();
Map<String, Object> configProperties = new HashMap<>();
configProperties.put(DiscoveryService.CONFIG_PROPERTY_BACKGROUND_DISCOVERY,
Boolean.valueOf(backgroundDiscovery));
discoveryService.activate(configProperties);

View File

@@ -58,7 +58,7 @@ public class NetatmoModuleDiscoveryService extends AbstractDiscoveryService impl
}
@Override
public void activate(@Nullable Map<String, @Nullable Object> configProperties) {
public void activate(@Nullable Map<String, Object> configProperties) {
super.activate(configProperties);
netatmoBridgeHandler.registerDataListener(this);
}