summaryrefslogtreecommitdiffstats
path: root/controlloop/common/feature-controlloop-management/src/main
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-05-07 15:50:22 -0400
committerJim Hahn <jrh3@att.com>2021-05-07 16:04:58 -0400
commitc2cbd89fea87897b6868b036d87d97916e89734e (patch)
treeff611957eba521fabac337d8436bb0a415330430 /controlloop/common/feature-controlloop-management/src/main
parent2faa81d80569ce38a014e2a2ab404b1ea9f6899e (diff)
Fix sonars in drools-apps
Fixed: - use "var" - add @Override annotation - change constructor to "protected" - use Xxx.class::isIstance Issue-ID: POLICY-3290 Change-Id: I7f0795af306ea5afb46d12a4fe0b22adcbce683a Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'controlloop/common/feature-controlloop-management/src/main')
-rw-r--r--controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/apps/controlloop/feature/management/ControlLoopManagementFeature.java2
-rw-r--r--controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/server/restful/RestControlLoopManager.java5
2 files changed, 3 insertions, 4 deletions
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 3c7afb7fd..db078b20c 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
@@ -60,7 +60,7 @@ public class ControlLoopManagementFeature implements PolicyEngineFeatureApi {
return controller.getDrools()
.facts(sessionName, ControlLoopParams.class.getName(), false)
.stream()
- .filter(c -> c instanceof ControlLoopParams)
+ .filter(ControlLoopParams.class::isInstance)
.map(ControlLoopParams.class::cast);
}
diff --git a/controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/server/restful/RestControlLoopManager.java b/controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/server/restful/RestControlLoopManager.java
index ba7885678..0a721e8f5 100644
--- a/controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/server/restful/RestControlLoopManager.java
+++ b/controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/server/restful/RestControlLoopManager.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.
@@ -39,7 +39,6 @@ import javax.ws.rs.core.Response.Status;
import org.onap.policy.aai.AaiManager;
import org.onap.policy.controlloop.drl.legacy.ControlLoopParams;
import org.onap.policy.drools.apps.controlloop.feature.management.ControlLoopManagementFeature;
-import org.onap.policy.drools.system.PolicyEngine;
import org.onap.policy.drools.system.PolicyEngineConstants;
import org.onap.policy.rest.RestManager;
import org.slf4j.Logger;
@@ -124,7 +123,7 @@ public class RestControlLoopManager {
@Path("engine/tools/controlloops/aai/customQuery/{vserverId}")
@ApiOperation(value = "AAI Custom Query")
public Response aaiCustomQuery(@ApiParam(value = "vserver Identifier") String vserverId) {
- PolicyEngine mgr = PolicyEngineConstants.getManager();
+ var mgr = PolicyEngineConstants.getManager();
return Response
.status(Status.OK)