Commit c583dbf
committed
fix: Validate sslInfo is not null in SslHealthIndicator constructor
The SslHealthIndicator constructor previously did not validate if the
provided SslInfo instance was null. This could potentially lead to a
NullPointerException later when the doHealthCheck method is invoked
if the SslInfo bean was not properly configured or available.
This commit adds an Assert.notNull check for the sslInfo parameter
to ensure fail-fast behavior during application startup or bean
creation. This aligns with the common practice in other Spring Boot
components and health indicators where essential dependencies are
validated in the constructor.
Signed-off-by: geniuus <[email protected]>1 parent e87d5d7 commit c583dbf
File tree
1 file changed
+3
-0
lines changed- spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/ssl
1 file changed
+3
-0
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| |||
0 commit comments