summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2006-05-09 19:35:40 +0000
committerTom Tromey <tromey@redhat.com>2006-05-09 19:35:40 +0000
commit22662cbe3484acdd2944cb385ac821a412b485f2 (patch)
tree903d1ae21cfbf3e3f71f90630b07a6d289deea5f /tools
parent295b98c9fff7e2ab4a3cc1e4c30470249d45183b (diff)
downloadclasspath-22662cbe3484acdd2944cb385ac821a412b485f2.tar.gz
* tools/gnu/classpath/tools/getopt/Parser.java (printHelp): Skip
empty groups.
Diffstat (limited to 'tools')
-rw-r--r--tools/gnu/classpath/tools/getopt/Parser.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/gnu/classpath/tools/getopt/Parser.java b/tools/gnu/classpath/tools/getopt/Parser.java
index e6fdb1037..883a8c1f3 100644
--- a/tools/gnu/classpath/tools/getopt/Parser.java
+++ b/tools/gnu/classpath/tools/getopt/Parser.java
@@ -189,8 +189,13 @@ public class Parser
while (it.hasNext())
{
OptionGroup group = (OptionGroup) it.next();
- group.printHelp(out, longOnly);
- out.println();
+ // An option group might be empty, in which case we don't
+ // want to print it..
+ if (! group.options.isEmpty())
+ {
+ group.printHelp(out, longOnly);
+ out.println();
+ }
}
if (footerText != null)