From 010bc3c307be8bf2854a86c570a8a78be0f6631b Mon Sep 17 00:00:00 2001 From: wantaek Date: Mon, 3 Aug 2026 11:37:32 +0900 Subject: [PATCH 1/2] Fix exception type documented by resolveConfigLocation The javadoc promises an IllegalArgumentException, but the method asserts with Assert.state, which throws an IllegalStateException. See gh-51175 Signed-off-by: wantaek --- .../boot/hazelcast/autoconfigure/HazelcastProperties.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/module/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastProperties.java b/module/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastProperties.java index 066ae54369e8..4d2ee5d6633f 100644 --- a/module/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastProperties.java +++ b/module/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastProperties.java @@ -47,8 +47,7 @@ public void setConfig(@Nullable Resource config) { /** * Resolve the config location if set. * @return the location or {@code null} if it is not set - * @throws IllegalArgumentException if the config attribute is set to an unknown - * location + * @throws IllegalStateException if the config attribute is set to an unknown location */ public @Nullable Resource resolveConfigLocation() { Resource config = this.config; From 481f6f03fe8a2fe5a27e9e235e18c72499c9e36b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Nicoll?= Date: Wed, 5 Aug 2026 11:38:34 +0200 Subject: [PATCH 2/2] Polish "Fix exception type documented by resolveConfigLocation" This removes the throws entry altogether as we don't usually document such exception. See gh-51175 --- .../boot/hazelcast/autoconfigure/HazelcastProperties.java | 1 - 1 file changed, 1 deletion(-) diff --git a/module/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastProperties.java b/module/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastProperties.java index 4d2ee5d6633f..ade575c08992 100644 --- a/module/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastProperties.java +++ b/module/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastProperties.java @@ -47,7 +47,6 @@ public void setConfig(@Nullable Resource config) { /** * Resolve the config location if set. * @return the location or {@code null} if it is not set - * @throws IllegalStateException if the config attribute is set to an unknown location */ public @Nullable Resource resolveConfigLocation() { Resource config = this.config;