From: Martin Quinson Date: Fri, 12 Oct 2018 19:15:11 +0000 (+0200) Subject: sonar cleanups X-Git-Tag: v3_22~904 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/f4225257bc8e26afe7338c3785cb284aa83a0cec sonar cleanups --- diff --git a/examples/java/cloud/migration/XVM.java b/examples/java/cloud/migration/XVM.java index 6c24b50d47..bdf79cb9e1 100644 --- a/examples/java/cloud/migration/XVM.java +++ b/examples/java/cloud/migration/XVM.java @@ -13,13 +13,12 @@ import org.simgrid.msg.HostFailureException; public class XVM extends VM { private int dpIntensity; private int ramsize; - private int currentLoad; + private int currentLoad = 0; private Daemon daemon; public XVM(Host host, String name, int ramsize, int migNetBW, int dpIntensity){ super(host, name, ramsize, (int)(migNetBW*0.9), dpIntensity); - this.currentLoad = 0; this.dpIntensity = dpIntensity ; this.ramsize= ramsize; this.daemon = new Daemon(this); @@ -46,11 +45,6 @@ public class XVM extends VM { return this.daemon; } - public double getLoad(){ - Msg.info("Remaining comp:" + this.daemon.getRemaining()); - return this.currentLoad; - } - @Override public void migrate(Host host) throws HostFailureException { Msg.info("Start migration of VM " + this.getName() + " to " + host.getName()); diff --git a/examples/java/hostload/LoadRunner.java b/examples/java/hostload/LoadRunner.java index b382353d06..d6dd2ab524 100644 --- a/examples/java/hostload/LoadRunner.java +++ b/examples/java/hostload/LoadRunner.java @@ -22,7 +22,6 @@ public class LoadRunner extends Process { } @Override public void main(String[] strings) throws MsgException { - Host host = getHost(); display(); Msg.info("Sleep for 10 seconds"); waitFor(10); diff --git a/examples/java/hostload/Main.java b/examples/java/hostload/Main.java index 785cc39fd0..a688e62dc3 100644 --- a/examples/java/hostload/Main.java +++ b/examples/java/hostload/Main.java @@ -1,5 +1,4 @@ -/* Copyright (c) 2012-2018. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2012-2018. 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. */ @@ -15,7 +14,7 @@ public class Main { throw new IllegalAccessError("Utility class"); } - public static void main(String[] args) throws MsgException { + public static void main(String[] args) { Msg.loadInit(); Msg.init(args);