mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2024-11-19 01:40:26 +01:00
BitcoinURI: remove deprecated method and constructor that takes NetworkParameters
This commit is contained in:
parent
adb7b1e773
commit
7fe8329bda
@ -22,7 +22,6 @@ import org.bitcoinj.base.Network;
|
||||
import org.bitcoinj.base.exceptions.AddressFormatException;
|
||||
import org.bitcoinj.base.Coin;
|
||||
import org.bitcoinj.base.Address;
|
||||
import org.bitcoinj.core.NetworkParameters;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
@ -122,21 +121,6 @@ public class BitcoinURI {
|
||||
return new BitcoinURI(uri, Objects.requireNonNull(network));
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new object by trying to parse the input as a valid Bitcoin URI.
|
||||
*
|
||||
* @param params The network parameters that determine which network the URI is from, or null if you don't have
|
||||
* any expectation about what network the URI is for and wish to check yourself.
|
||||
* @param input The raw URI data to be parsed (see class comments for accepted formats)
|
||||
*
|
||||
* @throws BitcoinURIParseException If the input fails Bitcoin URI syntax and semantic checks.
|
||||
* @deprecated Use {@link BitcoinURI#of(String, Network)} or {@link BitcoinURI#of(String)}
|
||||
*/
|
||||
@Deprecated
|
||||
public BitcoinURI(@Nullable NetworkParameters params, String input) throws BitcoinURIParseException {
|
||||
this(input, params != null ? params.network() : null);
|
||||
}
|
||||
|
||||
private BitcoinURI(String input, @Nullable Network network) throws BitcoinURIParseException {
|
||||
Objects.requireNonNull(input);
|
||||
|
||||
@ -367,25 +351,6 @@ public class BitcoinURI {
|
||||
return convertToBitcoinURI(address.network(), address.toString(), amount, label, message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple Bitcoin URI builder using known good fields.
|
||||
*
|
||||
* @param params The network parameters that determine which network the URI
|
||||
* is for.
|
||||
* @param address The Bitcoin address
|
||||
* @param amount The amount
|
||||
* @param label A label
|
||||
* @param message A message
|
||||
* @return A String containing the Bitcoin URI
|
||||
* @deprecated Use {@link #convertToBitcoinURI(Network, String, Coin, String, String)}
|
||||
*/
|
||||
@Deprecated
|
||||
public static String convertToBitcoinURI(NetworkParameters params,
|
||||
String address, @Nullable Coin amount,
|
||||
@Nullable String label, @Nullable String message) {
|
||||
return convertToBitcoinURI(params.network(), address, amount, label, message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple Bitcoin URI builder using known good fields.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user