[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

@@ -196,7 +196,9 @@ public class HeosBridgeHandler extends BaseBridgeHandler implements HeosEventLis
@Nullable
Group[] onlineGroups = getApiConnection().getGroups().payload;
updatePlayerStatus(onlinePlayers, onlineGroups);
if (onlinePlayers != null && onlineGroups != null) {
updatePlayerStatus(onlinePlayers, onlineGroups);
}
} catch (ReadException | IOException e) {
logger.debug("Failed updating online state of groups/players", e);
}

View File

@@ -18,6 +18,7 @@ import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.Collections;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
import org.eclipse.jdt.annotation.NonNullByDefault;
@@ -57,7 +58,7 @@ public class HeosJsonParser {
public <T> HeosResponseObject<T> parseResponse(String jsonBody, Class<T> clazz) {
HeosJsonWrapper wrapper = gson.fromJson(jsonBody, HeosJsonWrapper.class);
return postProcess(wrapper, clazz);
return postProcess(Objects.requireNonNull(wrapper), clazz);
}
private <T> HeosResponseObject<T> postProcess(HeosJsonWrapper wrapper, Class<T> clazz) {