Repository: mina-sshd Updated Branches: refs/heads/master 154287462 -> 3e2b4f8e2
Removed deprecated usage of arg4j ExampleMode Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/3e2b4f8e Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/3e2b4f8e Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/3e2b4f8e Branch: refs/heads/master Commit: 3e2b4f8e2ce301ea3d77585c7bf48dd0a9ea4bd5 Parents: 74b6918 Author: Goldstein Lyor <[email protected]> Authored: Thu Dec 28 12:42:04 2017 +0200 Committer: Goldstein Lyor <[email protected]> Committed: Thu Dec 28 12:42:58 2017 +0200 ---------------------------------------------------------------------- .../sshd/git/pgm/EmbeddedCommandRunner.java | 23 ++++++++------------ 1 file changed, 9 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/3e2b4f8e/sshd-git/src/main/java/org/apache/sshd/git/pgm/EmbeddedCommandRunner.java ---------------------------------------------------------------------- diff --git a/sshd-git/src/main/java/org/apache/sshd/git/pgm/EmbeddedCommandRunner.java b/sshd-git/src/main/java/org/apache/sshd/git/pgm/EmbeddedCommandRunner.java index 0b1f3c7..8ccc510 100644 --- a/sshd-git/src/main/java/org/apache/sshd/git/pgm/EmbeddedCommandRunner.java +++ b/sshd-git/src/main/java/org/apache/sshd/git/pgm/EmbeddedCommandRunner.java @@ -42,8 +42,8 @@ import org.eclipse.jgit.pgm.opt.SubcommandHandler; import org.eclipse.jgit.util.io.ThrowingPrintWriter; import org.kohsuke.args4j.Argument; import org.kohsuke.args4j.CmdLineException; -import org.kohsuke.args4j.ExampleMode; import org.kohsuke.args4j.Option; +import org.kohsuke.args4j.OptionHandlerFilter; /** * TODO Add javadoc @@ -75,16 +75,11 @@ public class EmbeddedCommandRunner { /** * Execute a command. * - * @param argv - * the command and its arguments - * @param in - * the input stream, may be null in which case the system input stream will be used - * @param out - * the output stream, may be null in which case the system output stream will be used - * @param err - * the error stream, may be null in which case the system error stream will be used - * @throws Exception - * if an error occurs + * @param argv the command and its arguments + * @param in the input stream, may be null in which case the system input stream will be used + * @param out the output stream, may be null in which case the system output stream will be used + * @param err the error stream, may be null in which case the system error stream will be used + * @throws Exception if an error occurs */ public void execute(final String[] argv, InputStream in, OutputStream out, OutputStream err) throws Exception { final CmdLineParser clp = new CmdLineParser(this); @@ -100,7 +95,7 @@ public class EmbeddedCommandRunner { } if (argv.length == 0 || help) { - final String ex = clp.printExample(ExampleMode.ALL, CLIText.get().resourceBundle()); + final String ex = clp.printExample(OptionHandlerFilter.ALL, CLIText.get().resourceBundle()); writer.println("jgit" + ex + " command [ARG ...]"); //$NON-NLS-1$ if (help) { writer.println(); @@ -152,8 +147,8 @@ public class EmbeddedCommandRunner { set(cmd, "ins", in); set(cmd, "outs", out); set(cmd, "errs", err); - - Boolean success = (Boolean) call(cmd, "requiresRepository"); + + Boolean success = (Boolean) call(cmd, "requiresRepository"); if (success) { call(cmd, "init", new Class[] {Repository.class, String.class}, new Object[] {openGitDir(gitdir), gitdir}); } else {
