Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Constructors of an "abstract" class should not be "public".
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sun, 11 Oct 2020 20:14:36 +0000 (22:14 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sun, 11 Oct 2020 21:10:32 +0000 (23:10 +0200)
src/bindings/java/org/simgrid/msg/MsgException.java
src/bindings/java/org/simgrid/msg/Process.java

index 7826c2e..a48671b 100644 (file)
@@ -12,11 +12,11 @@ public abstract class MsgException extends Exception {
        private static final long serialVersionUID = 1L;
 
        /** Constructs an <code>MsgException</code> without a detail message. */
-       public MsgException() {
+       protected MsgException() {
                super();
        }
        /** Constructs an <code>MsgException</code> with a detail message. */
-       public MsgException(String msg) {
+       protected MsgException(String msg) {
                super(msg);
        }
 }
index d8f1f3b..5fb1b26 100644 (file)
@@ -73,7 +73,7 @@ public abstract class Process implements Runnable {
         *
         *
         */
-       public Process(String hostname, String name) throws HostNotFoundException {
+       protected Process(String hostname, String name) throws HostNotFoundException {
                this(Host.getByName(hostname), name, null);
        }
        /**
@@ -87,7 +87,7 @@ public abstract class Process implements Runnable {
         * @exception                   HostNotFoundException  if no host with this name exists.
         *
         */
-       public Process(String hostname, String name, String[] args) throws HostNotFoundException {
+       protected Process(String hostname, String name, String[] args) throws HostNotFoundException {
                this(Host.getByName(hostname), name, args);
        }
        /**
@@ -98,7 +98,7 @@ public abstract class Process implements Runnable {
         * @param name                  The name of the process.
         *
         */
-       public Process(Host host, String name) {
+       protected Process(Host host, String name) {
                this(host, name, null);
        }
        /**
@@ -109,7 +109,7 @@ public abstract class Process implements Runnable {
         * @param name                  The name of the process.
         * @param argsParam             The arguments of main method of the process.
         */     
-       public Process(Host host, String name, String[]argsParam)
+       protected Process(Host host, String name, String[]argsParam)
        {
                if (host == null)
                        throw new IllegalArgumentException("Cannot create a process on the null host");
@@ -134,7 +134,7 @@ public abstract class Process implements Runnable {
         * @param killTime              Kill time of the process
         *
         */
-       public Process(Host host, String name, String[]args, double startTime, double killTime) {
+       protected Process(Host host, String name, String[]args, double startTime, double killTime) {
                this(host, name, args);
                this.startTime = startTime;
                this.killTime = killTime;