Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Do not pass a NULL argument to processes
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 15 Apr 2008 16:11:26 +0000 (16:11 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 15 Apr 2008 16:11:26 +0000 (16:11 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5345 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/java/simgrid/msg/Process.java

index 04f26b9..c690fae 100644 (file)
@@ -344,22 +344,21 @@ public abstract class Process extends Thread {
      */
   public synchronized void run() {
 
-    try {
       String[]args = null;      /* do not fill it before the signal or this.args will be empty */
 
       //waitSignal(); /* wait for other people to fill the process in */
 
 
-      try {
+     try {
         schedBegin.acquire();
-      } catch(InterruptedException e) {
-      }
+     } catch(InterruptedException e) {
+     }
 
 
 
+    try {
+      args = new String[this.args.size()];
       if (this.args.size() > 0) {
-
-        args = new String[this.args.size()];
         this.args.toArray(args);
       }