Skip to content

Commit

Permalink
fix: check if utee taskExecution is null
Browse files Browse the repository at this point in the history
  • Loading branch information
klopfdreh committed Jul 17, 2023
1 parent 7589f4d commit 20b065d
Showing 1 changed file with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,18 @@ public UnexpectedTaskExecutionException(String message, Throwable cause, TaskExe
* @param taskExecution the task execution of which the fields should be assigned to this exception
*/
private void assignTaskExecutionFields(TaskExecution taskExecution) {
executionId = taskExecution.getExecutionId();
parentExecutionId = taskExecution.getParentExecutionId();
exitCode = taskExecution.getExitCode();
taskName = taskExecution.getTaskName();
startTime = taskExecution.getStartTime();
endTime = taskExecution.getEndTime();
externalExecutionId = taskExecution.getExternalExecutionId();
errorMessage = taskExecution.getErrorMessage();
exitMessage = taskExecution.getExitMessage();
arguments = new ArrayList<>(taskExecution.getArguments());
if(taskExecution != null) {
executionId = taskExecution.getExecutionId();
parentExecutionId = taskExecution.getParentExecutionId();
exitCode = taskExecution.getExitCode();
taskName = taskExecution.getTaskName();
startTime = taskExecution.getStartTime();
endTime = taskExecution.getEndTime();
externalExecutionId = taskExecution.getExternalExecutionId();
errorMessage = taskExecution.getErrorMessage();
exitMessage = taskExecution.getExitMessage();
arguments = new ArrayList<>(taskExecution.getArguments());
}
}

public long getExecutionId() {
Expand Down

0 comments on commit 20b065d

Please sign in to comment.