mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 12:02:05 +01:00
[sinttest] Fix NPE by checking that status is not null testCurrentPresenceSentAfterSubscriptionApproval()
This commit is contained in:
parent
34c2d5210e
commit
3749f524f5
1 changed files with 6 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Copyright 2015-2020 Florian Schmaus, 2022-2024 Guus der Kinderen
|
* Copyright 2015-2024 Florian Schmaus, 2022-2024 Guus der Kinderen
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -412,7 +412,11 @@ public class RosterIntegrationTest extends AbstractSmackIntegrationTest {
|
||||||
final SimpleResultSyncPoint received = new SimpleResultSyncPoint();
|
final SimpleResultSyncPoint received = new SimpleResultSyncPoint();
|
||||||
final StanzaListener stanzaListener = stanza -> {
|
final StanzaListener stanzaListener = stanza -> {
|
||||||
final Presence presence = (Presence) stanza;
|
final Presence presence = (Presence) stanza;
|
||||||
if (presence.getStatus().equals(needle)) {
|
|
||||||
|
String status = presence.getStatus();
|
||||||
|
if (status == null) return;
|
||||||
|
|
||||||
|
if (status.equals(needle)) {
|
||||||
received.signal();
|
received.signal();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue