diff options
author | Jim Hahn <jrh3@att.com> | 2020-09-30 14:32:56 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2020-09-30 16:29:50 -0400 |
commit | b7239e0e2859d998d5f8448879409eb30c3bc658 (patch) | |
tree | 7b9eec66ddaf30200fb4a55c0ceacbdb3035e63e /policy-core/src/main | |
parent | 7ee6e75574262ca7419481881313bd60e72bf302 (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')
-rw-r--r-- | policy-core/src/main/java/org/onap/policy/drools/core/PolicyContainer.java | 7 |
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; } |