Skip to content

Commit

Permalink
simplify doHelp, parameter was always NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
panthony authored and fbacchella committed Apr 23, 2015
1 parent 9ff0929 commit e81296e
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions src/jrds/bootstrap/BootStrap.java
Expand Up @@ -60,7 +60,7 @@ public static void main(String[] args) {
if(args.length > 1)
commandName = args[1].trim().toLowerCase();
else
doHelp(null);
doHelp();
}
else {
if(args.length > 1)
Expand Down Expand Up @@ -156,20 +156,17 @@ else if(libFile.isFile() && libFile.getName().endsWith(".jar"))
return null;
}

static private void doHelp(CommandStarter command) {
if(command == null) {
System.out.println("Lists of available command:");
for(String commandName: cmdClasses.keySet()) {
System.out.println(" " + commandName);
}
System.out.println("");
System.out.println("Lists of configuration propreties:");
for(String propName: propertiesList) {
System.out.println(" " + propName);
}
System.out.println(String.format("A class path can be auto build with the propery libspath, a list of directory or jar, separated by a %s", File.pathSeparatorChar));

static private void doHelp() {
System.out.println("Lists of available command:");
for(String commandName: cmdClasses.keySet()) {
System.out.println(" " + commandName);
}
System.out.println("");
System.out.println("Lists of configuration propreties:");
for(String propName: propertiesList) {
System.out.println(" " + propName);
}
System.out.println(String.format("A class path can be auto build with the propery libspath, a list of directory or jar, separated by a %s", File.pathSeparatorChar));
System.exit(0);
}

Expand Down

0 comments on commit e81296e

Please sign in to comment.