hello all,

the following patch --already committed-- adds a -help option to the 
tool's possible options and checks for null args on the command line.

the ChangeLog entry looks like so:

2006-03-28  Raif S. Naffah  <[EMAIL PROTECTED]>

        * tools/gnu/classpath/tools/jarsigner/Main.java (processArgs): Check
        for null args.
        Check for -help option.
        * tools/gnu/classpath/tools/jarsigner/jarsigner.txt: Added -help 
option.


cheers;
rsn
Index: jarsigner.txt
===================================================================
RCS file: /cvsroot/classpath/classpath/tools/gnu/classpath/tools/jarsigner/jarsigner.txt,v
retrieving revision 1.1
diff -u -r1.1 jarsigner.txt
--- jarsigner.txt	25 Mar 2006 12:38:20 -0000	1.1
+++ jarsigner.txt	27 Mar 2006 13:29:23 -0000
@@ -99,3 +99,5 @@
                 implementation of the Security Provider capable of managing a
                 Key Store of the designated, or default, type.

+   -help        Prints this help text.
+
Index: Main.java
===================================================================
RCS file: /cvsroot/classpath/classpath/tools/gnu/classpath/tools/jarsigner/Main.java,v
retrieving revision 1.2
diff -u -r1.2 Main.java
--- Main.java	26 Mar 2006 05:26:40 -0000	1.2
+++ Main.java	27 Mar 2006 13:30:03 -0000
@@ -63,6 +63,7 @@
 import javax.security.auth.callback.UnsupportedCallbackException;

 import gnu.classpath.SystemProperties;
+import gnu.classpath.tools.HelpPrinter;
 import gnu.java.security.OID;
 import gnu.java.security.Registry;
 import gnu.javax.security.auth.callback.ConsoleCallbackHandler;
@@ -167,6 +168,10 @@
   {
     log.entering("Main", "processArgs", args);

+    HelpPrinter.checkHelpKey(args, HELP_PATH);
+    if (args == null || args.length == 0)
+      HelpPrinter.printHelpAndExit(HELP_PATH);
+
     int limit = args.length;
     log.finest("args.length=" + limit);
     int i = 0;

Attachment: pgpbzQS9199QV.pgp
Description: PGP signature

Reply via email to