Skip to content

Commit

Permalink
Fix NPE due to different execution times
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanpelikan committed Jun 10, 2024
1 parent c7c241f commit a006214
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,13 @@ private Object checkForTransaction(
}
}
if (actions.get().bpmnErrorCommand != null) {
final var runnable = actions.get().handlerFailedCommand.getKey();
final var description = actions.get().handlerFailedCommand.getValue();
publisher.publishEvent(
new Camunda8TransactionProcessor.Camunda8CommandAfterTx(
methodSignature,
() -> actions.get().bpmnErrorCommand.getKey().accept(taskError),
() -> actions.get().bpmnErrorCommand.getValue().apply(taskError)));
() -> runnable.accept(taskError),
() -> description.apply(taskError)));
}
return null;

Expand All @@ -105,11 +107,13 @@ private Object checkForTransaction(
}
}
if (actions.get().handlerFailedCommand != null) {
final var runnable = actions.get().handlerFailedCommand.getKey();
final var description = actions.get().handlerFailedCommand.getValue();
publisher.publishEvent(
new Camunda8TransactionProcessor.Camunda8CommandAfterTx(
methodSignature,
() -> actions.get().handlerFailedCommand.getKey().accept(e),
() -> actions.get().handlerFailedCommand.getValue().apply(e)));
() -> runnable.accept(e),
() -> description.apply(e)));
}
throw e;

Expand Down

0 comments on commit a006214

Please sign in to comment.