1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-25 12:08:00 +01:00

[sinttest] Fix NPE by checking that status is not null testCurrentPresenceSentAfterSubscriptionApproval()

This commit is contained in:
Florian Schmaus 2024-05-21 13:06:58 +02:00
parent 34c2d5210e
commit 3749f524f5

View file

@ -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.
@ -412,7 +412,11 @@ public class RosterIntegrationTest extends AbstractSmackIntegrationTest {
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();
}
};