summaryrefslogtreecommitdiffstats
path: root/plugins/plugins-executor/plugins-executor-jython/src
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-09-04 17:24:15 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-09-04 17:25:22 +0100
commit87be30582d1db37bee7c6b456c0c5c3ca9584963 (patch)
tree28806c5866fc5d07c89a06014d7c7d2705772b4f /plugins/plugins-executor/plugins-executor-jython/src
parentf32508381ce0b555fc14978cbaa458aa4e2d91c5 (diff)
Fix checkstyle issues in apex model basic
CHeckstyle issues in apex model basic and knock on changes in other apex modules. Issue-ID: POLICY-1034 Change-Id: I65823f5e2e344526abc74b0812877113acb056ec Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'plugins/plugins-executor/plugins-executor-jython/src')
-rw-r--r--plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutor.java18
-rw-r--r--plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutor.java18
2 files changed, 18 insertions, 18 deletions
diff --git a/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutor.java b/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutor.java
index 71dce5801..e1c0f096a 100644
--- a/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutor.java
@@ -67,8 +67,8 @@ public class JythonTaskExecutor extends TaskExecutor {
compiled = Py.compile_flags(logic, filename, CompileMode.exec, new CompilerFlags());
}
} catch (final PyException e) {
- LOGGER.warn("failed to compile Jython code for task " + getSubject().getKey().getID(), e);
- throw new StateMachineException("failed to compile Jython code for task " + getSubject().getKey().getID(),
+ LOGGER.warn("failed to compile Jython code for task " + getSubject().getKey().getId(), e);
+ throw new StateMachineException("failed to compile Jython code for task " + getSubject().getKey().getId(),
e);
}
@@ -104,24 +104,24 @@ public class JythonTaskExecutor extends TaskExecutor {
final Object ret = interpreter.get("returnValue", java.lang.Boolean.class);
if (ret == null) {
LOGGER.error("execute: task logic failed to set a return value for task \""
- + getSubject().getKey().getID() + "\"");
+ + getSubject().getKey().getId() + "\"");
throw new StateMachineException("execute: task logic failed to set a return value for task \""
- + getSubject().getKey().getID() + "\"");
+ + getSubject().getKey().getId() + "\"");
}
returnValue = (Boolean) ret;
} catch (NullPointerException | ClassCastException e) {
LOGGER.error("execute: task selection logic failed to set a correct return value for state \""
- + getSubject().getKey().getID() + "\"", e);
+ + getSubject().getKey().getId() + "\"", e);
throw new StateMachineException(
"execute: task selection logic failed to set a return value for state \""
- + getSubject().getKey().getID() + "\"",
+ + getSubject().getKey().getId() + "\"",
e);
}
}
/* */
} catch (final Exception e) {
- LOGGER.warn("failed to execute Jython code for task " + getSubject().getKey().getID(), e);
- throw new StateMachineException("failed to execute Jython code for task " + getSubject().getKey().getID(),
+ LOGGER.warn("failed to execute Jython code for task " + getSubject().getKey().getId(), e);
+ throw new StateMachineException("failed to execute Jython code for task " + getSubject().getKey().getId(),
e);
}
@@ -144,7 +144,7 @@ public class JythonTaskExecutor extends TaskExecutor {
@Override
public void cleanUp() throws StateMachineException {
interpreter.cleanup();
- LOGGER.debug("cleanUp:" + getSubject().getKey().getID() + "," + getSubject().getTaskLogic().getLogicFlavour()
+ LOGGER.debug("cleanUp:" + getSubject().getKey().getId() + "," + getSubject().getTaskLogic().getLogicFlavour()
+ "," + getSubject().getTaskLogic().getLogic());
}
}
diff --git a/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutor.java b/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutor.java
index d28001d87..4f4d38a19 100644
--- a/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutor.java
@@ -66,10 +66,10 @@ public class JythonTaskSelectExecutor extends TaskSelectExecutor {
compiled = Py.compile_flags(logic, filename, CompileMode.exec, new CompilerFlags());
}
} catch (final PyException e) {
- LOGGER.warn("failed to compile Jython code for task selection logic in " + getSubject().getKey().getID(),
+ LOGGER.warn("failed to compile Jython code for task selection logic in " + getSubject().getKey().getId(),
e);
throw new StateMachineException(
- "failed to compile Jython code for task selection logic in " + getSubject().getKey().getID(), e);
+ "failed to compile Jython code for task selection logic in " + getSubject().getKey().getId(), e);
}
}
@@ -104,27 +104,27 @@ public class JythonTaskSelectExecutor extends TaskSelectExecutor {
final Object ret = interpreter.get("returnValue", java.lang.Boolean.class);
if (ret == null) {
LOGGER.error("execute: task selection logic failed to set a return value for state \""
- + getSubject().getKey().getID() + "\"");
+ + getSubject().getKey().getId() + "\"");
throw new StateMachineException(
"execute: task selection logic failed to set a return value for state \""
- + getSubject().getKey().getID() + "\"");
+ + getSubject().getKey().getId() + "\"");
}
returnValue = (Boolean) ret;
} catch (NullPointerException | ClassCastException e) {
LOGGER.error("execute: task selection logic failed to set a correct return value for state \""
- + getSubject().getKey().getID() + "\"", e);
+ + getSubject().getKey().getId() + "\"", e);
throw new StateMachineException(
"execute: task selection logic failed to set a return value for state \""
- + getSubject().getKey().getID() + "\"",
+ + getSubject().getKey().getId() + "\"",
e);
}
}
/* */
} catch (final Exception e) {
- LOGGER.warn("failed to execute Jython code for task selection logic in " + getSubject().getKey().getID(),
+ LOGGER.warn("failed to execute Jython code for task selection logic in " + getSubject().getKey().getId(),
e);
throw new StateMachineException(
- "failed to execute Jython code for task selection logic in " + getSubject().getKey().getID(), e);
+ "failed to execute Jython code for task selection logic in " + getSubject().getKey().getId(), e);
}
// Do the execution post work
@@ -146,7 +146,7 @@ public class JythonTaskSelectExecutor extends TaskSelectExecutor {
@Override
public void cleanUp() throws StateMachineException {
interpreter.cleanup();
- LOGGER.debug("cleanUp:" + getSubject().getKey().getID() + ","
+ LOGGER.debug("cleanUp:" + getSubject().getKey().getId() + ","
+ getSubject().getTaskSelectionLogic().getLogicFlavour() + ","
+ getSubject().getTaskSelectionLogic().getLogic());
}