[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

@@ -13,6 +13,7 @@
package org.openhab.binding.revogi.internal.api;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.CompletableFuture;
import org.eclipse.jdt.annotation.NonNullByDefault;
@@ -69,7 +70,7 @@ public class StatusService {
private StatusRawDTO deserializeString(String response) {
String extractedJsonResponse = response.substring(response.lastIndexOf(VERSION_STRING) + 2);
try {
return gson.fromJson(extractedJsonResponse, StatusRawDTO.class);
return Objects.requireNonNull(gson.fromJson(extractedJsonResponse, StatusRawDTO.class));
} catch (JsonSyntaxException e) {
logger.warn("Could not parse string \"{}\" to StatusRaw", response, e);
return new StatusRawDTO(503, 0, new StatusDTO(false, 503, null, null, null));

View File

@@ -13,6 +13,7 @@
package org.openhab.binding.revogi.internal.api;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.CompletableFuture;
import org.eclipse.jdt.annotation.NonNullByDefault;
@@ -76,7 +77,7 @@ public class SwitchService {
private SwitchResponseDTO deserializeString(String response) {
String extractedJsonResponse = response.substring(response.lastIndexOf(VERSION_STRING) + 2);
try {
return gson.fromJson(extractedJsonResponse, SwitchResponseDTO.class);
return Objects.requireNonNull(gson.fromJson(extractedJsonResponse, SwitchResponseDTO.class));
} catch (JsonSyntaxException e) {
logger.warn("Could not parse string \"{}\" to SwitchResponse", response);
return new SwitchResponseDTO(0, 503);