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

@@ -131,7 +131,7 @@ public class LutronHandlerFactory extends BaseThingHandlerFactory {
|| HW_DISCOVERABLE_DEVICE_TYPES_UIDS.contains(thingTypeUID);
}
private final Map<ThingUID, @Nullable ServiceRegistration<?>> discoveryServiceRegMap = new HashMap<>();
private final Map<ThingUID, ServiceRegistration<?>> discoveryServiceRegMap = new HashMap<>();
// Marked as Nullable only to fix incorrect redundant null check complaints after adding null annotations
@Override

View File

@@ -171,7 +171,7 @@ public class LutronMcastBridgeDiscoveryService extends AbstractDiscoveryService
StandardCharsets.US_ASCII);
Matcher matcher = BRIDGE_PROP_PATTERN.matcher(data);
Map<String, @Nullable String> bridgeProperties = new HashMap<>();
Map<String, String> bridgeProperties = new HashMap<>();
while (matcher.find()) {
bridgeProperties.put(matcher.group(1), matcher.group(2));

View File

@@ -16,6 +16,7 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
@@ -33,7 +34,7 @@ import org.slf4j.LoggerFactory;
public abstract class KeypadConfig {
private final Logger logger = LoggerFactory.getLogger(KeypadConfig.class);
protected final HashMap<String, @Nullable List<KeypadComponent>> modelData = new HashMap<>();
protected final Map<String, List<KeypadComponent>> modelData = new HashMap<>();
public abstract boolean isCCI(int id);