Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cleanups in Java examples advised by Sonar
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 2 Aug 2017 08:26:10 +0000 (10:26 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 2 Aug 2017 08:26:10 +0000 (10:26 +0200)
13 files changed:
examples/java/app/bittorrent/Main.java
examples/java/app/tokenring/Main.java
examples/java/async/dsend/Main.java
examples/java/async/waitall/Main.java
examples/java/async/yield/Main.java
examples/java/cloud/masterworker/Main.java
examples/java/cloud/migration/XVM.java
examples/java/dht/kademlia/Main.java
examples/java/energy/pstate/Main.java
examples/java/io/file/Main.java
examples/java/io/file/Node.java
examples/java/io/storage/Client.java
examples/java/io/storage/Main.java

index 091b6ec..352addb 100644 (file)
@@ -6,7 +6,6 @@
 package app.bittorrent;
 
 import org.simgrid.msg.Msg;
-import org.simgrid.msg.MsgException;
 import org.simgrid.msg.RngStream;
 
 class Main{
index 754dad0..e633676 100644 (file)
@@ -1,11 +1,10 @@
-/* Copyright (c) 2016. The SimGrid Team. All rights reserved.               */
+/* Copyright (c) 2016-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package app.tokenring;
 import org.simgrid.msg.Host;
-import org.simgrid.msg.HostNotFoundException;
 import org.simgrid.msg.Msg;
 import org.simgrid.msg.Process;
 
@@ -15,7 +14,7 @@ class Main {
                throw new IllegalAccessError("Utility class");
        }
 
-       public static void main(String[] args) throws HostNotFoundException {
+       public static void main(String[] args) {
                Msg.init(args);
                
                String platform = "../platforms/small_platform.xml";
index 0822c42..cbdf523 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -13,7 +12,6 @@ package async.dsend;
  */
 
 import org.simgrid.msg.Host;
-import org.simgrid.msg.HostNotFoundException;
 import org.simgrid.msg.Msg;
 
 class Main {
@@ -22,7 +20,7 @@ class Main {
     throw new IllegalAccessError("Utility class");
   }
 
-  public static void main(String[] args) throws HostNotFoundException {
+  public static void main(String[] args) {
     Msg.init(args);
 
     String platform = "../platforms/small_platform.xml";
index 208e554..0a54479 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -20,14 +19,13 @@ package async.waitall;
 
 import org.simgrid.msg.Msg;
 import org.simgrid.msg.Host;
-import org.simgrid.msg.MsgException;
 
 class Main {
   private Main() {
     throw new IllegalAccessError("Utility class");
   }
 
-  public static void main(String[] args) throws MsgException {
+  public static void main(String[] args) {
     Msg.init(args);
 
     String platform = "../platforms/small_platform.xml";
index 6e044a5..475fd39 100644 (file)
@@ -12,7 +12,6 @@ package async.yield;
  */
 
 import org.simgrid.msg.Host;
-import org.simgrid.msg.HostNotFoundException;
 import org.simgrid.msg.Msg;
 
 class Main {
@@ -21,7 +20,7 @@ class Main {
     throw new IllegalAccessError("Utility class");
   }
 
-  public static void main(String[] args) throws HostNotFoundException {
+  public static void main(String[] args) {
     Msg.init(args);
 
     String platform = "../platforms/small_platform.xml";
index e78204c..a99dc21 100644 (file)
@@ -9,7 +9,6 @@ import java.io.File;
 
 import org.simgrid.msg.Msg;
 import org.simgrid.msg.Host;
-import org.simgrid.msg.MsgException;
 
 class Main {
   public static final double TASK_COMP_SIZE = 10;
@@ -21,7 +20,7 @@ class Main {
     throw new IllegalAccessError("Utility class");
   }
 
-  public static void main(String[] args) throws MsgException {
+  public static void main(String[] args) {
     Msg.init(args); 
 
     String platfFile = "../../examples/platforms/small_platform.xml";
index 9fcaa90..ded5e44 100644 (file)
@@ -8,7 +8,6 @@ package cloud.migration;
 import org.simgrid.msg.Msg;
 import org.simgrid.msg.VM;
 import org.simgrid.msg.Host;
-import org.simgrid.msg.HostNotFoundException;
 import org.simgrid.msg.HostFailureException;
 
 public class XVM extends VM {
index 1474e55..9032779 100644 (file)
@@ -5,7 +5,6 @@
 
 package dht.kademlia;
 import org.simgrid.msg.Msg;
-import org.simgrid.msg.MsgException;
 
 class Main {
   private Main() {
index f6c3afa..01eedb8 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016. The SimGrid Team. All rights reserved.               */
+/* Copyright (c) 2016-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -6,7 +6,6 @@
 package energy.pstate;
 
 import org.simgrid.msg.Host;
-import org.simgrid.msg.HostNotFoundException;
 import org.simgrid.msg.Msg;
 
 class Main {
@@ -14,7 +13,7 @@ class Main {
     throw new IllegalAccessError("Utility class");
   }
 
-  public static void main(String[] args) throws HostNotFoundException {
+  public static void main(String[] args) {
     Msg.energyInit();
     Msg.init(args);
 
index c1b72dd..6134fe8 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2012-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -8,14 +7,13 @@ package io.file;
 
 import org.simgrid.msg.Msg;
 import org.simgrid.msg.Host;
-import org.simgrid.msg.MsgException;
 
 public class Main {
   private Main() {
     throw new IllegalAccessError("Utility class");
   }
 
-  public static void main(String[] args) throws MsgException {
+  public static void main(String[] args) {
     Msg.init(args);
     if(args.length < 1) {
       Msg.info("Usage   : IO platform_file ");
index c1622cd..edffbbc 100644 (file)
@@ -21,7 +21,6 @@ import org.simgrid.msg.Msg;
 import org.simgrid.msg.File;
 import org.simgrid.msg.Host;
 import org.simgrid.msg.Process;
-import org.simgrid.msg.HostNotFoundException;
 import org.simgrid.msg.MsgException;
 
 public class Node extends Process {
index b031faa..480ff86 100644 (file)
@@ -19,7 +19,6 @@ import org.simgrid.msg.Msg;
 import org.simgrid.msg.Host;
 import org.simgrid.msg.Process;
 import org.simgrid.msg.Storage;
-import org.simgrid.msg.HostNotFoundException;
 import org.simgrid.msg.MsgException;
 
 public class Client extends Process {
index 6755fa4..306eee8 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2012-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -7,14 +6,13 @@
 package io.storage;
 import org.simgrid.msg.Msg;
 import org.simgrid.msg.Host;
-import org.simgrid.msg.MsgException;
 
 public class Main {
   private Main() {
     throw new IllegalAccessError("Utility class");
   }
 
-  public static void main(String[] args) throws MsgException {
+  public static void main(String[] args) {
     Msg.init(args);
     if(args.length < 1) {
       Msg.info("Usage   : Storage platform_file ");