Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PARQUET-2326: Bump jcommander from 1.72 to 1.82 #1123

Merged
merged 1 commit into from
Jul 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions parquet-cli/src/main/java/org/apache/parquet/cli/Help.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
*/
package org.apache.parquet.cli;

import com.beust.jcommander.DefaultUsageFormatter;
import com.beust.jcommander.IUsageFormatter;
import com.beust.jcommander.JCommander;
import com.beust.jcommander.Parameter;
import com.beust.jcommander.ParameterDescription;
Expand All @@ -33,11 +35,13 @@ public class Help implements Command {

private final JCommander jc;
private final Logger console;
private final IUsageFormatter formatter;
private String programName;

public Help(JCommander jc, Logger console) {
this.jc = jc;
this.console = console;
this.formatter = new DefaultUsageFormatter(jc);
}

public void setProgramName(String programName) {
Expand Down Expand Up @@ -67,7 +71,7 @@ public int run() {
new Object[] { programName, cmd });
}
console.info("\n Description:");
console.info("\n {}", jc.getCommandDescription(cmd));
console.info("\n {}", formatter.getCommandDescription(cmd));
if (!commander.getParameters().isEmpty()) {
console.info("\n Command options:\n");
for (ParameterDescription param : commander.getParameters()) {
Expand Down Expand Up @@ -112,7 +116,7 @@ public void printGenericHelp() {
console.info("\n Commands:\n");
for (String command : jc.getCommands().keySet()) {
console.info(" {}\n\t{}",
command, jc.getCommandDescription(command));
command, formatter.getCommandDescription(command));
}

jc.getCommands().keySet().stream().filter(s -> !s.equals("help")).findFirst().ifPresent(command -> {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@

<!-- parquet-cli dependencies -->
<opencsv.version>2.3</opencsv.version>
<jcommander.version>1.72</jcommander.version>
<jcommander.version>1.82</jcommander.version>
<zstd-jni.version>1.5.0-1</zstd-jni.version>
<commons-text.version>1.8</commons-text.version>
<jsr305.version>3.0.2</jsr305.version>
Expand Down