mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 15:10:44 +01:00
Add null checks
This commit is contained in:
parent
19eb61f30c
commit
e7967cc0e1
3 changed files with 3 additions and 2 deletions
|
@ -288,7 +288,7 @@ public final class Offer implements StoragePayload, RequiresOwnerIsOnlinePayload
|
|||
|
||||
@Override
|
||||
public PublicKey getOwnerPubKey() {
|
||||
return pubKeyRing.getSignaturePubKey();
|
||||
return pubKeyRing != null ? pubKeyRing.getSignaturePubKey() : null;
|
||||
}
|
||||
|
||||
public long getProtocolVersion() {
|
||||
|
|
|
@ -540,6 +540,7 @@ public class Connection implements MessageListener {
|
|||
} else if (e instanceof EOFException || e instanceof StreamCorruptedException) {
|
||||
closeConnectionReason = CloseConnectionReason.TERMINATED;
|
||||
} else {
|
||||
// TODO sometimes we get StreamCorruptedException, OptionalDataException, IllegalStateException
|
||||
closeConnectionReason = CloseConnectionReason.UNKNOWN_EXCEPTION;
|
||||
log.warn("Unknown reason for exception at socket {}\n\tconnection={}\n\tException=",
|
||||
socket.toString(), this, e.toString());
|
||||
|
|
|
@ -443,7 +443,7 @@ public class P2PDataStorage implements MessageListener, ConnectionListener {
|
|||
result = expirableMailboxStoragePayload.receiverPubKeyForRemoveOperation.equals(protectedStorageEntry.ownerPubKey);
|
||||
} else {
|
||||
result = protectedStorageEntry != null && protectedStorageEntry.getStoragePayload() != null &&
|
||||
protectedStorageEntry.getStoragePayload().getOwnerPubKey().equals(protectedStorageEntry.ownerPubKey);
|
||||
protectedStorageEntry.ownerPubKey.equals(protectedStorageEntry.getStoragePayload().getOwnerPubKey());
|
||||
}
|
||||
|
||||
if (!result)
|
||||
|
|
Loading…
Add table
Reference in a new issue