[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

@@ -35,20 +35,20 @@ public class GreeException extends Exception {
private static final long serialVersionUID = -2337258558995287405L;
private static String EX_NONE = "none";
public GreeException(Exception exception) {
public GreeException(@Nullable Exception exception) {
super(exception);
}
public GreeException(String message) {
public GreeException(@Nullable String message) {
super(message);
}
public GreeException(String message, Exception exception) {
public GreeException(@Nullable String message, @Nullable Exception exception) {
super(message, exception);
}
@Override
public String getMessage() {
public @Nullable String getMessage() {
return isEmpty() ? "" : nonNullString(super.getMessage());
}

View File

@@ -142,7 +142,7 @@ public class GreeDeviceFinder {
deviceTable.put(newDevice.getId(), newDevice);
}
public GreeAirDevice getDevice(String id) {
public @Nullable GreeAirDevice getDevice(String id) {
return deviceTable.get(id);
}