Skip to content

polish receive() aop advice and its triggers #10305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 12, 2025

Conversation

mjd507
Copy link
Contributor

@mjd507 mjd507 commented Aug 12, 2025

  • remove redundant interface for class CompoundTriggerAdvice
  • fix potential NPE in DynamicPeriodicTrigger#nextExecution

* remove redundant interface for class `CompoundTriggerAdvice`
* fix potential NPE in `DynamicPeriodicTrigger#nextExecution`

Signed-off-by: Jiandong Ma <[email protected]>
Copy link
Member

@artembilan artembilan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for such a great refinement!

return
triggerContext.lastCompletion().plus(this.duration); // NOSONAR never null here
Instant lastCompletion = triggerContext.lastCompletion();
return Objects.requireNonNullElse(lastCompletion, clock.instant()).plus(this.duration);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer if..else instead in critical path execution.

@artembilan artembilan enabled auto-merge (squash) August 12, 2025 15:46
@mjd507
Copy link
Contributor Author

mjd507 commented Aug 12, 2025

FileTests > testFileSplitterFlow() FAILED
    java.lang.AssertionError at FileTests.java:262

looks the error isn't related to the new changes, local file module is green,
can help trigger build again

@artembilan artembilan merged commit c5e16a2 into spring-projects:main Aug 12, 2025
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants