diff options
author | Jorge Hernandez <jh1730@att.com> | 2018-09-04 20:13:38 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-09-04 20:13:38 +0000 |
commit | f7689b84472ab4698d9d96f1de08402208d99ca8 (patch) | |
tree | f003c5aef834f2158726ab678eb9a76e1ae37dac /plugins/plugins-executor/plugins-executor-jython | |
parent | 25ac320ced13ae5da0e55db5404f62237bdaa491 (diff) | |
parent | 87be30582d1db37bee7c6b456c0c5c3ca9584963 (diff) |
Merge "Fix checkstyle issues in apex model basic"
Diffstat (limited to 'plugins/plugins-executor/plugins-executor-jython')
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()); } |