From daa096b8149e18e69e1344e01cf4627d7e0dede5 Mon Sep 17 00:00:00 2001 From: Joshua Reich Date: Fri, 21 Sep 2018 16:44:25 -0700 Subject: Yet more sonar issues in drools-applications removed unused imports and variable definitions moved variable declarations above methods refactored deeply nested if/while removed code smell due to unecessary use of static keyword moved string literals to left side of comparator fixed logging of exceptions immediately return expression instead of assigning it to the temporary variable Change-Id: Idfd2a2bdf3c2f3bbfcb54a06b713d57bc867b3ab Issue-ID: POLICY-1129 Signed-off-by: Joshua Reich --- .../onap/policy/controlloop/eventmanager/ControlLoopEventManager.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'controlloop/common/eventmanager/src/main/java') diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java index 4ab7b494f..e9fc27734 100644 --- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java +++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java @@ -499,9 +499,7 @@ public class ControlLoopEventManager implements LockCallback, Serializable { this.currentOperation.getTargetEntity(), this.onset.getRequestId(), this); this.targetLock = lock; - LockResult lockResult = - LockResult.createLockResult(GuardResult.LOCK_ACQUIRED, lock); - return lockResult; + return LockResult.createLockResult(GuardResult.LOCK_ACQUIRED, lock); } // // Have we acquired it already? -- cgit 1.2.3-korg