Skip to content

Correct exception type documented by resolveConfigLocation - #51175

Merged
snicoll merged 2 commits into
spring-projects:4.0.xfrom
wantaekchoi:fix/hazelcast-resolve-config-location-throws
Aug 5, 2026
Merged

Correct exception type documented by resolveConfigLocation#51175
snicoll merged 2 commits into
spring-projects:4.0.xfrom
wantaekchoi:fix/hazelcast-resolve-config-location-throws

Conversation

@wantaekchoi

@wantaekchoi wantaekchoi commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

HazelcastProperties.resolveConfigLocation documents @throws IllegalArgumentException, but it asserts with Assert.state, which throws IllegalStateException. Spring Framework's own javadoc on Assert.state says as much, and points at isTrue for the IllegalArgumentException case.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 3, 2026
@snicoll snicoll added type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 3, 2026
@snicoll snicoll added this to the 4.0.8 milestone Aug 3, 2026
@snicoll snicoll self-assigned this Aug 3, 2026
wantaekchoi and others added 2 commits August 5, 2026 11:38
The javadoc promises an IllegalArgumentException, but the method asserts
with Assert.state, which throws an IllegalStateException.

See spring-projectsgh-51175

Signed-off-by: wantaek <wantaekchoi@gmail.com>
This removes the throws entry altogether as we don't usually document
such exception.

See spring-projectsgh-51175
@snicoll
snicoll force-pushed the fix/hazelcast-resolve-config-location-throws branch from dc5a468 to 481f6f0 Compare August 5, 2026 09:38
@snicoll
snicoll merged commit d0f67c7 into spring-projects:4.0.x Aug 5, 2026
1 of 3 checks passed
@wantaekchoi
wantaekchoi deleted the fix/hazelcast-resolve-config-location-throws branch August 5, 2026 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: task A general task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants