]> AND Public Git Repository - simgrid.git/blobdiff - src/bindings/java/org/simgrid/msg/Task.java
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
guess what? I hate our java crufty code
[simgrid.git] / src / bindings / java / org / simgrid / msg / Task.java
index e371caee7ef8d7dea3ff7b32e6799279f717120e..c6098b32fe534b3d2f06a24b29b6e3c26fce96d0 100644 (file)
@@ -49,6 +49,7 @@ public class Task {
         */ 
        public Task(String name, double flopsAmount, double bytesAmount) {
                create(name, flopsAmount, bytesAmount);
+               this.name = name;
                this.messageSize = bytesAmount;
        }
        /**
@@ -84,8 +85,7 @@ public class Task {
         */
        private final native void create(String name,
                        double flopsAmount,
-                       double bytesAmount)
-                                       throws IllegalArgumentException;                
+                       double bytesAmount);
        /**
         * The natively implemented method to create a MSG parallel task.
         *
@@ -99,8 +99,7 @@ public class Task {
        private final native void parallelCreate(String name,
                        Host[]hosts,
                        double[]flopsAmount,
-                       double[]bytesAmount)
-                                       throws NullPointerException, IllegalArgumentException;
+                       double[]bytesAmount);
        /* *                   * *
         * * Getters / Setters * *
         * *                   * */
@@ -166,6 +165,7 @@ public class Task {
        public native void cancel();
 
        /** Deletes a task once the garbage collector reclaims it */
+       @Override
        protected void finalize() throws Throwable{
                nativeFinalize();
                bind=0; // to avoid segfaults if the impossible happens yet again making this task surviving its finalize()