From 7c1511b24bdb9bea6ec3ca4933f77011df3bbd4e Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Wed, 10 Feb 2021 17:07:25 -0500 Subject: More sonars in drools-apps Addressed the following issues: - commented-out code - don't use eq() with verify() - use class::cast lambda Issue-ID: POLICY-2910 Change-Id: I12f4f85fb226f3ddb8305105e988fa90e276e9f6 Signed-off-by: Jim Hahn --- .../controlloop/feature/management/ControlLoopManagementFeature.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'controlloop/common/feature-controlloop-management/src') diff --git a/controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/apps/controlloop/feature/management/ControlLoopManagementFeature.java b/controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/apps/controlloop/feature/management/ControlLoopManagementFeature.java index b814c6f4a..3c7afb7fd 100644 --- a/controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/apps/controlloop/feature/management/ControlLoopManagementFeature.java +++ b/controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/apps/controlloop/feature/management/ControlLoopManagementFeature.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2018-2020 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2018-2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -61,7 +61,7 @@ public class ControlLoopManagementFeature implements PolicyEngineFeatureApi { .facts(sessionName, ControlLoopParams.class.getName(), false) .stream() .filter(c -> c instanceof ControlLoopParams) - .map(c -> (ControlLoopParams) c); + .map(ControlLoopParams.class::cast); } /** -- cgit 1.2.3-korg