From: Gabriel Corona Date: Tue, 16 Jun 2015 12:33:46 +0000 (+0200) Subject: [java] Add missing throw NativeException specifications, fix javadoc X-Git-Tag: v3_12~580 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/3d96d2a5221c6caae2fb3dc1b58fc5e99a748c7a [java] Add missing throw NativeException specifications, fix javadoc --- diff --git a/examples/java/master_slave_bypass/Slave.java b/examples/java/master_slave_bypass/Slave.java index ff26d50c48..15fef7f9c5 100644 --- a/examples/java/master_slave_bypass/Slave.java +++ b/examples/java/master_slave_bypass/Slave.java @@ -10,6 +10,7 @@ import org.simgrid.msg.HostNotFoundException; import org.simgrid.msg.Msg; import org.simgrid.msg.TimeoutException; import org.simgrid.msg.TransferFailureException; +import org.simgrid.msg.NativeException; import org.simgrid.msg.Process; import master_slave_bypass.FinalizeTask; @@ -18,7 +19,7 @@ public class Slave extends Process { public Slave(String hostname, String name) throws HostNotFoundException { super(hostname, name); } - public void main(String[] args) throws TransferFailureException, HostFailureException, TimeoutException { + public void main(String[] args) throws TransferFailureException, HostFailureException, TimeoutException, NativeException { Msg.info("Slave Hello!"); FinalizeTask task = new FinalizeTask(); Msg.info("Send finalize!"); diff --git a/examples/java/master_slave_kill/Slave.java b/examples/java/master_slave_kill/Slave.java index ab99898d82..cd731e6cf6 100644 --- a/examples/java/master_slave_kill/Slave.java +++ b/examples/java/master_slave_kill/Slave.java @@ -12,6 +12,7 @@ import org.simgrid.msg.MsgException; import org.simgrid.msg.Task; import org.simgrid.msg.TimeoutException; import org.simgrid.msg.TransferFailureException; +import org.simgrid.msg.NativeException; import org.simgrid.msg.Process; import master_slave_kill.FinalizeTask; @@ -20,7 +21,7 @@ public class Slave extends Process { public Slave(String hostname, String name) throws HostNotFoundException { super(hostname, name); } - public void main(String[] args) throws TransferFailureException, HostFailureException, TimeoutException { + public void main(String[] args) throws TransferFailureException, HostFailureException, TimeoutException, NativeException { Msg.info("Slave Hello!"); FinalizeTask task = new FinalizeTask(); diff --git a/src/bindings/java/org/simgrid/msg/Storage.java b/src/bindings/java/org/simgrid/msg/Storage.java index 201a3b98d0..d9ccd5a66c 100644 --- a/src/bindings/java/org/simgrid/msg/Storage.java +++ b/src/bindings/java/org/simgrid/msg/Storage.java @@ -47,7 +47,7 @@ public class Storage { * * @return The storage object with the given name. * @exception StorageNotFoundException if the name of the storage is not valid. - * NativeException if the native version of this method failed. + * @exception NativeException if the native version of this method failed. */ public native static Storage getByName(String name) throws HostNotFoundException, NullPointerException, NativeException, StorageNotFoundException; diff --git a/src/bindings/java/org/simgrid/msg/Task.java b/src/bindings/java/org/simgrid/msg/Task.java index 0ee65c4b81..46f568a443 100644 --- a/src/bindings/java/org/simgrid/msg/Task.java +++ b/src/bindings/java/org/simgrid/msg/Task.java @@ -42,11 +42,11 @@ public class Task { * * @param flopsAmount A value of the processing amount (in flop) needed to process the task. * If 0, then it cannot be executed with the execute() method. - * This value has to be >= 0. + * This value has to be ≥ 0. * * @param bytesAmount A value of amount of data (in bytes) needed to transfert this task. * If 0, then it cannot be transfered with the get() and put() methods. - * This value has to be >= 0. + * This value has to be ≥ 0. */ public Task(String name, double flopsAmount, double bytesAmount) { create(name, flopsAmount, bytesAmount); @@ -199,7 +199,7 @@ public class Task { * @throws HostFailureException * @throws TransferFailureException */ - public void send(String mailbox) throws TransferFailureException, HostFailureException, TimeoutException { + public void send(String mailbox) throws TransferFailureException, HostFailureException, TimeoutException, NativeException { send(mailbox, -1); } @@ -213,7 +213,7 @@ public class Task { * @throws HostFailureException * @throws TransferFailureException */ - public native void send(String mailbox, double timeout) throws TransferFailureException, HostFailureException, TimeoutException; + public native void send(String mailbox, double timeout) throws TransferFailureException, HostFailureException, TimeoutException, NativeException; /** Sends the task on the specified mailbox (capping the sending rate to \a maxrate) *