Fix several javadoc warnings.

This commit is contained in:
Nicola Atzei 2017-07-25 11:51:50 +02:00 committed by Andreas Schildbach
parent ab24a70753
commit 5f95e510ef
42 changed files with 88 additions and 81 deletions

View file

@ -149,7 +149,7 @@
<configuration>
<detectLinks/>
<links>
<link>http://docs.guava-libraries.googlecode.com/git-history/release/javadoc/</link>
<link>https://google.github.io/guava/releases/22.0/api/docs/</link>
</links>
<detectJavaApiLink/>
<quiet>true</quiet>

View file

@ -78,7 +78,7 @@ public class NativeSecp256k1 {
* 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 {
@ -200,7 +200,7 @@ public class NativeSecp256k1 {
* 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);
@ -239,7 +239,7 @@ public class NativeSecp256k1 {
* 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);

View file

@ -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() {

View file

@ -16,6 +16,7 @@
package org.bitcoinj.core;
import org.bitcoinj.wallet.SendRequest;
import org.slf4j.*;
import static com.google.common.base.Preconditions.*;

View file

@ -422,7 +422,7 @@ public abstract class NetworkParameters {
/**
* Return the default serializer for this network. This is a shared serializer.
* @return
* @return the default serializer for this network.
*/
public final MessageSerializer getDefaultSerializer() {
// Construct a default serializer if we don't have one
@ -448,7 +448,7 @@ public abstract class NetworkParameters {
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.
*/
@ -457,7 +457,7 @@ public abstract class NetworkParameters {
}
/**
* 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).
*/

View file

@ -727,7 +727,7 @@ public class PeerGroup implements TransactionBroadcaster {
peer.addDisconnectedEventListener(executor, listener);
}
/** See {@link Peer#addDiscoveredEventListener(PeerDiscoveredEventListener)} */
/** See {@link PeerGroup#addDiscoveredEventListener(Executor, PeerDiscoveredEventListener)} */
public void addDiscoveredEventListener(PeerDiscoveredEventListener listener) {
addDiscoveredEventListener(Threading.USER_THREAD, listener);
}

View file

@ -236,9 +236,8 @@ public class Transaction extends ChildMessage {
* @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 parent The parent of the transaction.
* @param setSerializer The serializer to use for this transaction.
* @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
@ -777,8 +776,8 @@ public class Transaction extends ChildMessage {
/**
* 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 {@link #addInput(TransactionInput)} and every output is added with
* {@link #addOutput(TransactionOutput)}, 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.
*/

View file

@ -19,6 +19,8 @@ package org.bitcoinj.core;
import com.google.common.collect.*;
import com.google.common.util.concurrent.*;
import org.bitcoinj.core.listeners.BlockChainListener;
import org.bitcoinj.utils.*;
import org.bitcoinj.wallet.Wallet;

View file

@ -26,8 +26,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(org.bitcoinj.core.Transaction, StoredBlock, org.bitcoinj.core.AbstractBlockChain.NewBlockType, int)}
* or {@link TransactionReceivedInBlockListener#notifyTransactionIsInBlock(org.bitcoinj.core.Sha256Hash, StoredBlock, org.bitcoinj.core.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

View file

@ -17,6 +17,7 @@
package org.bitcoinj.core.listeners;
import org.bitcoinj.core.Peer;
import org.bitcoinj.core.PeerGroup;
/**
* <p>Implementors can listen to events indicating a new peer connecting.</p>

View file

@ -17,6 +17,7 @@
package org.bitcoinj.core.listeners;
import org.bitcoinj.core.Peer;
import org.bitcoinj.core.PeerGroup;
/**
* <p>Implementors can listen to events like peer discovery, connect or disconnects.</p>

View file

@ -17,6 +17,7 @@
package org.bitcoinj.core.listeners;
import org.bitcoinj.core.Peer;
import org.bitcoinj.core.PeerGroup;
/**
* <p>Implementors can listen to events indicating a peer disconnecting.</p>

View file

@ -18,6 +18,8 @@ package org.bitcoinj.core.listeners;
import org.bitcoinj.core.Peer;
import org.bitcoinj.core.PeerAddress;
import org.bitcoinj.core.PeerGroup;
import java.util.Set;
/**

View file

@ -17,6 +17,7 @@
package org.bitcoinj.core.listeners;
import org.bitcoinj.core.BlockChain;
import org.bitcoinj.core.FilteredBlock;
import org.bitcoinj.core.Sha256Hash;
import org.bitcoinj.core.StoredBlock;
import org.bitcoinj.core.Transaction;

View file

@ -162,7 +162,7 @@ public class TransactionSignature extends ECKey.ECDSASignature {
* @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,

View file

@ -128,7 +128,7 @@ public class WalletAppKit extends AbstractIdleService {
/**
* 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 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) {

View file

@ -25,7 +25,7 @@ import java.net.SocketAddress;
* <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 via {@link com.google.common.util.concurrent.Service#stopAsync()}, all connections will be closed and
* the appropriate connectionClosed() calls must be made.</p>
*/
public interface ClientConnectionManager extends Service {

View file

@ -123,7 +123,7 @@ public class NioServer extends AbstractExecutionThreadService {
/**
* 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 com.google.common.util.concurrent.AbstractExecutionThreadService#stopAsync()} instead.
*/
@Override
public void triggerShutdown() {

View file

@ -84,7 +84,7 @@ public class ProtobufConnection<MessageType extends MessageLite> extends Abstrac
*
* @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 {@link MessageLite#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

View file

@ -31,7 +31,7 @@ import java.util.concurrent.*;
* 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 DnsDiscovery#getPeers(long, long, 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>
*/

View file

@ -20,6 +20,8 @@ package org.bitcoinj.net.discovery;
import java.net.InetSocketAddress;
import java.util.concurrent.TimeUnit;
import org.bitcoinj.core.VersionMessage;
/**
* A PeerDiscovery object is responsible for finding addresses of other nodes in the Bitcoin P2P network. Note that
* the addresses returned may or may not be accepting connections.

View file

@ -47,7 +47,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 org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientConnection#destroyConnection(org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason)} or
* {@link IPaymentChannelClient#settle()} is called, to actually handle the connection close logic.</p>
*/
void connectionClosed();
@ -56,7 +56,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 org.bitcoinj.protocols.channels.IPaymentChannelClient.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>
*

View file

@ -539,7 +539,7 @@ public class PaymentChannelClient implements 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 ClientConnection#destroyConnection(org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason)} or
* {@link org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientConnection#destroyConnection(org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason)} or
* {@link PaymentChannelClient#settle()} is called, to actually handle the connection close logic.</p>
*/
@Override
@ -559,7 +559,7 @@ public class PaymentChannelClient implements IPaymentChannelClient {
* 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 org.bitcoinj.protocols.channels.IPaymentChannelClient.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 closes.</p>
*

View file

@ -102,7 +102,7 @@ public class PaymentChannelClientConnection {
/**
* Attempts to open a new connection to and open a payment channel with the given host and port, blocking until the
* connection is open. The server is requested to keep the channel open for {@param timeWindow}
* connection is open. The server is requested to keep the channel open for {@code timeoutSeconds}
* seconds. If the server proposes a longer time the channel will be closed.
*
* @param server The host/port pair where the server is listening.

View file

@ -60,7 +60,7 @@ import static com.google.common.base.Preconditions.*;
* the given time (within a few hours), the channel must be closed or else the client will broadcast the refund
* transaction and take back all the money once the expiry time is reached.</p>
*
* <p>To begin, the client calls {@link PaymentChannelClientState#initiate(KeyParameter, ClientChannelProperties)}, which moves the channel into state
* <p>To begin, the client calls {@link PaymentChannelClientState#initiate(KeyParameter, org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientChannelProperties)}, which moves the channel into state
* INITIATED and creates the initial multi-sig contract and refund transaction. If the wallet has insufficient funds an
* exception will be thrown at this point. Once this is done, call
* {@link PaymentChannelV1ClientState#getIncompleteRefundTransaction()} and pass the resultant transaction through to the
@ -126,9 +126,9 @@ public abstract class PaymentChannelClientState {
/**
* Creates a state object for a payment channel client. It is expected that you be ready to
* {@link PaymentChannelClientState#initiate(KeyParameter, ClientChannelProperties)} after construction (to avoid creating objects for channels which are
* {@link PaymentChannelClientState#initiate(KeyParameter, org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientChannelProperties)} after construction (to avoid creating objects for channels which are
* not going to finish opening) and thus some parameters provided here are only used in
* {@link PaymentChannelClientState#initiate(KeyParameter, ClientChannelProperties)} to create the Multisig contract and refund transaction.
* {@link PaymentChannelClientState#initiate(KeyParameter, org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientChannelProperties)} to create the Multisig contract and refund transaction.
*
* @param wallet a wallet that contains at least the specified amount of value.
* @param myKey a freshly generated private key for this channel.
@ -383,7 +383,7 @@ public abstract class PaymentChannelClientState {
/**
* Returns the fees that will be paid if the refund transaction has to be claimed because the server failed to settle
* the channel properly. May only be called after {@link PaymentChannelClientState#initiate(KeyParameter, ClientChannelProperties)}
* the channel properly. May only be called after {@link PaymentChannelClientState#initiate(KeyParameter, org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientChannelProperties)}
*/
public abstract Coin getRefundTxFees();
@ -415,7 +415,7 @@ public abstract class PaymentChannelClientState {
/**
* Gets the contract without changing the state machine
* @return
* @return the contract.
*/
protected abstract Transaction getContractInternal();
@ -424,7 +424,7 @@ public abstract class PaymentChannelClientState {
/**
* Gets the script that is signed. In the case of a P2SH contract this is the
* script inside the P2SH script.
* @return
* @return the signed script.
*/
protected abstract Script getSignedScript();
}

View file

@ -595,7 +595,7 @@ public class PaymentChannelServer {
* resume this channel in the future and stops generating messages for the client.</p>
*
* <p>Note that this <b>MUST</b> still be called even after either
* {@link ServerConnection#destroyConnection(CloseReason)} or
* {@link org.bitcoinj.protocols.channels.PaymentChannelServer.ServerConnection#destroyConnection(org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason)} or
* {@link PaymentChannelServer#close()} is called to actually handle the connection close logic.</p>
*/
public void connectionClosed() {
@ -638,7 +638,7 @@ public class PaymentChannelServer {
/**
* <p>Closes the connection by generating a settle message for the client and calls
* {@link ServerConnection#destroyConnection(CloseReason)}. Note that this does not broadcast
* {@link org.bitcoinj.protocols.channels.PaymentChannelServer.ServerConnection#destroyConnection(org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason)}. Note that this does not broadcast
* the payment transaction and the client may still resume the same channel if they reconnect</p>
* <p>
* <p>Note that {@link PaymentChannelServer#connectionClosed()} must still be called after the connection fully

View file

@ -386,7 +386,7 @@ public abstract class PaymentChannelServerState {
/**
* Gets the script that signatures should sign against. This is never a P2SH
* script, rather the script that would be inside a P2SH script.
* @return
* @return the script that signatures should sign against.
*/
protected abstract Script getSignedScript();

View file

@ -72,9 +72,9 @@ public class PaymentChannelV1ClientState extends PaymentChannelClientState {
/**
* Creates a state object for a payment channel client. It is expected that you be ready to
* {@link PaymentChannelClientState#initiate(KeyParameter, ClientChannelProperties)} after construction (to avoid creating objects for channels which are
* {@link PaymentChannelClientState#initiate(KeyParameter, org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientChannelProperties)} after construction (to avoid creating objects for channels which are
* not going to finish opening) and thus some parameters provided here are only used in
* {@link PaymentChannelClientState#initiate(KeyParameter, ClientChannelProperties)} to create the Multisig contract and refund transaction.
* {@link PaymentChannelClientState#initiate(KeyParameter, org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientChannelProperties)} to create the Multisig contract and refund transaction.
*
* @param wallet a wallet that contains at least the specified amount of value.
* @param myKey a freshly generated private key for this channel.

View file

@ -177,11 +177,11 @@ public class PaymentChannelV1ServerState extends PaymentChannelServerState {
/**
* <p>Closes this channel and broadcasts the highest value payment transaction on the network.</p>
*
* <p>This will set the state to {@link State#CLOSED} if the transaction is successfully broadcast on the network.
* If we fail to broadcast for some reason, the state is set to {@link State#ERROR}.</p>
* <p>This will set the state to {@link org.bitcoinj.protocols.channels.PaymentChannelServerState.State#CLOSED} if the transaction is successfully broadcast on the network.
* If we fail to broadcast for some reason, the state is set to {@link org.bitcoinj.protocols.channels.PaymentChannelServerState.State#ERROR}.</p>
*
* <p>If the current state is before {@link State#READY} (ie we have not finished initializing the channel), we
* simply set the state to {@link State#CLOSED} and let the client handle getting its refund transaction confirmed.
* <p>If the current state is before {@link org.bitcoinj.protocols.channels.PaymentChannelServerState.State#READY} (ie we have not finished initializing the channel), we
* simply set the state to {@link org.bitcoinj.protocols.channels.PaymentChannelServerState.State#CLOSED} and let the client handle getting its refund transaction confirmed.
* </p>
*
* @param userKey The AES key to use for decryption of the private key. If null then no decryption is required.

View file

@ -118,7 +118,7 @@ public class PaymentChannelV2ServerState extends PaymentChannelServerState {
/**
* Creates a P2SH script outputting to the client and server pubkeys
* @return
* @return a P2SH script.
*/
@Override
protected Script createOutputScript() {

View file

@ -54,7 +54,7 @@ public class PaymentProtocol {
/**
* Create a payment request with one standard pay to address output. You may want to sign the request using
* {@link #signPaymentRequest}. Use {@link Protos.PaymentRequest.Builder#build} to get the actual payment
* {@link #signPaymentRequest}. Use {@link org.bitcoin.protocols.payments.Protos.PaymentRequest.Builder#build} to get the actual payment
* request.
*
* @param params network parameters
@ -74,7 +74,7 @@ public class PaymentProtocol {
/**
* Create a payment request. You may want to sign the request using {@link #signPaymentRequest}. Use
* {@link Protos.PaymentRequest.Builder#build} to get the actual payment request.
* {@link org.bitcoin.protocols.payments.Protos.PaymentRequest.Builder#build} to get the actual payment request.
*
* @param params network parameters
* @param outputs list of outputs to request coins to
@ -157,7 +157,7 @@ public class PaymentProtocol {
*
* @param paymentRequest Payment request to verify.
* @param trustStore KeyStore of trusted root certificate authorities.
* @return verification data, or null if no PKI method was specified in the {@link Protos.PaymentRequest}.
* @return verification data, or null if no PKI method was specified in the {@link org.bitcoin.protocols.payments.Protos.PaymentRequest}.
* @throws PaymentProtocolException if payment request could not be verified.
*/
@Nullable

View file

@ -48,8 +48,8 @@ import java.util.concurrent.Callable;
*
* <ul>
* <li>A {@link BitcoinURI} object that conforms to BIP 0072</li>
* <li>A url where the {@link Protos.PaymentRequest} can be fetched</li>
* <li>Directly with a {@link Protos.PaymentRequest} object</li>
* <li>A url where the {@link org.bitcoin.protocols.payments.Protos.PaymentRequest} can be fetched</li>
* <li>Directly with a {@link org.bitcoin.protocols.payments.Protos.PaymentRequest} object</li>
* </ul>
*
* <p>If initialized with a BitcoinURI or a url, a network request is made for the payment request object and a
@ -59,10 +59,10 @@ import java.util.concurrent.Callable;
* amount and recipient are correct, perform any additional steps, and then construct a list of transactions to pass to
* the sendPayment method.</p>
*
* <p>Call sendPayment with a list of transactions that will be broadcast. A {@link Protos.Payment} message will be sent
* <p>Call sendPayment with a list of transactions that will be broadcast. A {@link org.bitcoin.protocols.payments.Protos.Payment} message will be sent
* to the merchant if a payment url is provided in the PaymentRequest. NOTE: sendPayment does NOT broadcast the
* transactions to the bitcoin network. Instead it returns a ListenableFuture that will be notified when a
* {@link Protos.PaymentACK} is received from the merchant. Typically a wallet will show the message to the user
* {@link org.bitcoin.protocols.payments.Protos.PaymentACK} is received from the merchant. Typically a wallet will show the message to the user
* as a confirmation message that the payment is now "processing" or that an error occurred, and then broadcast the
* tx itself later if needed.</p>
*
@ -83,7 +83,7 @@ public class PaymentSession {
/**
* <p>Returns a future that will be notified with a PaymentSession object after it is fetched using the provided uri.
* uri is a BIP-72-style BitcoinURI object that specifies where the {@link Protos.PaymentRequest} object may
* uri is a BIP-72-style BitcoinURI object that specifies where the {@link org.bitcoin.protocols.payments.Protos.PaymentRequest} object may
* be fetched in the r= parameter.</p>
*
* <p>If the payment request object specifies a PKI method, then the system trust store will be used to verify
@ -96,7 +96,7 @@ public class PaymentSession {
/**
* Returns a future that will be notified with a PaymentSession object after it is fetched using the provided uri.
* uri is a BIP-72-style BitcoinURI object that specifies where the {@link Protos.PaymentRequest} object may
* uri is a BIP-72-style BitcoinURI object that specifies where the {@link org.bitcoin.protocols.payments.Protos.PaymentRequest} object may
* be fetched in the r= parameter.
* If verifyPki is specified and the payment request object specifies a PKI method, then the system trust store will
* be used to verify the signature provided by the payment request. An exception is thrown by the future if the
@ -109,7 +109,7 @@ public class PaymentSession {
/**
* Returns a future that will be notified with a PaymentSession object after it is fetched using the provided uri.
* uri is a BIP-72-style BitcoinURI object that specifies where the {@link Protos.PaymentRequest} object may
* uri is a BIP-72-style BitcoinURI object that specifies where the {@link org.bitcoin.protocols.payments.Protos.PaymentRequest} object may
* be fetched in the r= parameter.
* If verifyPki is specified and the payment request object specifies a PKI method, then the system trust store will
* be used to verify the signature provided by the payment request. An exception is thrown by the future if the
@ -130,7 +130,7 @@ public class PaymentSession {
/**
* Returns a future that will be notified with a PaymentSession object after it is fetched using the provided url.
* url is an address where the {@link Protos.PaymentRequest} object may be fetched.
* url is an address where the {@link org.bitcoin.protocols.payments.Protos.PaymentRequest} object may be fetched.
* If verifyPki is specified and the payment request object specifies a PKI method, then the system trust store will
* be used to verify the signature provided by the payment request. An exception is thrown by the future if the
* signature cannot be verified.
@ -141,7 +141,7 @@ public class PaymentSession {
/**
* Returns a future that will be notified with a PaymentSession object after it is fetched using the provided url.
* url is an address where the {@link Protos.PaymentRequest} object may be fetched.
* url is an address where the {@link org.bitcoin.protocols.payments.Protos.PaymentRequest} object may be fetched.
* If the payment request object specifies a PKI method, then the system trust store will
* be used to verify the signature provided by the payment request. An exception is thrown by the future if the
* signature cannot be verified.
@ -153,7 +153,7 @@ public class PaymentSession {
/**
* Returns a future that will be notified with a PaymentSession object after it is fetched using the provided url.
* url is an address where the {@link Protos.PaymentRequest} object may be fetched.
* url is an address where the {@link org.bitcoin.protocols.payments.Protos.PaymentRequest} object may be fetched.
* If the payment request object specifies a PKI method, then the system trust store will
* be used to verify the signature provided by the payment request. An exception is thrown by the future if the
* signature cannot be verified.
@ -184,7 +184,7 @@ public class PaymentSession {
}
/**
* Creates a PaymentSession from the provided {@link Protos.PaymentRequest}.
* Creates a PaymentSession from the provided {@link org.bitcoin.protocols.payments.Protos.PaymentRequest}.
* Verifies PKI by default.
*/
public PaymentSession(Protos.PaymentRequest request) throws PaymentProtocolException {
@ -192,7 +192,7 @@ public class PaymentSession {
}
/**
* Creates a PaymentSession from the provided {@link Protos.PaymentRequest}.
* Creates a PaymentSession from the provided {@link org.bitcoin.protocols.payments.Protos.PaymentRequest}.
* If verifyPki is true, also validates the signature and throws an exception if it fails.
*/
public PaymentSession(Protos.PaymentRequest request, boolean verifyPki) throws PaymentProtocolException {
@ -200,7 +200,7 @@ public class PaymentSession {
}
/**
* Creates a PaymentSession from the provided {@link Protos.PaymentRequest}.
* Creates a PaymentSession from the provided {@link org.bitcoin.protocols.payments.Protos.PaymentRequest}.
* If verifyPki is true, also validates the signature and throws an exception if it fails.
* If trustStoreLoader is null, the system default trust store is used.
*/

View file

@ -310,7 +310,7 @@ public class Script {
/**
* Retrieves the sender public key from a LOCKTIMEVERIFY transaction
* @return
* @return the sender public key
* @throws ScriptException
*/
public byte[] getCLTVPaymentChannelSenderPubKey() throws ScriptException {
@ -322,7 +322,7 @@ public class Script {
/**
* Retrieves the recipient public key from a LOCKTIMEVERIFY transaction
* @return
* @return the recipient public key
* @throws ScriptException
*/
public byte[] getCLTVPaymentChannelRecipientPubKey() throws ScriptException {

View file

@ -135,7 +135,7 @@ public class ScriptBuilder {
* Adds the given number as a OP_N opcode to the end of the program.
* Only handles values 0-16 inclusive.
*
* @see #number(int)
* @see #number(long)
*/
public ScriptBuilder smallNum(int num) {
return smallNum(chunks.size(), num);
@ -146,7 +146,7 @@ public class ScriptBuilder {
* it will accept numbers in the range 0-16 inclusive, the encoding would be
* considered non-standard.
*
* @see #number(int)
* @see #number(long)
*/
protected ScriptBuilder bigNum(long num) {
return bigNum(chunks.size(), num);
@ -156,7 +156,7 @@ public class ScriptBuilder {
* Adds the given number as a OP_N opcode to the given index in the program.
* Only handles values 0-16 inclusive.
*
* @see #number(int)
* @see #number(long)
*/
public ScriptBuilder smallNum(int index, int num) {
checkArgument(num >= 0, "Cannot encode negative numbers with smallNum");
@ -170,7 +170,7 @@ public class ScriptBuilder {
* it will accept numbers in the range 0-16 inclusive, the encoding would be
* considered non-standard.
*
* @see #number(int)
* @see #number(long)
*/
protected ScriptBuilder bigNum(int index, long num) {
final byte[] data;

View file

@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory;
* </p>
* <p>This signer is always implicitly added into every wallet and it is the first signer to be executed during tx
* completion. As the first signer to create a signature, it stores derivation path of the signing key in a given
* {@link ProposedTransaction} object that will be also passed then to the next signer in chain. This allows other
* {@link org.bitcoinj.signers.TransactionSigner.ProposedTransaction} object that will be also passed then to the next signer in chain. This allows other
* signers to use correct signing key for P2SH inputs, because all the keys involved in a single P2SH address have
* the same derivation path.</p>
* <p>This signer always uses {@link org.bitcoinj.core.Transaction.SigHash#ALL} signing mode.</p>

View file

@ -1378,7 +1378,6 @@ public abstract class BtcFormat extends Format {
*
* @param scale Number of places the decimal point will be shifted when formatting
* a quantity of satoshis.
* @return The DecimalFormatSymbols before changing
*/
protected static void prefixUnitsIndicator(DecimalFormat numberFormat, int scale) {
checkState(Thread.holdsLock(numberFormat)); // make sure caller intends to reset before changing

View file

@ -50,10 +50,8 @@ public class Threading {
public static Executor USER_THREAD;
/**
* A dummy executor that just invokes the runnable immediately. Use this over
* {@link com.google.common.util.concurrent.MoreExecutors#sameThreadExecutor()} because the latter creates a new
* object each time in order to implement the more complex {@link ExecutorService} interface, which is overkill
* for our needs.
* A dummy executor that just invokes the runnable immediately. Use this over more complex executors
* (e.g. those extending {@link ExecutorService}), which are overkill for our needs.
*/
public static final Executor SAME_THREAD;

View file

@ -594,7 +594,6 @@ public class KeyChainGroup implements KeyBag {
return filter;
}
/** {@inheritDoc} */
public boolean isRequiringUpdateAllBloomFilter() {
throw new UnsupportedOperationException(); // Unused.
}

View file

@ -58,7 +58,7 @@ public class SendRequest {
*
* <p>If there are already inputs to the transaction, make sure their out point has a connected output,
* otherwise their value will be added to fee. Also ensure they are either signed or are spendable by a wallet
* key, otherwise the behavior of {@link Wallet#completeTx(Wallet.SendRequest)} is undefined (likely
* key, otherwise the behavior of {@link Wallet#completeTx(SendRequest)} is undefined (likely
* RuntimeException).</p>
*/
public Transaction tx;

View file

@ -3443,7 +3443,7 @@ public class Wallet extends BaseTaggableObject
}
/**
* Get the description of the wallet. See {@link Wallet#setDescription(String))}
* Get the description of the wallet. See {@link Wallet#setDescription(String)}
*/
public String getDescription() {
return description;
@ -3720,7 +3720,7 @@ public class Wallet extends BaseTaggableObject
USE_DUMMY_SIG,
/**
* If signature is missing, {@link org.bitcoinj.signers.TransactionSigner.MissingSignatureException}
* will be thrown for P2SH and {@link ECKey.MissingPrivateKeyException} for other tx types.
* will be thrown for P2SH and {@link org.bitcoinj.core.ECKey.MissingPrivateKeyException} for other tx types.
*/
THROW
}
@ -3735,7 +3735,7 @@ public class Wallet extends BaseTaggableObject
* and lets you see the proposed transaction before anything is done with it.</p>
*
* <p>This is a helper method that is equivalent to using {@link SendRequest#to(Address, Coin)}
* followed by {@link Wallet#completeTx(Wallet.SendRequest)} and returning the requests transaction object.
* followed by {@link Wallet#completeTx(SendRequest)} and returning the requests transaction object.
* Note that this means a fee may be automatically added if required, if you want more control over the process,
* just do those two steps yourself.</p>
*
@ -3768,7 +3768,7 @@ public class Wallet extends BaseTaggableObject
* Sends coins to the given address but does not broadcast the resulting pending transaction. It is still stored
* in the wallet, so when the wallet is added to a {@link PeerGroup} or {@link Peer} the transaction will be
* announced to the network. The given {@link SendRequest} is completed first using
* {@link Wallet#completeTx(Wallet.SendRequest)} to make it valid.
* {@link Wallet#completeTx(SendRequest)} to make it valid.
*
* @return the Transaction that was created
* @throws InsufficientMoneyException if the request could not be completed due to not enough balance.
@ -4675,7 +4675,7 @@ public class Wallet extends BaseTaggableObject
* <p>This is used to generate a BloomFilter which can be {@link BloomFilter#merge(BloomFilter)}d with another.
* It could also be used if you have a specific target for the filter's size.</p>
*
* <p>See the docs for {@link BloomFilter(int, double)} for a brief explanation of anonymity when using bloom
* <p>See the docs for {@link BloomFilter#BloomFilter(int, double, long, org.bitcoinj.core.BloomFilter.BloomUpdate)} for a brief explanation of anonymity when using bloom
* filters.</p>
*/
@Override @GuardedBy("keyChainGroupLock")

View file

@ -125,7 +125,7 @@ public class WalletProtobufSerializer {
}
/**
* Change buffer size for writing wallet to output stream. Default is {@link com.google.protobuf.CodedOutputStream.DEFAULT_BUFFER_SIZE}
* Change buffer size for writing wallet to output stream. Default is {@link com.google.protobuf.CodedOutputStream#DEFAULT_BUFFER_SIZE}
* @param walletWriteBufferSize - buffer size in bytes
*/
public void setWalletWriteBufferSize(int walletWriteBufferSize) {
@ -418,7 +418,7 @@ public class WalletProtobufSerializer {
* Wallet object with {@code forceReset} set {@code true}. It won't work.</p>
*
* <p>If {@code forceReset} is {@code true}, then no transactions are loaded from the wallet, and it is configured
* to replay transactions from the blockchain (as if the wallet had been loaded and {@link Wallet.reset}
* to replay transactions from the blockchain (as if the wallet had been loaded and {@link Wallet#reset()}
* had been called immediately thereafter).
*
* <p>A wallet can be unreadable for various reasons, such as inability to open the file, corrupt data, internally
@ -467,7 +467,7 @@ public class WalletProtobufSerializer {
* Wallet object with {@code forceReset} set {@code true}. It won't work.</p>
*
* <p>If {@code forceReset} is {@code true}, then no transactions are loaded from the wallet, and it is configured
* to replay transactions from the blockchain (as if the wallet had been loaded and {@link Wallet.reset}
* to replay transactions from the blockchain (as if the wallet had been loaded and {@link Wallet#reset()}
* had been called immediately thereafter).
*
* <p>A wallet can be unreadable for various reasons, such as inability to open the file, corrupt data, internally

View file

@ -18,6 +18,7 @@ package org.bitcoinj.wallet.listeners;
import org.bitcoinj.core.Coin;
import org.bitcoinj.core.Transaction;
import org.bitcoinj.core.TransactionConfidence;
import org.bitcoinj.wallet.Wallet;
/**