[infrastructure] add external null-annotations (#8848)

Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
This commit is contained in:
J-N-K
2020-10-31 00:29:03 +01:00
committed by GitHub
parent 47d05055db
commit bd664ff0c8
162 changed files with 933 additions and 575 deletions

View File

@@ -15,6 +15,7 @@ package org.openhab.binding.automower.internal.rest.exceptions;
import java.io.IOException;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
/**
* An exception that occurred while communicating with an automower or an automower bridge
@@ -57,8 +58,9 @@ public class AutomowerCommunicationException extends IOException {
}
@Override
public String getMessage() {
return "Rest call failed: statusCode=" + statusCode + ", message=" + super.getMessage();
public @Nullable String getMessage() {
String message = super.getMessage();
return message == null ? null : "Rest call failed: statusCode=" + statusCode + ", message=" + message;
}
@Override