Skip to content

Commit

Permalink
Fix deprecations in the reactor-kafka-tools
Browse files Browse the repository at this point in the history
The `ArgumentParsers.newArgumentParser()` is deprecated, so use `ArgumentParsers.newFor()` instead.
  • Loading branch information
s50600822 committed Apr 17, 2023
1 parent 4b8ddb8 commit d1aa41b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ public static void main(String[] args) throws Exception {

/** Get the command-line argument parser. */
private static ArgumentParser argParser() {
ArgumentParser parser = ArgumentParsers.newArgumentParser("consumer-performance").defaultHelp(true)
ArgumentParser parser = ArgumentParsers.newFor("consumer-performance")
.addHelp(true)
.build()
.description("This tool is used to verify the consumer performance.");

parser.addArgument("--topic")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ private static byte[] randomBytesOfLen(Random random, int len) {

/** Get the command-line argument parser. */
private static ArgumentParser argParser() {
ArgumentParser parser = ArgumentParsers.newArgumentParser("end-to-end-latency").defaultHelp(true)
ArgumentParser parser = ArgumentParsers.newFor("end-to-end-latency")
.addHelp(true)
.build()
.description("This tool is used to verify end to end latency.");

parser.addArgument("--bootstrap-servers")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,9 @@ public static void main(String[] args) throws Exception {
/** Get the command-line argument parser. */
private static ArgumentParser argParser() {
ArgumentParser parser = ArgumentParsers
.newArgumentParser("producer-performance")
.defaultHelp(true)
.newFor("producer-performance")
.addHelp(true)
.build()
.description("This tool is used to verify the producer performance.");

parser.addArgument("--topic")
Expand Down

0 comments on commit d1aa41b

Please sign in to comment.