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:
@@ -70,7 +70,7 @@ public class RdsDataPoints {
|
||||
* the Map, and b) by pointClass (which we do indirectly "double dereferenced"
|
||||
* via this index
|
||||
*/
|
||||
private final Map<String, @Nullable String> indexClassToId = new HashMap<>();
|
||||
private final Map<String, String> indexClassToId = new HashMap<>();
|
||||
|
||||
@SerializedName("totalCount")
|
||||
private @Nullable String totalCount;
|
||||
@@ -323,11 +323,11 @@ public class RdsDataPoints {
|
||||
throw new RdsCloudException("existing vs. new point class mismatch");
|
||||
}
|
||||
|
||||
myPoint.refreshValueFrom((BasePoint) newPoint);
|
||||
myPoint.refreshValueFrom(newPoint);
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("refresh {}.{}: {} << {}", getDescription(), myPoint.getPointClass(),
|
||||
myPoint.getState(), ((BasePoint) newPoint).getState());
|
||||
myPoint.getState(), newPoint.getState());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -349,9 +349,7 @@ public class RdsDataPoints {
|
||||
if (points != null) {
|
||||
indexClassToId.clear();
|
||||
for (Entry<String, @Nullable BasePoint> entry : points.entrySet()) {
|
||||
@Nullable
|
||||
String pointKey = entry.getKey();
|
||||
@Nullable
|
||||
BasePoint pointValue = entry.getValue();
|
||||
if (pointValue != null) {
|
||||
indexClassToId.put(pointValue.getPointClass(), pointKey);
|
||||
|
||||
@@ -19,7 +19,6 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* The {@link RdsDebouncer} determines if change events should be forwarded to a
|
||||
@@ -30,10 +29,8 @@ import org.eclipse.jdt.annotation.Nullable;
|
||||
@NonNullByDefault
|
||||
public class RdsDebouncer {
|
||||
|
||||
private final Map<String, @Nullable DebounceDelay> channels = new HashMap<>();
|
||||
private final Map<String, DebounceDelay> channels = new HashMap<>();
|
||||
|
||||
@SuppressWarnings("null")
|
||||
@NonNullByDefault
|
||||
static class DebounceDelay {
|
||||
|
||||
private long expireTime;
|
||||
@@ -58,10 +55,9 @@ public class RdsDebouncer {
|
||||
|
||||
public Boolean timeExpired(String channelId) {
|
||||
if (channels.containsKey(channelId)) {
|
||||
@Nullable
|
||||
DebounceDelay debounceDelay = channels.get(channelId);
|
||||
if (debounceDelay != null) {
|
||||
return ((DebounceDelay) debounceDelay).timeExpired();
|
||||
return debounceDelay.timeExpired();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -47,7 +47,7 @@ public class RdsHandlerFactory extends BaseThingHandlerFactory {
|
||||
private static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Collections
|
||||
.unmodifiableSet(new HashSet<>(Arrays.asList(THING_TYPE_CLOUD, THING_TYPE_RDS)));
|
||||
|
||||
private final Map<ThingUID, @Nullable ServiceRegistration<?>> discos = new HashMap<>();
|
||||
private final Map<ThingUID, ServiceRegistration<?>> discos = new HashMap<>();
|
||||
|
||||
@Override
|
||||
public boolean supportsThingType(ThingTypeUID thingTypeUID) {
|
||||
|
||||
Reference in New Issue
Block a user