Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'coverity_scan' of github.com:mquinson/simgrid
[simgrid.git] / src / bindings / java / org / simgrid / msg / Process.java
index 2e4eace..502348c 100644 (file)
@@ -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;
@@ -208,8 +212,9 @@ public abstract class Process implements Runnable {
        public native void resume();    
        /** Tests if a process is suspended.
         *
-        * @see {@link #suspend()} and {@link #resume()}
-        */ 
+        * @see #suspend()
+        * @see #resume()
+        */
        public native boolean isSuspended();
        
        /**
@@ -299,7 +304,8 @@ public abstract class Process implements Runnable {
        /**
         * Makes the current process sleep until millis milliseconds and nanos nanoseconds 
         * have elapsed.
-        * You should note that unlike "waitFor" which takes seconds, this method takes milliseconds and nanoseconds.
+        * Unlike {@link #waitFor(double)} which takes seconds, this method takes 
+        * milliseconds and nanoseconds.
         * Overloads Thread.sleep.
         * @param millis the length of time to sleep in milliseconds.
         * @param nanos additionnal nanoseconds to sleep.
@@ -361,7 +367,7 @@ public abstract class Process implements Runnable {
         */
        private static native void nativeInit();
        static {
-               Msg.nativeInit();
+               org.simgrid.NativeLib.nativeInit();
                nativeInit();
        }
        /**