[infrastructure] move infered nullness warnings to error and update EEA (#8949)

Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
This commit is contained in:
J-N-K
2020-11-12 21:07:11 +01:00
committed by GitHub
parent 0856a0b3f2
commit ba4c96d99d
155 changed files with 644 additions and 632 deletions

View File

@@ -16,15 +16,9 @@ import static org.openhab.io.homekit.internal.HomekitAccessoryType.*;
import static org.openhab.io.homekit.internal.HomekitCharacteristicType.*;
import java.lang.reflect.InvocationTargetException;
import java.util.*;
import java.util.AbstractMap.SimpleEntry;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@@ -368,8 +362,8 @@ public class HomekitAccessoryFactory {
characteristics.forEach((type, item) -> {
try {
// check whether a proxyItem already exists, if not create one.
final HomekitOHItemProxy proxyItem = proxyItems.computeIfAbsent(item.getUID(),
k -> new HomekitOHItemProxy(item));
final HomekitOHItemProxy proxyItem = Objects
.requireNonNull(proxyItems.computeIfAbsent(item.getUID(), k -> new HomekitOHItemProxy(item)));
final HomekitTaggedItem optionalItem = new HomekitTaggedItem(proxyItem,
accessory.getRootAccessory().getAccessoryType(), type,
accessory.getRootAccessory().getRootDeviceGroupItem(),