diff options
Diffstat (limited to 'vespa-http-client/src/main/java/com/yahoo')
-rw-r--r-- | vespa-http-client/src/main/java/com/yahoo/vespa/http/client/runner/CommandLineArguments.java | 16 |
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"}, |