User: slaboure
  Date: 01/10/31 05:20:36

  Modified:    src/main/org/jboss Shutdown.java
  Log:
  Bug #476749.
  Check if the number of arguments is high enough, not exactly equal to the awaited 
position.
  
  Revision  Changes    Path
  1.5       +4 -4      jboss/src/main/org/jboss/Shutdown.java
  
  Index: Shutdown.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/Shutdown.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Shutdown.java     2001/10/17 18:48:08     1.4
  +++ Shutdown.java     2001/10/31 13:20:35     1.5
  @@ -15,7 +15,7 @@
    * command.  The host to the JMX server can be passed in as well
    * as the port number.  If neither is supplied, the defaults of
    * <tt>localhost</tt> and <tt>8082</tt> are used.
  - * 
  + *
    * <h3>Usage:</h3>
    * <pre>
    * java org.jboss.Shutdown [host] [port]
  @@ -23,7 +23,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Dewayne McNair</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Jason Dillon</a>
  - * @version $Revision: 1.4 $
  + * @version $Revision: 1.5 $
    */
   public class Shutdown
   {
  @@ -42,11 +42,11 @@
         String host = "localhost";
         int port = 8082;
   
  -      if (argv.length == 1) {
  +      if (argv.length >= 1) {
            host = argv[0];
         }
   
  -      if (argv.length == 2) {
  +      if (argv.length >= 2) {
            port = Integer.parseInt(argv[1]);
         }
   
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to