Skip to content

Commit

Permalink
[sinttest] Fix NPE by checking that status is not null testCurrentPre…
Browse files Browse the repository at this point in the history
…senceSentAfterSubscriptionApproval()
  • Loading branch information
Flowdalic committed May 21, 2024
1 parent 34c2d52 commit 3749f52
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -412,7 +412,11 @@ public void testCurrentPresenceSentAfterSubscriptionApproval() throws Exception
final SimpleResultSyncPoint received = new SimpleResultSyncPoint();
final StanzaListener stanzaListener = 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();
}
};
Expand Down

0 comments on commit 3749f52

Please sign in to comment.