summaryrefslogtreecommitdiffstats
path: root/policy-core/src/main/java
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-09-30 14:32:56 -0400
committerJim Hahn <jrh3@att.com>2020-09-30 16:29:50 -0400
commitb7239e0e2859d998d5f8448879409eb30c3bc658 (patch)
tree7b9eec66ddaf30200fb4a55c0ceacbdb3035e63e /policy-core/src/main/java
parent7ee6e75574262ca7419481881313bd60e72bf302 (diff)
Fix new sonars in drools-pdp
Addressed the following sonar issues: - extract common test method - too many assertions in test method - don't always return the same value Issue-ID: POLICY-2616 Change-Id: Iab836cdcd667b35e2db9db7d6ffc7896df33e1c8 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'policy-core/src/main/java')
-rw-r--r--policy-core/src/main/java/org/onap/policy/drools/core/PolicyContainer.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/policy-core/src/main/java/org/onap/policy/drools/core/PolicyContainer.java b/policy-core/src/main/java/org/onap/policy/drools/core/PolicyContainer.java
index 6547ca73..5bce3505 100644
--- a/policy-core/src/main/java/org/onap/policy/drools/core/PolicyContainer.java
+++ b/policy-core/src/main/java/org/onap/policy/drools/core/PolicyContainer.java
@@ -537,7 +537,12 @@ public class PolicyContainer implements Startable {
* {@inheritDoc}.
*/
@Override
- public synchronized boolean start() {
+ public synchronized boolean start() { // NOSONAR
+ /*
+ * disabling sonar about returning the same value, because we prefer the code to
+ * be structured this way
+ */
+
if (isStarted) {
return true;
}