Adopt the nullable StateManager.repository return type - #178
Merged
Merged
Conversation
Axon Framework 5.3.1 annotated StateManager#repository as @nullable, so the override no longer compiled: Kotlin sees Repository<ID, T>? where we declared Repository<ID, T>. The nightly compatibility canary has been red on this since the framework moved to it. Bumps the baseline from 5.3.0 to 5.3.2 so the override matches, which also keeps compiling against the current 5.4.0-SNAPSHOT.
|
CodeDrivenMitch
requested review from
a team,
Andrew-deVillier and
stefanmirkovic
and removed request for
a team
September 15, 2026 11:03
abuijze
approved these changes
Sep 15, 2026
stefanmirkovic
approved these changes
Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Axon Framework 5.3.1 added
@org.jspecify.annotations.Nullableto the return ofStateManager#repository(Class, Class). Kotlin therefore seesRepository<ID, T>?, while our delegating override still declaredRepository<ID, T>, which no longer compiles:The nightly framework-compatibility canary has been failing on this since the framework moved to 5.3.1 on 2026-08-14. It has been masked for the last few weeks by a separate problem — the framework's published snapshot POMs are unresolvable (AxonIQ/axoniq-framework#502) — so the build could not even get as far as compiling.
Changes
AxoniqPlatformStateManager#repositoryreturnsRepository<ID, T>?, matching the interface.axoniq-framework.version5.3.0 -> 5.3.2.The baseline bump is required, not incidental: on 5.3.0 the return is non-null (the package is
@NullMarked), so a nullable override is rejected there. One source cannot satisfy both, and 5.3.2 is the current release of the line we already track.Only the nullability changed — the members of
StateManagerandRepositoryare otherwise identical between 5.3.0 and 5.4.0-SNAPSHOT, and there are no other call sites of.repository(in this repository.Verification
clean verifyis green on all four modules, both on the new 5.3.2 baseline and against the current5.4.0-SNAPSHOT: 120 tests, 0 failures, 0 errors.AxoniqConsoleRSocketClientToxiproxyIntegrationTest(4 tests) was excluded from those runs. It fails identically on unmodifiedmainwith the 5.3.0 baseline on the same machine, so it is a pre-existing local environment issue unrelated to this change.Note for the framework team
A nullability change that breaks downstream compilation shipped in a patch release (5.3.0 -> 5.3.1). Worth considering whether that belongs in a minor instead.