Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
useless duplicated code
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 2 Aug 2016 07:53:18 +0000 (09:53 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 2 Aug 2016 07:53:18 +0000 (09:53 +0200)
src/bindings/java/org/simgrid/msg/Process.java

index 433259f..3d36996 100644 (file)
@@ -163,18 +163,7 @@ 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;
-
-               this.args = new ArrayList<>();
-               if (null != args)
-                       this.args.addAll(Arrays.asList(args));
-
+               this(host, name, args);
                this.startTime = startTime;
                this.killTime = killTime;
        }