<p><b>@julianknutsen</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/3747#discussion_r355572548">p2p/src/main/java/bisq/network/p2p/storage/P2PDataStorage.java</a>:</p>
<pre style='color:#555'>> -                                    if (protectedStorageEntry.isExpired(this.clock)) {
-                                        log.info("We found an expired data entry which we have already back dated. " +
-                                                "We remove the protectedStoragePayload:\n\t" + Utilities.toTruncatedString(protectedStorageEntry.getProtectedStoragePayload(), 100));
-                                        removeFromMapAndDataStore(protectedStorageEntry, hashOfPayload);
-                                    }
-                                } else {
-                                    log.debug("Remove data ignored as we don't have an entry for that data.");
-                                }
-                            }
-                        }
-                    });
-        }
+        if (closeConnectionReason.isIntended)
+            return;
+
+        if (!connection.getPeersNodeAddressOptional().isPresent())
</pre>
<p>I wish there was a better reason than this one, but I used this pattern because it reduces the number of lint errors from IDEA. If you don't have an <code>isPresent()</code> call prior to a <code>get()</code> it will highlight the word and raise an alert. You can suppress it, but that is just more code to add.</p>
<p>The other benefit is that mocking is bit less error-prone because you just need to mock out the Optional and not the wrapper class that has the <code>hasPeerNodeAddress()</code> function.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/3747?email_source=notifications&email_token=AJFFTNSMVFECTP5YOHMZ6A3QXZ3YFA5CNFSM4JVOFKAKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCOOVVDA#discussion_r355572548">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNXCXNLL4ULXYA6UBM3QXZ3YFANCNFSM4JVOFKAA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNU4U35GIRDKQTTBR5LQXZ3YFA5CNFSM4JVOFKAKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCOOVVDA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/3747?email_source=notifications\u0026email_token=AJFFTNSMVFECTP5YOHMZ6A3QXZ3YFA5CNFSM4JVOFKAKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCOOVVDA#discussion_r355572548",
"url": "https://github.com/bisq-network/bisq/pull/3747?email_source=notifications\u0026email_token=AJFFTNSMVFECTP5YOHMZ6A3QXZ3YFA5CNFSM4JVOFKAKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCOOVVDA#discussion_r355572548",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>