diff options
author | Ram Krishna Verma <ram_krishna.verma@bell.ca> | 2020-04-09 16:24:44 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-04-09 16:24:44 +0000 |
commit | 7452546571b4189154cbf4c435fc58cff4a6aebd (patch) | |
tree | cc4896788860c544c50aa3a1df995defdd7d7d1e | |
parent | fc99c7710aaaf5f3c1f663e344db61e72b0de90b (diff) | |
parent | 6d6fb5878d31d502b931ec1f632291713ff42f97 (diff) |
Merge "Disable sonar main args for models"
3 files changed, 14 insertions, 1 deletions
diff --git a/models-sim/models-sim-dmaap/src/main/java/org/onap/policy/models/sim/dmaap/startstop/Main.java b/models-sim/models-sim-dmaap/src/main/java/org/onap/policy/models/sim/dmaap/startstop/Main.java index 7b4f41b07..a7214a073 100644 --- a/models-sim/models-sim-dmaap/src/main/java/org/onap/policy/models/sim/dmaap/startstop/Main.java +++ b/models-sim/models-sim-dmaap/src/main/java/org/onap/policy/models/sim/dmaap/startstop/Main.java @@ -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); } } diff --git a/models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/PdpSimulatorMain.java b/models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/PdpSimulatorMain.java index 99bf20e48..050786902 100644 --- a/models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/PdpSimulatorMain.java +++ b/models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/PdpSimulatorMain.java @@ -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); } } diff --git a/models-sim/policy-models-simulators/src/main/java/org/onap/policy/models/simulators/Main.java b/models-sim/policy-models-simulators/src/main/java/org/onap/policy/models/simulators/Main.java index d161e545a..ed9ade562 100644 --- a/models-sim/policy-models-simulators/src/main/java/org/onap/policy/models/simulators/Main.java +++ b/models-sim/policy-models-simulators/src/main/java/org/onap/policy/models/simulators/Main.java @@ -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"); |