Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Revert "Let our examples compile with java 1.6, or almost"
[simgrid.git] / examples / java / app / bittorrent / Peer.java
index f20881b..0bdc770 100644 (file)
@@ -50,12 +50,12 @@ public class Peer extends Process {
       Msg.info("Wrong number of arguments");
     }
     if (args.length == 3) {
-      init(Integer.valueOf(args[0]),true);
+      init(Integer.parseInt(args[0]),true);
     } else {
-      init(Integer.valueOf(args[0]),false);
+      init(Integer.parseInt(args[0]),false);
     }
     //Retrieve the deadline
-    deadline = Double.valueOf(args[1]);
+    deadline = Double.parseDouble(args[1]);
     if (deadline < 0) {
       Msg.info("Wrong deadline supplied");
       return;
@@ -365,7 +365,7 @@ public class Peer extends Process {
    * @brief Updates the list of who has a piece from a bitfield
    * @param bitfield bitfield
    */
-  private void updatePiecesCountFromBitfield(char bitfield[]) {
+  private void updatePiecesCountFromBitfield(char[] bitfield) {
     for (int i = 0; i < Common.FILE_PIECES; i++) {
       if (bitfield[i] == '1') {
         piecesCount[i]++;