Update jopt-simple to 5.0.4.

This commit is contained in:
Andreas Schildbach
2019-02-14 23:42:10 +01:00
parent 225941d88a
commit 08bb331cc3
5 changed files with 6 additions and 6 deletions

View File

@@ -6,7 +6,7 @@ eclipse.project.name = 'bitcoinj-examples'
dependencies {
implementation project(':core')
implementation 'com.google.guava:guava:27.0.1-android'
implementation 'net.sf.jopt-simple:jopt-simple:4.3'
implementation 'net.sf.jopt-simple:jopt-simple:5.0.4'
implementation 'org.slf4j:slf4j-jdk14:1.7.25'
implementation 'org.fusesource.leveldbjni:leveldbjni-all:1.8'
}

View File

@@ -89,7 +89,7 @@ public class ExamplePaymentChannelClient {
}
}
NetworkParameters params = net.value(opts).get();
new ExamplePaymentChannelClient().run(opts.nonOptionArguments().get(0), clientChannelProperties, params);
new ExamplePaymentChannelClient().run((String) opts.nonOptionArguments().get(0), clientChannelProperties, params);
}
public ExamplePaymentChannelClient() {

View File

@@ -43,7 +43,7 @@ public class FetchBlock {
// Parse command line arguments
OptionParser parser = new OptionParser();
OptionSet opts = null;
List<String> nonOpts = null;
List<byte[]> nonOpts = null;
try {
parser.accepts("localhost", "Connect to the localhost node");
parser.accepts("help", "Displays program options");
@@ -53,7 +53,7 @@ public class FetchBlock {
parser.printHelpOn(System.out);
return;
}
nonOpts = opts.nonOptionArguments();
nonOpts = (List<byte[]>) opts.nonOptionArguments();
if (nonOpts.size() != 1) {
throw new IllegalArgumentException("Incorrect number of block hash, please provide only one block hash.");
}

View File

@@ -6,7 +6,7 @@ eclipse.project.name = 'bitcoinj-tools'
dependencies {
implementation project(':core')
implementation 'com.google.guava:guava:27.0.1-android'
implementation 'net.sf.jopt-simple:jopt-simple:4.3'
implementation 'net.sf.jopt-simple:jopt-simple:5.0.4'
implementation 'org.slf4j:slf4j-jdk14:1.7.25'
}

View File

@@ -277,7 +277,7 @@ public class WalletTool {
ActionEnum action;
try {
String actionStr = options.nonOptionArguments().get(0);
String actionStr = (String) options.nonOptionArguments().get(0);
actionStr = actionStr.toUpperCase().replace("-", "_");
action = ActionEnum.valueOf(actionStr);
} catch (IllegalArgumentException e) {