mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Insert null checks
This commit is contained in:
parent
f066fc2413
commit
d13dceb4ab
@ -17,6 +17,8 @@
|
||||
|
||||
package bisq.monitor.metric;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.ArrayList;
|
||||
@ -243,6 +245,8 @@ public class P2PNetworkLoad extends Metric implements MessageListener, SetupList
|
||||
});
|
||||
}
|
||||
|
||||
checkNotNull(connection.peersNodeAddressProperty(),
|
||||
"although the property is nullable, we need it to not be null");
|
||||
bucketsPerHost.put(connection.peersNodeAddressProperty().getValue(), buckets);
|
||||
|
||||
connection.removeMessageListener(this);
|
||||
|
@ -17,6 +17,8 @@
|
||||
|
||||
package bisq.monitor.metric;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@ -209,6 +211,8 @@ public class P2PNetworkMessageSnapshot extends Metric implements MessageListener
|
||||
});
|
||||
}
|
||||
|
||||
checkNotNull(connection.peersNodeAddressProperty(),
|
||||
"although the property is nullable, we need it to not be null");
|
||||
bucketsPerHost.put(connection.peersNodeAddressProperty().getValue(), buckets);
|
||||
|
||||
connection.removeMessageListener(this);
|
||||
|
Loading…
Reference in New Issue
Block a user