Better handling of nulls output by
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2296 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
40c2d7a4bc
commit
1d2151adcf
|
|
@ -158,7 +158,7 @@ public class CommandLineGATK extends CommandLineExecutable {
|
|||
}
|
||||
|
||||
// Dump the walkers into the sorted set.
|
||||
helpText.add(new HelpEntry(packageName, packageDisplayName,packageHelpText,Collections.unmodifiableSortedSet(walkersInPackage)));
|
||||
helpText.add(new HelpEntry(packageName,packageDisplayName,packageHelpText,Collections.unmodifiableSortedSet(walkersInPackage)));
|
||||
}
|
||||
|
||||
final int headerWidth = Math.max(longestPackageName+PACKAGE_INDENT,longestWalkerName+WALKER_INDENT);
|
||||
|
|
@ -250,9 +250,9 @@ class HelpEntryComparator implements Comparator<HelpEntry> {
|
|||
*/
|
||||
public int compare(HelpEntry lhs, HelpEntry rhs) {
|
||||
if(lhs == null && rhs == null) return 0;
|
||||
if(lhs == null) return 1;
|
||||
if(rhs == null) return -1;
|
||||
return textComparator.compare(lhs.displayName,rhs.displayName);
|
||||
if(lhs == null || lhs.displayName.equals("")) return 1;
|
||||
if(rhs == null || rhs.displayName.equals("")) return -1;
|
||||
return lhs.displayName.equals(rhs.displayName) ? textComparator.compare(lhs.uid,rhs.uid) : textComparator.compare(lhs.displayName,rhs.displayName);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public class WalkerManager extends PluginManager<Walker> {
|
|||
public Map<String,Collection<Class<? extends Walker>>> getWalkerNamesByPackage() {
|
||||
Map<String,Collection<Class<? extends Walker>>> walkersByPackage = new HashMap<String,Collection<Class<? extends Walker>>>();
|
||||
for(Class<? extends Walker> walker: pluginsByName.values()) {
|
||||
String walkerPackage = walker.getPackage().getName();
|
||||
String walkerPackage = walker.getPackage() != null ? walker.getPackage().getName() : "<unpackaged>";
|
||||
if(!walkersByPackage.containsKey(walkerPackage))
|
||||
walkersByPackage.put(walkerPackage,new ArrayList<Class<? extends Walker>>());
|
||||
walkersByPackage.get(walkerPackage).add(walker);
|
||||
|
|
|
|||
Loading…
Reference in New Issue