Skip to content

Commit

Permalink
Fix: aspectUpdateHelper result is null due to isSkipProcessing enable…
Browse files Browse the repository at this point in the history
…d so unwrapAddResult() hits NPE (#460)

Co-authored-by: Yihong Zhou <[email protected]>
  • Loading branch information
yihzhou and Yihong Zhou authored Oct 24, 2024
1 parent 5c84fe7 commit 196daa0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -817,9 +817,9 @@ public <ASPECT extends RecordTemplate> ASPECT add(@Nonnull URN urn, AspectUpdate
runInTransactionWithRetry(() -> aspectUpdateHelper(urn, updateLambda, auditStamp, trackingContext, isRawUpdate),
maxTransactionRetry);

// skip MAE producing and post update hook in test mode
// skip MAE producing and post update hook in test mode or if the result is null (no actual update with addCommon)
return updateLambda.getIngestionParams().isTestMode() ? result.newValue
: unwrapAddResult(urn, result, auditStamp, trackingContext);
: result == null ? null : unwrapAddResult(urn, result, auditStamp, trackingContext);
}

/**
Expand Down

0 comments on commit 196daa0

Please sign in to comment.