summaryrefslogtreecommitdiffstats
path: root/vespa-http-client/src/main
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@oath.com>2018-11-02 13:58:53 +0000
committerTor Egge <Tor.Egge@oath.com>2018-11-02 15:09:21 +0000
commit1e1ae0946c9005c1224bae9192898c34bbde2d2d (patch)
tree0dd8bc8ad18d4e48f11d4bb9176ef19d87d0a384 /vespa-http-client/src/main
parentacbd0c230aca6c6e0dae0a832047e3d8177d7393 (diff)
Print warning if deprecated option is given to vespa http client.
Diffstat (limited to 'vespa-http-client/src/main')
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/runner/CommandLineArguments.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/runner/CommandLineArguments.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/runner/CommandLineArguments.java
index 84d3b320772..837df3c98ef 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/runner/CommandLineArguments.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/runner/CommandLineArguments.java
@@ -66,6 +66,16 @@ public class CommandLineArguments {
return null;
}
}
+ if (cmdArgs.enableV2Protocol) {
+ if (cmdArgs.enableV3Protocol) {
+ System.err.println("both --useV2Protocol and --useV3Protocol options specified, ignoring deprecated --useV2Protocol option");
+ cmdArgs.enableV2Protocol = false;
+ } else {
+ System.err.println("--useV2Protocol option is deprecated");
+ }
+ } else {
+ cmdArgs.enableV3Protocol = true;
+ }
return cmdArgs;
}
@@ -99,10 +109,10 @@ public class CommandLineArguments {
@Inject
private HelpOption helpOption;
- @Option(name = {"--useV3Protocol"}, description = "Not used anymore, see useV2Protocol.")
- private boolean notUsedBoolean = true;
+ @Option(name = {"--useV3Protocol"}, description = "Use V3 protocol to gateway. This is the default protocol.")
+ private boolean enableV3Protocol = false;
- @Option(name = {"--useV2Protocol"}, description = "Use old V2 protocol to gateway.")
+ @Option(name = {"--useV2Protocol"}, description = "Use old V2 protocol to gateway. This option is deprecated.")
private boolean enableV2Protocol = false;
@Option(name = {"--file"},