Skip to content

Commit

Permalink
fix a whole bunch of broken links in javadocs (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Danconnolly committed Dec 28, 2017
1 parent 723f31d commit b0d17f4
Show file tree
Hide file tree
Showing 41 changed files with 87 additions and 92 deletions.
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
<configuration>
<detectLinks/>
<links>
<link>http://docs.guava-libraries.googlecode.com/git-history/release/javadoc/</link>
<link>http://google.github.io/guava/releases/18.0/api/docs/</link>
</links>
<detectJavaApiLink/>
<quiet>true</quiet>
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/java/org/bitcoin/NativeSecp256k1.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static boolean verify(byte[] data, byte[] signature, byte[] pub) throws A
* libsecp256k1 Create an ECDSA signature.
*
* @param data Message hash, 32 bytes
* @param key Secret key, 32 bytes
* @param sec Secret key, 32 bytes
* @return sig byte array of signature
*/
public static byte[] sign(byte[] data, byte[] sec) throws AssertFailException {
Expand Down Expand Up @@ -200,7 +200,7 @@ public static long cloneContext() {
* libsecp256k1 PrivKey Tweak-Mul - Tweak privkey by multiplying to it
*
* @param tweak some bytes to tweak with
* @param seckey 32-byte seckey
* @param privkey 32-byte seckey
*/
public static byte[] privKeyTweakMul(byte[] privkey, byte[] tweak) throws AssertFailException {
Preconditions.checkArgument(privkey.length == 32);
Expand Down Expand Up @@ -239,7 +239,7 @@ public static byte[] privKeyTweakMul(byte[] privkey, byte[] tweak) throws Assert
* libsecp256k1 PrivKey Tweak-Add - Tweak privkey by adding to it
*
* @param tweak some bytes to tweak with
* @param seckey 32-byte seckey
* @param privkey 32-byte seckey
*/
public static byte[] privKeyTweakAdd(byte[] privkey, byte[] tweak) throws AssertFailException {
Preconditions.checkArgument(privkey.length == 32);
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/bitcoinj/core/ChildMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public abstract class ChildMessage extends Message {
@Nullable protected Message parent;

/**
* @deprecated Use {@link #ChildMessage(NetworkParameters) instead.
* @deprecated Use {@link #ChildMessage(NetworkParameters)} instead.
*/
@Deprecated
protected ChildMessage() {
Expand Down
8 changes: 4 additions & 4 deletions core/src/main/java/org/bitcoinj/core/Context.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ public Context(NetworkParameters params) {
*
* @param params The network parameters that will be associated with this context.
* @param eventHorizon Number of blocks after which the library will delete data and be unable to always process reorgs (see {@link #getEventHorizon()}.
* @param feePerKb The default fee per 1000 bytes of transaction data to pay when completing transactions. For details, see {@link SendRequest#feePerKb}.
* @param ensureMinRequiredFee Whether to ensure the minimum required fee by default when completing transactions. For details, see {@link SendRequest#ensureMinRequiredFee}.
* @param feePerKb The default fee per 1000 bytes of transaction data to pay when completing transactions. For details, see {@link org.bitcoinj.wallet.SendRequest#feePerKb}.
* @param ensureMinRequiredFee Whether to ensure the minimum required fee by default when completing transactions. For details, see {@link org.bitcoinj.wallet.SendRequest#ensureMinRequiredFee}.
*/
public Context(NetworkParameters params, int eventHorizon, Coin feePerKb, boolean ensureMinRequiredFee) {
this(params);
Expand Down Expand Up @@ -177,14 +177,14 @@ public int getEventHorizon() {
}

/**
* The default fee per 1000 bytes of transaction data to pay when completing transactions. For details, see {@link SendRequest#feePerKb}.
* The default fee per 1000 bytes of transaction data to pay when completing transactions. For details, see {@link org.bitcoinj.wallet.SendRequest#feePerKb}.
*/
public Coin getFeePerKb() {
return feePerKb;
}

/**
* Whether to ensure the minimum required fee by default when completing transactions. For details, see {@link SendRequest#ensureMinRequiredFee}.
* Whether to ensure the minimum required fee by default when completing transactions. For details, see {@link org.bitcoinj.wallet.SendRequest#ensureMinRequiredFee}.
*/
public boolean isEnsureMinRequiredFee() {
return ensureMinRequiredFee;
Expand Down
8 changes: 4 additions & 4 deletions core/src/main/java/org/bitcoinj/core/NetworkParameters.java
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,8 @@ public int getBip32HeaderPriv() {
public abstract boolean hasMaxMoney();

/**
* Return the default serializer for this network. This is a shared serializer.
* @return
* the default {@link MessageSerializer} for this network. This is a shared serializer.
* @return the default {@link MessageSerializer} for this network. This is a shared serializer.
*/
public final MessageSerializer getDefaultSerializer() {
// Construct a default serializer if we don't have one
Expand All @@ -448,7 +448,7 @@ public final MessageSerializer getDefaultSerializer() {
public abstract BitcoinSerializer getSerializer(boolean parseRetain);

/**
* The number of blocks in the last {@link getMajorityWindow()} blocks
* The number of blocks in the last {@link #getMajorityWindow()} blocks
* at which to trigger a notice to the user to upgrade their client, where
* the client does not understand those blocks.
*/
Expand All @@ -457,7 +457,7 @@ public int getMajorityEnforceBlockUpgrade() {
}

/**
* The number of blocks in the last {@link getMajorityWindow()} blocks
* The number of blocks in the last {@link #getMajorityWindow()} blocks
* at which to enforce the requirement that all new blocks are of the
* newer type (i.e. outdated blocks are rejected).
*/
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/bitcoinj/core/PeerGroup.java
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ public void addDisconnectedEventListener(Executor executor, PeerDisconnectedEven
peer.addDisconnectedEventListener(executor, listener);
}

/** See {@link Peer#addDiscoveredEventListener(PeerDiscoveredEventListener)} */
/** See {@link #addDiscoveredEventListener(Executor, PeerDiscoveredEventListener)} */
public void addDiscoveredEventListener(PeerDiscoveredEventListener listener) {
addDiscoveredEventListener(Threading.USER_THREAD, listener);
}
Expand Down
7 changes: 2 additions & 5 deletions core/src/main/java/org/bitcoinj/core/Transaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,6 @@ public Transaction(NetworkParameters params, byte[] payload, int offset) throws
* @param params NetworkParameters object.
* @param payload Bitcoin protocol formatted byte array containing message content.
* @param offset The location of the first payload byte within the array.
* @param parseRetain Whether to retain the backing byte array for quick reserialization.
* If true and the backing byte array is invalidated due to modification of a field then
* the cached bytes may be repopulated and retained if the message is serialized again in the future.
* @param length The length of message if known. Usually this is provided when deserializing of the wire
* as the length will be provided as part of the header. If unknown then set to Message.UNKNOWN_LENGTH
* @throws ProtocolException
Expand Down Expand Up @@ -761,8 +758,8 @@ public void clearInputs() {

/**
* Adds an input to this transaction that imports value from the given output. Note that this input is <i>not</i>
* complete and after every input is added with {@link #addInput()} and every output is added with
* {@link #addOutput()}, a {@link TransactionSigner} must be used to finalize the transaction and finish the inputs
* complete and after every input is added with {@code addInput()} and every output is added with
* {@code addOutput()}, a {@link TransactionSigner} must be used to finalize the transaction and finish the inputs
* off. Otherwise it won't be accepted by the network.
* @return the newly created input.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public void addEventListener(Executor executor, Listener listener) {
* <p>Note that this is NOT called when every block arrives. Instead it is called when the transaction
* transitions between confidence states, ie, from not being seen in the chain to being seen (not necessarily in
* the best chain). If you want to know when the transaction gets buried under another block, implement a
* {@link BlockChainListener}, attach it to a {@link BlockChain} and then use the getters on the
* {@link org.bitcoinj.core.listeners.BlockChainListener}, attach it to a {@link BlockChain} and then use the getters on the
* confidence object to determine the new depth.</p>
*/
public void addEventListener(Listener listener) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@

package org.bitcoinj.core.listeners;

import org.bitcoinj.core.AbstractBlockChain;
import org.bitcoinj.core.StoredBlock;
import org.bitcoinj.core.Transaction;
import org.bitcoinj.core.VerificationException;

/**
Expand All @@ -26,8 +28,8 @@ public interface NewBestBlockListener {
/**
* Called when a new block on the best chain is seen, after relevant
* transactions are extracted and sent to us via either
* {@link TransactionReceivedInBlockListener#receiveFromBlock(org.bitcoinj.core.Transaction, org.bitcoinj.core.StoredBlock, org.bitcoinj.core.BlockChain.NewBlockType, int relativityOffset)}
* or {@link TransactionReceivedInBlockListener#notifyTransactionIsInBlock(org.bitcoinj.core.Sha256Hash, org.bitcoinj.core.StoredBlock, org.bitcoinj.core.BlockChain.NewBlockType, int)}.
* {@link TransactionReceivedInBlockListener#receiveFromBlock(Transaction, StoredBlock, AbstractBlockChain.NewBlockType, int)}
* or {@link TransactionReceivedInBlockListener#notifyTransactionIsInBlock(org.bitcoinj.core.Sha256Hash, StoredBlock, AbstractBlockChain.NewBlockType, int)}.
* If this block is causing a re-organise to a new chain, this method is NOT
* called even though the block may be the new best block: your reorganize
* implementation is expected to do whatever would normally be done do for a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
public interface PeerConnectedEventListener {

/**
* Called when a peer is connected. If this listener is registered to a {@link Peer} instead of a {@link PeerGroup},
* Called when a peer is connected. If this listener is registered to a {@link Peer} instead of a {@link org.bitcoinj.core.PeerGroup},
* peerCount will always be 1.
*
* @param peer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public interface PeerConnectionEventListener extends PeerConnectedEventListener,

/**
* Called when a peer is disconnected. Note that this won't be called if the listener is registered on a
* {@link PeerGroup} and the group is in the process of shutting down. If this listener is registered to a
* {@link Peer} instead of a {@link PeerGroup}, peerCount will always be 0. This handler can be called without
* {@link org.bitcoinj.core.PeerGroup} and the group is in the process of shutting down. If this listener is registered to a
* {@link Peer} instead of a {@link org.bitcoinj.core.PeerGroup}, peerCount will always be 0. This handler can be called without
* a corresponding invocation of onPeerConnected if the initial connection is never successful.
*
* @param peer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public interface PeerDisconnectedEventListener {

/**
* Called when a peer is disconnected. Note that this won't be called if the listener is registered on a
* {@link PeerGroup} and the group is in the process of shutting down. If this listener is registered to a
* {@link Peer} instead of a {@link PeerGroup}, peerCount will always be 0. This handler can be called without
* {@link org.bitcoinj.core.PeerGroup} and the group is in the process of shutting down. If this listener is registered to a
* {@link Peer} instead of a {@link org.bitcoinj.core.PeerGroup}, peerCount will always be 0. This handler can be called without
* a corresponding invocation of onPeerConnected if the initial connection is never successful.
*
* @param peer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/
public interface PeerDiscoveredEventListener {
/**
* <p>Called when peers are discovered, this happens at startup of {@link PeerGroup} or if we run out of
* <p>Called when peers are discovered, this happens at startup of {@link org.bitcoinj.core.PeerGroup} or if we run out of
* suitable {@link Peer}s to connect to.</p>
*
* @param peerAddresses the set of discovered {@link PeerAddress}es
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void receiveFromBlock(Transaction tx, StoredBlock block,
BlockChain.NewBlockType blockType,
int relativityOffset) throws VerificationException;
/**
* <p>Called by the {@link BlockChain} when we receive a new {@link FilteredBlock} that contains the given
* <p>Called by the {@link BlockChain} when we receive a new {@link org.bitcoinj.core.FilteredBlock} that contains the given
* transaction hash in its merkle tree.</p>
*
* <p>A transaction may be received multiple times if is included into blocks in parallel chains. The blockType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public ECKey.ECDSASignature toCanonicalised() {
* @param requireCanonicalEncoding if the encoding of the signature must
* be canonical.
* @throws RuntimeException if the signature is invalid or unparseable in some way.
* @deprecated use {@link #decodeFromBitcoin(byte[], boolean, boolean} instead}.
* @deprecated use {@link #decodeFromBitcoin(byte[], boolean, boolean)} instead.
*/
@Deprecated
public static TransactionSignature decodeFromBitcoin(byte[] bytes,
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/bitcoinj/kits/WalletAppKit.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public WalletAppKit setAutoSave(boolean value) {

/**
* If you want to learn about the sync process, you can provide a listener here. For instance, a
* {@link org.bitcoinj.core.DownloadProgressTracker} is a good choice. This has no effect unless setBlockingStartup(false) has been called
* {@link org.bitcoinj.core.listeners.DownloadProgressTracker} is a good choice. This has no effect unless setBlockingStartup(false) has been called
* too, due to some missing implementation code.
*/
public WalletAppKit setDownloadListener(DownloadProgressTracker listener) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* <p>A generic interface for an object which keeps track of a set of open client connections, creates new ones and
* ensures they are serviced properly.</p>
*
* <p>When the service is {@link com.google.common.util.concurrent.Service#stop()}ed, all connections will be closed and
* <p>When the service is stopped, all connections will be closed and
* the appropriate connectionClosed() calls must be made.</p>
*/
public interface ClientConnectionManager extends Service {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/bitcoinj/net/NioServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ protected void run() throws Exception {
/**
* Invoked by the Execution service when it's time to stop.
* Calling this method directly will NOT stop the service, call
* {@link com.google.common.util.concurrent.AbstractExecutionThreadService#stop()} instead.
* {@link AbstractExecutionThreadService#stopAsync()} stop()} instead.
*/
@Override
public void triggerShutdown() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public interface Listener<MessageType extends MessageLite> {
*
* @param handler The callback listener
* @param prototype The default instance of the message type used in both directions of this channel.
* This should be the return value from {@link MessageType#getDefaultInstanceForType()}
* This should be the return value from {@code MessageType#getDefaultInstanceForType()}
* @param maxMessageSize The maximum message size (not including the 4-byte length prefix).
* Note that this has an upper bound of {@link Integer#MAX_VALUE} - 4
* @param timeoutMillis The timeout between messages before the connection is automatically closed. Only enabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* However, if all hosts passed fail to resolve a PeerDiscoveryException will be thrown during getPeers().
* </p>
*
* <p>DNS seeds do not attempt to enumerate every peer on the network. {@link DnsDiscovery#getPeers(long, java.util.concurrent.TimeUnit)}
* <p>DNS seeds do not attempt to enumerate every peer on the network. {@link #getPeers(long, long, java.util.concurrent.TimeUnit)}
* will return up to 30 random peers from the set of those returned within the timeout period. If you want more peers
* to connect to, you need to discover them via other means (like addr broadcasts).</p>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public interface PeerDiscovery {

/**
* Returns an array of addresses. This method may block.
* @param services Required services as a bitmask, e.g. {@link VersionMessage#NODE_NETWORK}.
* @param services Required services as a bitmask, e.g. {@link org.bitcoinj.core.VersionMessage#NODE_NETWORK}.
*/
InetSocketAddress[] getPeers(long services, long timeoutValue, TimeUnit timeoutUnit) throws PeerDiscoveryException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public interface IPaymentChannelClient {
* intending to reopen the channel later. There is likely little reason to use this in a stateless protocol.</p>
*
* <p>Note that this <b>MUST</b> still be called even after either
* {@link PaymentChannelClient.ClientConnection#destroyConnection(org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason)} or
* {@link ClientConnection#destroyConnection(org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason)} or
* {@link IPaymentChannelClient#settle()} is called, to actually handle the connection close logic.</p>
*/
void connectionClosed();
Expand All @@ -55,7 +55,7 @@ public interface IPaymentChannelClient {
* <p>Settles the channel, notifying the server it can broadcast the most recent payment transaction.</p>
*
* <p>Note that this only generates a CLOSE message for the server and calls
* {@link PaymentChannelClient.ClientConnection#destroyConnection(org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason)}
* {@link ClientConnection#destroyConnection(org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason)}
* to settle the connection, it does not actually handle connection close logic, and
* {@link PaymentChannelClient#connectionClosed()} must still be called after the connection fully settles.</p>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ private void receiveClose(Protos.TwoWayChannelMessage msg) throws VerificationEx
* intending to reopen the channel later. There is likely little reason to use this in a stateless protocol.</p>
*
* <p>Note that this <b>MUST</b> still be called even after either
* {@link ClientConnection#destroyConnection(org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason)} or
* {@link IPaymentChannelClient.ClientConnection#destroyConnection(PaymentChannelCloseException.CloseReason)} or
* {@link PaymentChannelClient#settle()} is called, to actually handle the connection close logic.</p>
*/
@Override
Expand All @@ -586,7 +586,7 @@ public void connectionClosed() {
* payment transaction.</p>
*
* <p>Note that this only generates a CLOSE message for the server and calls
* {@link ClientConnection#destroyConnection(CloseReason)} to settle the connection, it does not
* {@link IPaymentChannelClient.ClientConnection#destroyConnection(PaymentChannelCloseException.CloseReason)} to settle the connection, it does not
* actually handle connection close logic, and {@link PaymentChannelClient#connectionClosed()} must still be called
* after the connection fully closes.</p>
*
Expand Down
Loading

0 comments on commit b0d17f4

Please sign in to comment.