From 1951438a15fb128ca36142cb058e23683b42f9c3 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sun, 18 Feb 2018 17:45:33 +0100 Subject: [PATCH 1/1] sonar don't like fields nor parameters ending with a _, so don't do it Plus, inform sonar that SimGrid 3.18 was released since a while --- doc/doxygen/inside_release.doc | 2 +- sonar-project.properties | 2 +- .../java/org/simgrid/msg/Process.java | 20 ++++++++----------- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/doc/doxygen/inside_release.doc b/doc/doxygen/inside_release.doc index 49b0e20aab..d96ea36c91 100644 --- a/doc/doxygen/inside_release.doc +++ b/doc/doxygen/inside_release.doc @@ -112,7 +112,7 @@ the settings icon of the release you want to change. - libsimgrid3.XY conflicts with libsimgrid3.XX because of smpimain - Update the simgrid/package.py for spack: https://gitlab.inria.fr/solverstack/spack-repo - Create the template for the next release in ChangeLog and NEWS files -- Change the release number in CMakeLists.txt +- Change the release number in CMakeLists.txt and sonar-project.properties - Deal with deprecations: - Introduce the XBT_ATTRIB_DEPRECATED_v??? macro for the next release. - Kill the one for the current release and remove all code that were diff --git a/sonar-project.properties b/sonar-project.properties index 1d43b052a6..9e03b33119 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -3,7 +3,7 @@ sonar.projectKey=simgrid sonar.projectName=SimGrid -sonar.projectVersion=3.16 +sonar.projectVersion=3.19 sonar.links.homepage=http://simgrid.org sonar.links.issue=https://github.com/simgrid/simgrid/issues diff --git a/src/bindings/java/org/simgrid/msg/Process.java b/src/bindings/java/org/simgrid/msg/Process.java index fc4d205b55..7dc38c9e39 100644 --- a/src/bindings/java/org/simgrid/msg/Process.java +++ b/src/bindings/java/org/simgrid/msg/Process.java @@ -60,7 +60,7 @@ public abstract class Process implements Runnable { private Host host = null; /** The arguments of the method function of the process. */ - private ArrayList args_ = new ArrayList<>(); + private ArrayList args = new ArrayList<>(); /** * Constructs a new process from the name of a host and his name. The method @@ -109,7 +109,7 @@ public abstract class Process implements Runnable { * @param name The name of the process. * @param args The arguments of main method of the process. */ - public Process(Host host, String name, String[]args) + public Process(Host host, String name, String[]argsParam) { if (host == null) throw new IllegalArgumentException("Cannot create a process on the null host"); @@ -119,9 +119,9 @@ public abstract class Process implements Runnable { this.host = host; this.name = name; - this.args_ = new ArrayList<>(); - if (null != args) - this.args_.addAll(Arrays.asList(args)); + this.args = new ArrayList<>(); + if (null != argsParam) + this.args.addAll(Arrays.asList(argsParam)); } /** * Constructs a new process from a host and his name, the arguments of here method function are @@ -295,15 +295,11 @@ public abstract class Process implements Runnable { @Override public void run() { - String[] args = null; /* do not fill it before the signal or this.args will be empty */ - try { - args = new String[this.args_.size()]; - if (!this.args_.isEmpty()) { - this.args_.toArray(args); - } + String[] argsArray = new String[this.args.size()]; + this.args.toArray(argsArray); - this.main(args); + this.main(argsArray); } catch(MsgException e) { e.printStackTrace(); -- 2.20.1