fix: latter task cannot be executed because taskResult.getLogs() can return null and decide(workflowId) will not be invoked
…return null and decide(workflowId) will not be invoked
Pull Request type
- [x] Bugfix
- [ ] Feature
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] WHOSUSING.md
- [ ] Other (please describe):
NOTE: Please remember to run ./gradlew spotlessApply to fix any format violations.
Changes in this PR Added null check for return value taskResult.getLogs before saving task execution log when update task.
@jmigueprieto could you please check this PR. The input logs of TaskResult can be null somehow and nullpointer exception throws.
@jmigueprieto could you please check this PR. The input logs of TaskResult can be null somehow and nullpointer exception throws.
Hey @ColinZou - Thanks for bringing this up. I'll take a look.
I found this NPE when invoking update task from rest API. The update task API accepts logs=null and the NPE get triggered in the place I fixed.
- Add a test or explain the execution path that leads to a NPE
- Change Optional usage.
Hi @ColinZou can you take care of the comments and we can merge.
- Add a test or explain the execution path that leads to a NPE I've reply the message. this one: I found this NPE when invoking update task from rest API. The update task API accepts logs=null and the NPE get triggered in the place I fixed.
- Change Optional usage. It was DONE at Feb 5 2025.
Hi @ColinZou can you take care of the comments and we can merge.
@v1r3n I am really not sure which comment left to be resolved. Let me know if I misunderstood anything either from you or @jmigueprieto please.