[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.wlanthermo.internal;
import java.net.URISyntaxException;
import java.util.Objects;
import java.util.concurrent.*;
import org.eclipse.jdt.annotation.NonNullByDefault;
@@ -108,7 +109,7 @@ public class WlanThermoMiniHandler extends BaseThingHandler {
try {
// Update objects with data from device
String json = httpClient.GET(config.getUri("/app.php")).getContentAsString();
app = gson.fromJson(json, App.class);
app = Objects.requireNonNull(gson.fromJson(json, App.class));
logger.debug("Received at /app.php: {}", json);
// Update channels

View File

@@ -14,6 +14,7 @@ package org.openhab.binding.wlanthermo.internal;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Objects;
import java.util.concurrent.*;
import org.eclipse.jdt.annotation.NonNullByDefault;
@@ -134,10 +135,10 @@ public class WlanThermoNanoHandler extends BaseThingHandler {
try {
// Update objects with data from device
String json = httpClient.GET(config.getUri("/data")).getContentAsString();
data = gson.fromJson(json, Data.class);
data = Objects.requireNonNull(gson.fromJson(json, Data.class));
logger.debug("Received at /data: {}", json);
json = httpClient.GET(config.getUri("/settings")).getContentAsString();
settings = gson.fromJson(json, Settings.class);
settings = Objects.requireNonNull(gson.fromJson(json, Settings.class));
logger.debug("Received at /settings: {}", json);
// Update channels