diff options
author | liamfallon <liam.fallon@est.tech> | 2019-03-19 01:16:38 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2019-03-19 01:16:38 +0000 |
commit | 923a9943a1d59a9d1e87d24490eea78fa9869de7 (patch) | |
tree | 23558e0aa07330a29b2d102740ec87785625d273 /core/core-engine | |
parent | b804d0b81b2f6be2561b7606cf67fbad37928307 (diff) |
Use Assertions class from policy-common
Change import line in all classes that use
the Assertions class, there are a lot of them.
Issue-ID: POLICY-1264
Change-Id: I8480264be4e36348b3fc63acf1bc36e9c9dd250b
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'core/core-engine')
6 files changed, 15 insertions, 9 deletions
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineImpl.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineImpl.java index b703506ea..bf4219390 100644 --- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineImpl.java +++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineImpl.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2019 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +21,7 @@ package org.onap.policy.apex.core.engine.engine.impl; -import static org.onap.policy.apex.model.utilities.Assertions.argumentNotNull; +import static org.onap.policy.common.utils.validation.Assertions.argumentNotNull; import java.util.LinkedHashMap; import java.util.Map; @@ -213,7 +214,7 @@ public class ApexEngineImpl implements ApexEngine { for (int increment = ApexEngineConstants.STOP_EXECUTION_WAIT_TIMEOUT; increment > 0; increment -= ApexEngineConstants.APEX_ENGINE_STOP_EXECUTION_WAIT_INCREMENT) { ThreadUtilities.sleep(ApexEngineConstants.APEX_ENGINE_STOP_EXECUTION_WAIT_INCREMENT); - + synchronized (state) { switch (state) { // Engine is OK to stop or has been stopped on return of an event @@ -245,7 +246,7 @@ public class ApexEngineImpl implements ApexEngine { synchronized (state) { state = AxEngineState.STOPPED; } - + throw new ApexException(STOP + key.getId() + "," + state + ", error stopping engine, engine stop timed out"); } diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutor.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutor.java index c30bda1b9..2e6d96143 100644 --- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutor.java +++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutor.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2019 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +21,7 @@ package org.onap.policy.apex.core.engine.executor; -import static org.onap.policy.apex.model.utilities.Assertions.argumentOfClassNotNull; +import static org.onap.policy.common.utils.validation.Assertions.argumentOfClassNotNull; import java.util.Map; diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateOutput.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateOutput.java index 837347174..40de843ea 100644 --- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateOutput.java +++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateOutput.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2019 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,7 +32,7 @@ import org.onap.policy.apex.model.eventmodel.concepts.AxEvent; import org.onap.policy.apex.model.eventmodel.concepts.AxEvents; import org.onap.policy.apex.model.eventmodel.concepts.AxField; import org.onap.policy.apex.model.policymodel.concepts.AxStateOutput; -import org.onap.policy.apex.model.utilities.Assertions; +import org.onap.policy.common.utils.validation.Assertions; /** * This class is the output of a state, and is used by the engine to decide what the next state for execution is. diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskExecutor.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskExecutor.java index c55d4924d..9c21dc570 100644 --- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskExecutor.java +++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskExecutor.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2019 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +21,7 @@ package org.onap.policy.apex.core.engine.executor; -import static org.onap.policy.apex.model.utilities.Assertions.argumentOfClassNotNull; +import static org.onap.policy.common.utils.validation.Assertions.argumentOfClassNotNull; import java.util.Iterator; import java.util.Map; @@ -222,7 +223,7 @@ public abstract class TaskExecutor /** * If the input field exists on the output and it is not set in the task, then it should be copied to the output. - * + * * @param field the input field */ private void copyInputField2Output(String field) { diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutor.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutor.java index 5d24f0d4a..3439655c9 100644 --- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutor.java +++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutor.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2019 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +21,7 @@ package org.onap.policy.apex.core.engine.executor; -import static org.onap.policy.apex.model.utilities.Assertions.argumentNotNull; +import static org.onap.policy.common.utils.validation.Assertions.argumentNotNull; import org.onap.policy.apex.context.ContextException; import org.onap.policy.apex.core.engine.ExecutorParameters; diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/impl/ExecutorFactoryImpl.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/impl/ExecutorFactoryImpl.java index c0e24dd5a..7bc437907 100644 --- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/impl/ExecutorFactoryImpl.java +++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/impl/ExecutorFactoryImpl.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2019 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,8 +39,8 @@ import org.onap.policy.apex.core.engine.executor.exception.StateMachineRuntimeEx import org.onap.policy.apex.model.policymodel.concepts.AxState; import org.onap.policy.apex.model.policymodel.concepts.AxStateFinalizerLogic; import org.onap.policy.apex.model.policymodel.concepts.AxTask; -import org.onap.policy.apex.model.utilities.Assertions; import org.onap.policy.common.parameters.ParameterService; +import org.onap.policy.common.utils.validation.Assertions; import org.slf4j.ext.XLogger; import org.slf4j.ext.XLoggerFactory; |