Apply "Anonymous type has shorter lambda alternative" refactoring.

This commit is contained in:
Andreas Schildbach 2020-09-07 19:16:39 +02:00
parent c08a4d97d3
commit b6b221ae1b

View File

@ -81,17 +81,14 @@ public class PeerMonitor {
}
private void lookupReverseDNS(final Peer peer) {
new Thread() {
@Override
public void run() {
// This can take a looooong time.
String reverseDns = peer.getAddress().getAddr().getCanonicalHostName();
synchronized (reverseDnsLookups) {
reverseDnsLookups.put(peer, reverseDns);
}
refreshUI();
new Thread(() -> {
// This can take a looooong time.
String reverseDns = peer.getAddress().getAddr().getCanonicalHostName();
synchronized (reverseDnsLookups) {
reverseDnsLookups.put(peer, reverseDns);
}
}.start();
refreshUI();
}).start();
}
private void refreshUI() {