diff options
Diffstat (limited to 'feature-lifecycle/src')
4 files changed, 9 insertions, 9 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 ac76883f..24a122b0 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 @@ -362,7 +362,7 @@ public class LifecycleFsm implements Startable { } protected boolean updatePoliciesAction(List<ToscaPolicy> toscaPolicies) { - return (this.scheduler.submit( () -> state.updatePolicies(toscaPolicies)) != null); + return (this.scheduler.submit(() -> state.updatePolicies(toscaPolicies)) != null); } /* ** Action Helpers ** */ diff --git a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleStatePassive.java b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleStatePassive.java index 8bbdbe92..438dc577 100644 --- a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleStatePassive.java +++ b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleStatePassive.java @@ -44,13 +44,13 @@ public class LifecycleStatePassive extends LifecycleStateRunning { @Override protected boolean stateChangeToActive(@NonNull PdpStateChange change) { fsm.transitionToAction(new LifecycleStateActive(fsm)); - fsm.statusAction(response(change.getRequestId(), PdpResponseStatus.SUCCESS,null)); + fsm.statusAction(response(change.getRequestId(), PdpResponseStatus.SUCCESS, null)); return fsm.updatePoliciesAction(fsm.resetPoliciesAction()); } @Override protected boolean stateChangeToPassive(@NonNull PdpStateChange change) { - return fsm.statusAction(response(change.getRequestId(), PdpResponseStatus.SUCCESS,null)); + return fsm.statusAction(response(change.getRequestId(), PdpResponseStatus.SUCCESS, null)); } @Override diff --git a/feature-lifecycle/src/main/java/org/onap/policy/drools/server/restful/RestLifecycleManager.java b/feature-lifecycle/src/main/java/org/onap/policy/drools/server/restful/RestLifecycleManager.java index 4093b510..957ecfa6 100644 --- a/feature-lifecycle/src/main/java/org/onap/policy/drools/server/restful/RestLifecycleManager.java +++ b/feature-lifecycle/src/main/java/org/onap/policy/drools/server/restful/RestLifecycleManager.java @@ -344,7 +344,7 @@ public class RestLifecycleManager { List<ToscaPolicy> policies = LifecycleFeature.fsm.getPoliciesMap().values().stream().collect(Collectors.toList()); - policies.removeIf(aPolicy -> policy.getIdentifier().equals(aPolicy.getIdentifier())); + policies.removeIf(otherPolicy -> policy.getIdentifier().equals(otherPolicy.getIdentifier())); return Response.status(Response.Status.OK) .entity(LifecycleFeature.fsm.update(getPolicyUpdate(policies))) .build(); diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java index 90492098..c618c845 100644 --- a/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java +++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java @@ -242,7 +242,7 @@ public class RestLifecycleManagerTest { assertTrue(PolicyControllerConstants.getFactory().get("lifecycle").getDrools().isBrained()); assertEquals(1, PolicyControllerConstants - .getFactory().get("lifecycle").getDrools().facts("junits", ToscaPolicy.class) .size()); + .getFactory().get("lifecycle").getDrools().facts("junits", ToscaPolicy.class).size()); resourceLists("policies", 3); get("policies/" + opPolicy.getName() + "/" + opPolicy.getVersion(), Status.OK.getStatusCode()); @@ -253,7 +253,7 @@ public class RestLifecycleManagerTest { Status.OK.getStatusCode(), Boolean.TRUE); assertEquals(0, PolicyControllerConstants - .getFactory().get("lifecycle").getDrools().facts("junits", ToscaPolicy.class) .size()); + .getFactory().get("lifecycle").getDrools().facts("junits", ToscaPolicy.class).size()); resourceLists("policies", 2); get("policies/" + opPolicy.getName() + "/" + opPolicy.getVersion(), Status.NOT_FOUND.getStatusCode()); @@ -267,7 +267,7 @@ public class RestLifecycleManagerTest { booleanPost("policies/operations/deployment", toString(opPolicy), Status.OK.getStatusCode(), Boolean.TRUE); assertEquals(1, PolicyControllerConstants - .getFactory().get("lifecycle").getDrools().facts("junits", ToscaPolicy.class) .size()); + .getFactory().get("lifecycle").getDrools().facts("junits", ToscaPolicy.class).size()); resourceLists("policies", 2); get("policies/" + opPolicy.getName() + "/" + opPolicy.getVersion(), Status.NOT_FOUND.getStatusCode()); @@ -278,7 +278,7 @@ public class RestLifecycleManagerTest { "policies/operations/undeployment", toString(opPolicy), Status.OK.getStatusCode(), Boolean.TRUE); assertEquals(0, PolicyControllerConstants - .getFactory().get("lifecycle").getDrools().facts("junits", ToscaPolicy.class) .size()); + .getFactory().get("lifecycle").getDrools().facts("junits", ToscaPolicy.class).size()); resourceLists("policies", 2); get("policies/" + opPolicy.getName() + "/" + opPolicy.getVersion(), Status.NOT_FOUND.getStatusCode()); @@ -411,7 +411,7 @@ public class RestLifecycleManagerTest { Field modifiers = Field.class.getDeclaredField("modifiers"); modifiers.setAccessible(true); - modifiers.setInt(fsmField, fsmField.getModifiers() & ~Modifier.FINAL ); + modifiers.setInt(fsmField, fsmField.getModifiers() & ~Modifier.FINAL); LifecycleFsm fsm = new LifecycleFsm(); fsmField.set(null, fsm); |