Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of https://github.com/mpoquet/simgrid
[simgrid.git] / src / bindings / java / org / simgrid / msg / Process.java
index d9b3b6e..3d36996 100644 (file)
@@ -76,8 +76,8 @@ public abstract class Process implements Runnable {
        private int ppid = -1;
        private Host host = null;
 
-       /** The arguments of the method function of the process. */     
-       public ArrayList<String> args;
+       /** The arguments of the method function of the process. */
+       private ArrayList<String> args;
 
 
        /**  Default constructor */
@@ -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;
        }
@@ -368,6 +357,6 @@ public abstract class Process implements Runnable {
         *
         * @return                      The count of the running processes
         */ 
-       public native static int getCount();
+       public static native int getCount();
 
 }