Disable sonar main args for models 80/105680/1
authorJim Hahn <jrh3@att.com>
Thu, 9 Apr 2020 13:55:43 +0000 (09:55 -0400)
committerJim Hahn <jrh3@att.com>
Thu, 9 Apr 2020 13:56:56 +0000 (09:56 -0400)
Issue-ID: POLICY-2305
Change-Id: Ie8c45fb767ec9b2f9b1b541532fede52306c36b4
Signed-off-by: Jim Hahn <jrh3@att.com>
models-sim/models-sim-dmaap/src/main/java/org/onap/policy/models/sim/dmaap/startstop/Main.java
models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/PdpSimulatorMain.java
models-sim/policy-models-simulators/src/main/java/org/onap/policy/models/simulators/Main.java

index 7b4f41b..a7214a0 100644 (file)
@@ -137,7 +137,11 @@ public class Main {
      *
      * @param args the arguments
      */
-    public static void main(final String[] args) {
+    public static void main(final String[] args) {      // NOSONAR
+        /*
+         * The arguments are validated by the constructor, thus sonar is disabled.
+         */
+
         new Main(args);
     }
 }
index 99bf20e..0507869 100644 (file)
@@ -149,6 +149,10 @@ public class PdpSimulatorMain {
      *
      */
     public static void main(final String[] args) { // NOSONAR
+        /*
+         * The arguments are validated by the constructor, thus sonar is disabled.
+         */
+
         new PdpSimulatorMain(args);
     }
 }
index d161e54..ed9ade5 100644 (file)
@@ -132,6 +132,11 @@ public class Main extends ServiceManagerContainer {
      * @param args the arguments, the first of which is the name of the parameter file
      */
     public static void main(final String[] args) { // NOSONAR
+        /*
+         * Only one argument is used and is validated implicitly by the constructor (i.e.,
+         * file-not-found), thus sonar is disabled.
+         */
+
         try {
             if (args.length != 1) {
                 throw new IllegalArgumentException("arg(s): parameter-file-name");