From d5c365f60e492e37a361654974eba1719146bdc2 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Mon, 31 Aug 2020 08:22:13 -0400 Subject: Fix more sonars in drools-pdp Fixed more sonars in drools-pdp: - remove commented code - don't throw generic Exception - unused field (made it protected instead of private) - log conditionally - cognitive complexity - too many break/continue - return empty list instead of null - Random() is not secure Fixed more eclipse warnings: - parameterize generic types Issue-ID: POLICY-2616-sonars3 Change-Id: Ia5ad769b2ea763568cfae3d81807926d89153b09 Signed-off-by: Jim Hahn --- .../onap/policy/drools/activestandby/DroolsPdpsElectionHandler.java | 3 --- 1 file changed, 3 deletions(-) (limited to 'feature-active-standby-management') diff --git a/feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/DroolsPdpsElectionHandler.java b/feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/DroolsPdpsElectionHandler.java index acb7cd54..4d40fd5e 100644 --- a/feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/DroolsPdpsElectionHandler.java +++ b/feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/DroolsPdpsElectionHandler.java @@ -587,10 +587,7 @@ public class DroolsPdpsElectionHandler implements ThreadRunningChecker { * Only call promote if it is not already in the right state. Don't worry about * synching the lower level topic endpoint states. That is done by the * refreshStateAudit. - * Note that we need to fetch the session list from 'mostRecentPrimary' - * at this point -- soon, 'mostRecentPrimary' will be set to this host. */ - //this.sessions = mostRecentPrimary.getSessions(); stateManagementFeature.promote(); } } catch (Exception e) { -- cgit 1.2.3-korg