Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 30 Jun 2016 11:01:03 +0000 (13:01 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 30 Jun 2016 11:01:03 +0000 (13:01 +0200)
examples/java/dht/chord/Node.java
src/bindings/java/org/simgrid/NativeLib.java

index 2cb52d8..835c316 100644 (file)
@@ -44,8 +44,8 @@ public class Node extends Process {
     double nextCheckPredecessorDate = initTime + Common.PERIODIC_CHECK_PREDECESSOR_DELAY;
     double nextLookupDate = initTime + Common.PERIODIC_LOOKUP_DELAY;
 
     double nextCheckPredecessorDate = initTime + Common.PERIODIC_CHECK_PREDECESSOR_DELAY;
     double nextLookupDate = initTime + Common.PERIODIC_LOOKUP_DELAY;
 
-    id = Integer.valueOf(args[0]);
-    mailbox = Integer.toString(id);
+    mailbox = args[0];
+    id = Integer.parseInt(args[0]);
 
     fingers = new int[Common.NB_BITS];
     for (i = 0; i < Common.NB_BITS; i++) {
 
     fingers = new int[Common.NB_BITS];
     for (i = 0; i < Common.NB_BITS; i++) {
@@ -61,7 +61,7 @@ public class Node extends Process {
     } else {
       int knownId = Integer.valueOf(args[1]);
       deadline = Integer.valueOf(args[3]);
     } else {
       int knownId = Integer.valueOf(args[1]);
       deadline = Integer.valueOf(args[3]);
-      //Msg.info("Hey! Let's join the system with the id " + id + ".");
+      Msg.debug("Hey! Let's join the system with the id " + id + ".");
 
       joinSuccess = join(knownId);
     }
 
       joinSuccess = join(knownId);
     }
index 150b0cc..6cb2a9e 100644 (file)
@@ -74,9 +74,7 @@ public final class NativeLib {
 
                if (arch.matches("^i[3-6]86$"))
                        arch = "x86";
 
                if (arch.matches("^i[3-6]86$"))
                        arch = "x86";
-               else if ("x86_64".equalsIgnoreCase(arch))
-                       arch = "amd64";
-               else if ("AMD64".equalsIgnoreCase(arch))
+               else if ("x86_64".equalsIgnoreCase(arch) || "AMD64".equalsIgnoreCase(arch))
                        arch = "amd64";
 
                if (os.toLowerCase().startsWith("win")){
                        arch = "amd64";
 
                if (os.toLowerCase().startsWith("win")){