3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-07 14:54:15 +00:00

PeerGroup: add a couple of missing nullable annotations

This commit is contained in:
Mike Hearn 2013-12-15 09:27:38 -08:00
parent c61ec5023e
commit 42e75b86cf

View File

@ -701,13 +701,15 @@ public class PeerGroup extends AbstractIdleService implements TransactionBroadca
*
* @param address destination IP and port.
* @return The newly created Peer object. Use {@link com.google.bitcoin.core.Peer#getConnectionOpenFuture()} if you
* want a future which completes when the connection is open.
* want a future which completes when the connection is open, or null if the peer could not be connected.
*/
@Nullable
public Peer connectTo(InetSocketAddress address) {
return connectTo(address, true);
}
// Internal version.
@Nullable
protected Peer connectTo(InetSocketAddress address, boolean incrementMaxConnections) {
VersionMessage ver = getVersionMessage().duplicate();
ver.bestHeight = chain == null ? 0 : chain.getBestChainHeight();