aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/plugins-executor/plugins-executor-java
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/plugins-executor/plugins-executor-java')
-rw-r--r--plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaStateFinalizerExecutor.java8
-rw-r--r--plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskExecutor.java8
-rw-r--r--plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskSelectExecutor.java8
3 files changed, 12 insertions, 12 deletions
diff --git a/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaStateFinalizerExecutor.java b/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaStateFinalizerExecutor.java
index 922f64f2d..21afa2ec1 100644
--- a/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaStateFinalizerExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaStateFinalizerExecutor.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
* Modifications Copyright (C) 2020 Nordix Foundation.
+ * Modifications Copyright (C) 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.
@@ -21,7 +22,6 @@
package org.onap.policy.apex.plugins.executor.java;
-import java.lang.reflect.Method;
import java.util.Map;
import java.util.Properties;
import org.onap.policy.apex.context.ContextException;
@@ -80,14 +80,14 @@ public class JavaStateFinalizerExecutor extends StateFinalizerExecutor {
executePre(executionId, executionProperties, incomingFields);
// Check and execute the Java logic
- boolean returnValue = false;
+ var returnValue = false;
try {
// Find and call the method with the signature "public boolean getStateOutput(final
// StateFinalizerExecutionContext executor) throws ApexException"
// to invoke the
// task logic in the Java class
- final Method method = stateFinalizerLogicObject.getClass().getDeclaredMethod("getStateOutput",
- new Class[] {StateFinalizerExecutionContext.class});
+ final var classes = new Class[] {StateFinalizerExecutionContext.class};
+ final var method = stateFinalizerLogicObject.getClass().getDeclaredMethod("getStateOutput", classes);
returnValue = (boolean) method.invoke(stateFinalizerLogicObject, getExecutionContext());
} catch (final Exception e) {
LOGGER.error("execute: state finalizer logic failed to run for state finalizer \"" + getSubject().getId()
diff --git a/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskExecutor.java b/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskExecutor.java
index 736249efd..da6533f17 100644
--- a/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskExecutor.java
@@ -3,6 +3,7 @@
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
* Modifications Copyright (C) 2020 Nordix Foundation.
* Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
+ * Modifications Copyright (C) 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.
@@ -22,7 +23,6 @@
package org.onap.policy.apex.plugins.executor.java;
-import java.lang.reflect.Method;
import java.util.Map;
import java.util.Properties;
import org.onap.policy.apex.context.ContextException;
@@ -83,13 +83,13 @@ public class JavaTaskExecutor extends TaskExecutor {
executePre(executionId, executionProperties, incomingFields);
// Check and execute the Java logic
- boolean returnValue = false;
+ var returnValue = false;
try {
// Find and call the method with the signature "public boolean getEvent(final TaskExecutionContext executor)
// throws ApexException" to invoke the
// task logic in the Java class
- final Method method =
- taskLogicObject.getClass().getDeclaredMethod("getEvent", new Class[] {TaskExecutionContext.class});
+ final var classes = new Class[] {TaskExecutionContext.class};
+ final var method = taskLogicObject.getClass().getDeclaredMethod("getEvent", classes);
returnValue = (boolean) method.invoke(taskLogicObject, getExecutionContext());
} catch (final Exception e) {
LOGGER.error("execute: task logic failed to run for task \"" + getSubject().getKey().getId() + "\"");
diff --git a/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskSelectExecutor.java b/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskSelectExecutor.java
index ee830ca53..27207a57d 100644
--- a/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskSelectExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskSelectExecutor.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
* Modifications Copyright (C) 2020 Nordix Foundation.
+ * Modifications Copyright (C) 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.
@@ -21,7 +22,6 @@
package org.onap.policy.apex.plugins.executor.java;
-import java.lang.reflect.Method;
import java.util.Properties;
import org.onap.policy.apex.context.ContextException;
import org.onap.policy.apex.core.engine.event.EnEvent;
@@ -84,13 +84,13 @@ public class JavaTaskSelectExecutor extends TaskSelectExecutor {
executePre(executionId, executionProperties, incomingEvent);
// Check and execute the Java logic
- boolean returnValue = false;
+ var returnValue = false;
try {
// Find and call the method with the signature "public boolean getTask(final TaskSelectionExecutionContext
// executor)" to invoke the task selection
// logic in the Java class
- final Method method = taskSelectionLogicObject.getClass().getDeclaredMethod("getTask",
- new Class[] {TaskSelectionExecutionContext.class});
+ final var classes = new Class[] {TaskSelectionExecutionContext.class};
+ final var method = taskSelectionLogicObject.getClass().getDeclaredMethod("getTask", classes);
returnValue = (boolean) method.invoke(taskSelectionLogicObject, getExecutionContext());
} catch (final Exception e) {
LOGGER.error(