commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r1023289 - /commons/proper/daemon/trunk/src/java/org/apache/commons/daemon/Main.java
Date Sat, 16 Oct 2010 14:14:22 GMT
Author: mturk
Date: Sat Oct 16 14:14:21 2010
New Revision: 1023289

URL: http://svn.apache.org/viewvc?rev=1023289&view=rev
Log:
Fix few typos

Modified:
    commons/proper/daemon/trunk/src/java/org/apache/commons/daemon/Main.java

Modified: commons/proper/daemon/trunk/src/java/org/apache/commons/daemon/Main.java
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/java/org/apache/commons/daemon/Main.java?rev=1023289&r1=1023288&r2=1023289&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/java/org/apache/commons/daemon/Main.java (original)
+++ commons/proper/daemon/trunk/src/java/org/apache/commons/daemon/Main.java Sat Oct 16 14:14:21
2010
@@ -86,7 +86,7 @@ public class Main implements Daemon
                         throw new IllegalArgumentException(args[i - 1]);
                     startup.setClassName(args[i]);
                 }
-                else if (args[i].equals("-start-mehod")) {
+                else if (args[i].equals("-start-method")) {
                     if (++i == args.length)
                         throw new IllegalArgumentException(args[i - 1]);
                     startup.setMethodName(args[i]);
@@ -114,8 +114,11 @@ public class Main implements Daemon
                     break;
                 }
             }
-            String[] copy = new String[args.length - i];
-            startup.addArguments(copy);
+            if (args.length > i) {
+                String[] copy = new String[args.length - i];
+                System.arraycopy(args, i, copy, 0, copy.length);
+                startup.addArguments(copy);
+            }
         }
         if (config.load(configFileName)) {
             // Setup params if not set via cmdline.



Mime
View raw message