From 8229d680e48035abedf32407f92319608c4d275c Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Mon, 20 Mar 2017 22:18:53 +0100 Subject: [PATCH] java: code simplification: no need for an extra boolean here --- src/bindings/java/org/simgrid/msg/Process.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/bindings/java/org/simgrid/msg/Process.java b/src/bindings/java/org/simgrid/msg/Process.java index f96cf87ed9..f26fda439e 100644 --- a/src/bindings/java/org/simgrid/msg/Process.java +++ b/src/bindings/java/org/simgrid/msg/Process.java @@ -48,7 +48,6 @@ public abstract class Process implements Runnable { */ private long bind = 0; /** Indicates if the process is started */ - boolean started; /** * Even if this attribute is public you must never access to it. * It is used to compute the id of an MSG process. @@ -300,10 +299,8 @@ public abstract class Process implements Runnable { * @throws HostNotFoundException */ public final void start() throws HostNotFoundException { - if (!started) { - started = true; + if (bind != 0) create(host.getName()); - } } /** This method runs the process. It calls the method function that you must overwrite. */ -- 2.20.1