[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

@@ -149,7 +149,12 @@ class SpotifyConnector {
}
}
} catch (ExecutionException e) {
future.completeExceptionally(e.getCause());
Throwable cause = e.getCause();
if (cause != null) {
future.completeExceptionally(cause);
} else {
future.completeExceptionally(e);
}
} catch (RuntimeException | TimeoutException e) {
future.completeExceptionally(e);
} catch (InterruptedException e) {

View File

@@ -218,7 +218,7 @@ public class SpotifyBridgeHandler extends BaseBridgeHandler
@Override
public String getUser() {
return thing.getProperties().get(PROPERTY_SPOTIFY_USER);
return thing.getProperties().getOrDefault(PROPERTY_SPOTIFY_USER, "");
}
@Override