mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-15 08:45:04 +01:00
Spotbugs: don't doubleCheck Map contains value, just check for null
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
efdfe83507
commit
9ae722659f
@ -60,11 +60,13 @@ public class WebSocketConnectionHelper {
|
||||
|
||||
@SuppressLint("LongLogTag")
|
||||
public static synchronized MagicWebSocketInstance getMagicWebSocketInstanceForUserId(long userId) {
|
||||
if (userId != -1 && magicWebSocketInstanceMap.containsKey(userId)) {
|
||||
return magicWebSocketInstanceMap.get(userId);
|
||||
MagicWebSocketInstance webSocketInstance = magicWebSocketInstanceMap.get(userId);
|
||||
|
||||
if (webSocketInstance == null) {
|
||||
Log.d(TAG, "No magicWebSocketInstance found for user " + userId);
|
||||
}
|
||||
Log.d(TAG, "no magicWebSocketInstance found");
|
||||
return null;
|
||||
|
||||
return webSocketInstance;
|
||||
}
|
||||
|
||||
public static synchronized MagicWebSocketInstance getExternalSignalingInstanceForServer(String url,
|
||||
|
Loading…
Reference in New Issue
Block a user