|
|
@@ -20,11 +20,10 @@ package org.apache.zookeeper.cli;
|
|
|
import java.util.Collections;
|
|
|
import java.util.List;
|
|
|
import org.apache.commons.cli.CommandLine;
|
|
|
+import org.apache.commons.cli.DefaultParser;
|
|
|
import org.apache.commons.cli.HelpFormatter;
|
|
|
import org.apache.commons.cli.Options;
|
|
|
import org.apache.commons.cli.ParseException;
|
|
|
-import org.apache.commons.cli.Parser;
|
|
|
-import org.apache.commons.cli.PosixParser;
|
|
|
import org.apache.zookeeper.AsyncCallback.StringCallback;
|
|
|
import org.apache.zookeeper.KeeperException;
|
|
|
import org.apache.zookeeper.ZKUtil;
|
|
|
@@ -57,7 +56,7 @@ public class LsCommand extends CliCommand {
|
|
|
|
|
|
@Override
|
|
|
public CliCommand parse(String[] cmdArgs) throws CliParseException {
|
|
|
- Parser parser = new PosixParser();
|
|
|
+ DefaultParser parser = new DefaultParser();
|
|
|
try {
|
|
|
cl = parser.parse(options, cmdArgs);
|
|
|
} catch (ParseException ex) {
|
|
|
@@ -80,7 +79,7 @@ public class LsCommand extends CliCommand {
|
|
|
// rewrite to option
|
|
|
cmdArgs[2] = "-w";
|
|
|
err.println("'ls path [watch]' has been deprecated. " + "Please use 'ls [-w] path' instead.");
|
|
|
- Parser parser = new PosixParser();
|
|
|
+ DefaultParser parser = new DefaultParser();
|
|
|
try {
|
|
|
cl = parser.parse(options, cmdArgs);
|
|
|
} catch (ParseException ex) {
|