From b3072d9ef306b07df90a745a1c0bfa494282abe3 Mon Sep 17 00:00:00 2001 From: zzz <zzz@i2pmail.org> Date: Sun, 19 Jun 2022 12:05:39 -0400 Subject: [PATCH] SSU: PeerState _remotePeer cannot be null --- .../java/src/net/i2p/router/transport/udp/PeerState.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/router/java/src/net/i2p/router/transport/udp/PeerState.java b/router/java/src/net/i2p/router/transport/udp/PeerState.java index 2cde0fd19d..d6c82a6d86 100644 --- a/router/java/src/net/i2p/router/transport/udp/PeerState.java +++ b/router/java/src/net/i2p/router/transport/udp/PeerState.java @@ -443,10 +443,7 @@ public class PeerState { } /** - * The peer are we talking to. This should be set as soon as this - * state is created if we are initiating a connection, but if we are - * receiving the connection this will be set only after the connection - * is established. + * The peer are we talking to. Non-null. */ public Hash getRemotePeer() { return _remotePeer; } /** @@ -2372,8 +2369,7 @@ public class PeerState { public String toString() { StringBuilder buf = new StringBuilder(256); buf.append(_remoteHostId.toString()); - if (_remotePeer != null) - buf.append(" ").append(_remotePeer.toBase64().substring(0,6)); + buf.append(' ').append(_remotePeer.toBase64().substring(0,6)); if (getVersion() == 2) buf.append(_isInbound? " IB2 " : " OB2 "); -- GitLab