Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
further cleanups to please sonar
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 23 Aug 2016 01:09:19 +0000 (03:09 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 23 Aug 2016 01:09:19 +0000 (03:09 +0200)
examples/java/app/tokenring/RelayRunner.java
examples/java/async/waitall/Main.java
examples/java/async/waitall/Receiver.java
examples/java/async/waitall/Sender.java

index c045cdb..9704c7c 100644 (file)
@@ -10,13 +10,12 @@ import org.simgrid.msg.Process;
 import org.simgrid.msg.MsgException;
 import org.simgrid.msg.NativeException;
 import org.simgrid.msg.Host;
-import org.simgrid.msg.HostNotFoundException;
 
 public class RelayRunner extends Process {
 
        private static final int TASK_COMM_SIZE = 1000000; /* The token is 1MB long*/
 
-       public RelayRunner(Host host, String name, String[]args) throws HostNotFoundException, NativeException{
+       public RelayRunner(Host host, String name, String[]args) throws NativeException {
                super(host,name,args);
        }
 
index 8d4d6bd..208e554 100644 (file)
@@ -20,15 +20,14 @@ package async.waitall;
 
 import org.simgrid.msg.Msg;
 import org.simgrid.msg.Host;
-import org.simgrid.msg.NativeException;
-import org.simgrid.msg.HostNotFoundException;
+import org.simgrid.msg.MsgException;
 
 class Main {
   private Main() {
     throw new IllegalAccessError("Utility class");
   }
 
-  public static void main(String[] args) throws NativeException, HostNotFoundException {
+  public static void main(String[] args) throws MsgException {
     Msg.init(args);
 
     String platform = "../platforms/small_platform.xml";
index 260b6a6..66a2ba2 100644 (file)
@@ -19,6 +19,7 @@ public class Receiver extends Process {
     super(host,name);
   }
 
+  @Override
   public void main(String[] args) throws TransferFailureException, HostFailureException, TimeoutException {
     Comm comm = Task.irecv(getHost().getName());
     Msg.info("I started receiving on '"+ getHost().getName() +". Wait 0.1 second, and block on the communication.");
index c09e0f2..1fe0999 100644 (file)
@@ -18,6 +18,7 @@ public class Sender extends Process {
     super(host,name);
   }
 
+  @Override
   public void main(String[] args) throws MsgException {
     double taskComputeSize =0;
     double taskCommunicateSize = 5000000;