mirror of
https://github.com/nextcloud/talk-android
synced 2025-01-20 14:17:46 +00:00
fix spotbug warning "PRMC: Possibly Redundant Method Calls"
PRMC: In class com.nextcloud.talk.utils.ssl.MagicKeyManager In class com.nextcloud.talk.utils.ssl.MagicKeyManager In method com.nextcloud.talk.utils.ssl.MagicKeyManager.chooseClientAlias(String[], Principal[], Socket) At MagicKeyManager.java:[line 68] Value getCurrentUser()Lio/reactivex/Maybe; Method com.nextcloud.talk.utils.ssl.MagicKeyManager.chooseClientAlias(String[], Principal[], Socket) appears to call the same method on the same object redundantly Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
e238c4c9e5
commit
da8148a134
@ -64,8 +64,9 @@ public class MagicKeyManager implements X509KeyManager {
|
||||
@Override
|
||||
public String chooseClientAlias(String[] strings, Principal[] principals, Socket socket) {
|
||||
String alias;
|
||||
if ((userManager.getCurrentUser().blockingGet() != null &&
|
||||
!TextUtils.isEmpty(alias = userManager.getCurrentUser().blockingGet().getClientCertificate())) ||
|
||||
User currentUser = userManager.getCurrentUser().blockingGet();
|
||||
if ((currentUser != null &&
|
||||
!TextUtils.isEmpty(alias = currentUser.getClientCertificate())) ||
|
||||
!TextUtils.isEmpty(alias = appPreferences.getTemporaryClientCertAlias())
|
||||
&& new ArrayList<>(Arrays.asList(getClientAliases())).contains(alias)) {
|
||||
return alias;
|
||||
|
Loading…
Reference in New Issue
Block a user