aboutsummaryrefslogtreecommitdiffstats
path: root/feature-lifecycle/src
diff options
context:
space:
mode:
authorjhh <jorge.hernandez-herrero@att.com>2021-01-28 16:30:51 -0600
committerjhh <jorge.hernandez-herrero@att.com>2021-01-28 16:30:51 -0600
commit32905749456bb5309ff9158f9c74043fe0c32a49 (patch)
tree04b08306ab17e06869ef74283b4d7c56f909cc8f /feature-lifecycle/src
parent77d088a607c33c236bc41c58d9567e10299357a5 (diff)
sonars - protected constructors and typecasting
Issue-ID: POLICY-3017 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I7e7e384db26e244e2514aec3c3579b7b7f92f8a1
Diffstat (limited to 'feature-lifecycle/src')
-rw-r--r--feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java2
-rw-r--r--feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleState.java4
-rw-r--r--feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleStateUnsupported.java4
3 files changed, 5 insertions, 5 deletions
diff --git a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java
index d56e06e9..ff53a00a 100644
--- a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java
+++ b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java
@@ -237,7 +237,7 @@ public class LifecycleFsm implements Startable {
List<PolicyTypeDroolsController> opControllers =
policyTypesMap.values().stream()
.filter(typeController -> typeController instanceof PolicyTypeDroolsController)
- .map(typeController -> (PolicyTypeDroolsController) typeController)
+ .map(PolicyTypeDroolsController.class::cast)
.filter(opController -> opController.getControllers().containsKey(controller.getName()))
.collect(Collectors.toList());
diff --git a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleState.java b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleState.java
index ad202e82..035fff3a 100644
--- a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleState.java
+++ b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleState.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019, 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.
@@ -40,7 +40,7 @@ public abstract class LifecycleState implements Startable {
/**
* Constructor.
*/
- public LifecycleState(@NonNull LifecycleFsm manager) {
+ protected LifecycleState(@NonNull LifecycleFsm manager) {
this.fsm = manager;
}
diff --git a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleStateUnsupported.java b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleStateUnsupported.java
index f37cf68d..4300c16b 100644
--- a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleStateUnsupported.java
+++ b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleStateUnsupported.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019, 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.
@@ -34,7 +34,7 @@ public abstract class LifecycleStateUnsupported extends LifecycleState {
* Constructor.
* @param manager Lifecycle Manager.
*/
- public LifecycleStateUnsupported(LifecycleFsm manager) {
+ protected LifecycleStateUnsupported(LifecycleFsm manager) {
super(manager);
}