From c0234b78b08b54ee4634fefb987b4f5c369cd7bb Mon Sep 17 00:00:00 2001 From: mquinson Date: Tue, 15 Apr 2008 16:11:26 +0000 Subject: [PATCH] Do not pass a NULL argument to processes 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 | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/java/simgrid/msg/Process.java b/src/java/simgrid/msg/Process.java index 04f26b9945..c690faec12 100644 --- a/src/java/simgrid/msg/Process.java +++ b/src/java/simgrid/msg/Process.java @@ -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); } -- 2.20.1