diff options
author | Endi S. Dewata <edewata@redhat.com> | 2013-09-24 10:06:35 -0400 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2013-10-01 19:25:28 -0400 |
commit | a3ac3ef0ca5e720a4cd5b17e9181124c17d17ea7 (patch) | |
tree | 0c2376346a001bb4fee229d52b10ea0398442080 /base/java-tools/src/com/netscape/cmstools/profile | |
parent | 2b9fcdae818eded53ab64e5b86b947c80a262722 (diff) | |
download | pki-a3ac3ef0ca5e720a4cd5b17e9181124c17d17ea7.tar.gz pki-a3ac3ef0ca5e720a4cd5b17e9181124c17d17ea7.tar.xz pki-a3ac3ef0ca5e720a4cd5b17e9181124c17d17ea7.zip |
Refactored CLI framework.
The CLI framework has been modified to remove duplicate code
in various CLI modules.
Diffstat (limited to 'base/java-tools/src/com/netscape/cmstools/profile')
-rw-r--r-- | base/java-tools/src/com/netscape/cmstools/profile/ProfileCLI.java | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/base/java-tools/src/com/netscape/cmstools/profile/ProfileCLI.java b/base/java-tools/src/com/netscape/cmstools/profile/ProfileCLI.java index 32b6366b3..7ba472454 100644 --- a/base/java-tools/src/com/netscape/cmstools/profile/ProfileCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/profile/ProfileCLI.java @@ -4,7 +4,6 @@ import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.net.URI; -import java.util.Arrays; import java.util.Locale; import javax.xml.bind.JAXBContext; @@ -52,28 +51,7 @@ public class ProfileCLI extends CLI { client = parent.getClient(); profileClient = new ProfileClient(client); - if (args.length == 0) { - printHelp(); - System.exit(1); - } - - String command = args[0]; - String[] commandArgs = Arrays.copyOfRange(args, 1, args.length); - - if (command == null) { - printHelp(); - System.exit(1); - } - - CLI module = getModule(command); - if (module != null) { - module.execute(commandArgs); - - } else { - System.err.println("Error: Invalid command \"" + command + "\""); - printHelp(); - System.exit(1); - } + super.execute(args); } public static void printProfileDataInfo(ProfileDataInfo info) { |