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:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user