From: Martin Quinson Date: Wed, 20 Jan 2016 09:47:45 +0000 (+0100) Subject: more argument checking X-Git-Tag: v3_13~1189 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/dc4984194b2b140442b6d7f752614b2f5dfc6575?ds=sidebyside more argument checking --- diff --git a/src/bindings/java/org/simgrid/msg/Process.java b/src/bindings/java/org/simgrid/msg/Process.java index 5e53e74f10..502348caa9 100644 --- a/src/bindings/java/org/simgrid/msg/Process.java +++ b/src/bindings/java/org/simgrid/msg/Process.java @@ -146,6 +146,8 @@ public abstract class Process implements Runnable { public Process(Host host, String name, String[]args) { this(); this.host = host; + if (host == null) + throw new NullPointerException("Process name cannot be NULL"); if (name == null) throw new NullPointerException("Process name cannot be NULL"); this.name = name; @@ -168,6 +170,8 @@ public abstract class Process implements Runnable { public Process(Host host, String name, String[]args, double startTime, double killTime) { this(); this.host = host; + if (host == null) + throw new NullPointerException("Process name cannot be NULL"); if (name == null) throw new NullPointerException("Process name cannot be NULL"); this.name = name;