Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't specify RuntimeExceptions in throws clauses
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 2 Feb 2017 02:31:31 +0000 (03:31 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Thu, 2 Feb 2017 02:31:31 +0000 (03:31 +0100)
src/bindings/java/org/simgrid/msg/Host.java
src/bindings/java/org/simgrid/msg/Storage.java
src/bindings/java/org/simgrid/msg/Task.java

index 4da5e01..bf2b589 100644 (file)
@@ -71,9 +71,8 @@ public class Host {
         *
         * @return              The host object with the given name.
         * @exception           HostNotFoundException if the name of the host is not valid.
-        *                                      NativeException if the native version of this method failed.
         */ 
-       public static native Host getByName(String name) throws HostNotFoundException, NullPointerException;
+       public static native Host getByName(String name) throws HostNotFoundException;
        /** Counts the installed hosts. */ 
        public static native int getCount();
 
index bf2aa6f..ea76296 100644 (file)
@@ -43,7 +43,7 @@ public class Storage {
         * @exception           StorageNotFoundException if the name of the storage is not valid.
         */ 
        public static native Storage getByName(String name) 
-                       throws HostNotFoundException, NullPointerException, StorageNotFoundException;
+                       throws HostNotFoundException, StorageNotFoundException;
 
        /**
         * This method returns the name of a storage.
index e371cae..47f87fa 100644 (file)
@@ -84,8 +84,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 +98,7 @@ public class Task {
        private final native void parallelCreate(String name,
                        Host[]hosts,
                        double[]flopsAmount,
-                       double[]bytesAmount)
-                                       throws NullPointerException, IllegalArgumentException;
+                       double[]bytesAmount);
        /* *                   * *
         * * Getters / Setters * *
         * *                   * */