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

@@ -76,7 +76,7 @@ public class AlarmDecoderHandlerFactory extends BaseThingHandlerFactory {
return SUPPORTED_THING_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 from null annotations
@Override

View File

@@ -13,6 +13,7 @@
package org.openhab.binding.alarmdecoder.internal.protocol;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
@@ -34,7 +35,7 @@ public enum ADMsgType {
INVALID; // invalid message
/** hash map from protocol message heading to type */
private static HashMap<String, @Nullable ADMsgType> startToMsgType = new HashMap<>();
private static Map<String, ADMsgType> startToMsgType = new HashMap<>();
static {
startToMsgType.put("!REL", ADMsgType.REL);