Skip to content

Commit

Permalink
fix null pointer exception
Browse files Browse the repository at this point in the history
  • Loading branch information
elguardian committed Oct 1, 2024
1 parent 67ca9b1 commit d2e3185
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void setDisconnectUserTaskInstance(Function<UserTaskInstance, UserTaskIns
public Optional<UserTaskInstance> findById(String userTaskInstanceId) {
try {
if (!userTaskInstances.containsKey(userTaskInstanceId)) {
return null;
return Optional.empty();
}
UserTaskInstance userTaskInstance = mapper.readValue(userTaskInstances.get(userTaskInstanceId), DefaultUserTaskInstance.class);
return Optional.ofNullable(reconnectUserTaskInstance.apply(userTaskInstance));
Expand Down

0 comments on commit d2e3185

Please sign in to comment.