[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

@@ -14,6 +14,7 @@ package org.openhab.binding.amazonechocontrol.internal.channelhandler;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.Objects;
import org.apache.commons.lang.StringEscapeUtils;
import org.eclipse.jdt.annotation.NonNullByDefault;
@@ -91,7 +92,7 @@ public class ChannelHandlerAnnouncement extends ChannelHandler {
body = e.getLocalizedMessage();
}
}
thingHandler.startAnnouncment(device, speak, body, title, volume);
thingHandler.startAnnouncment(device, speak, Objects.requireNonNullElse(body, ""), title, volume);
}
refreshChannel();
}

View File

@@ -673,7 +673,7 @@ public class AccountHandler extends BaseBridgeHandler implements IWebSocketComma
public void setEnabledFlashBriefingsJson(String flashBriefingJson) {
Connection currentConnection = connection;
JsonFeed[] feeds = gson.fromJson(flashBriefingJson, JsonFeed[].class);
if (currentConnection != null) {
if (currentConnection != null && feeds != null) {
try {
currentConnection.setEnabledFlashBriefings(feeds);
} catch (IOException | URISyntaxException e) {

View File

@@ -25,7 +25,8 @@ import com.google.gson.annotations.SerializedName;
@NonNullByDefault
public class JsonRegisterAppRequest {
public JsonRegisterAppRequest(String serial, String accessToken, String frc, JsonWebSiteCookie[] webSiteCookies) {
public JsonRegisterAppRequest(String serial, @Nullable String accessToken, String frc,
JsonWebSiteCookie[] webSiteCookies) {
registrationData.deviceSerial = serial;
authData.accessToken = accessToken;
userContextMap.frc = frc;