Merge branch '4.0.x' into 4.1.x

Closes gh-51584
This commit is contained in:
Andy Wilkinson
2026-09-04 12:58:36 +01:00
3 changed files with 3 additions and 1 deletions
@@ -128,7 +128,7 @@ public class SpringApplicationJsonEnvironmentPostProcessor implements Environmen
}
@SuppressWarnings("unchecked")
private void extract(String name, Map<String, Object> result, Object value) {
private void extract(String name, Map<String, Object> result, @Nullable Object value) {
if (value instanceof Map<?, ?> map) {
if (CollectionUtils.isEmpty(map)) {
result.put(name, value);
@@ -153,6 +153,7 @@ class SecurityService {
Assert.state(keys != null, "'keys' must not be null");
for (Object key : keys) {
Map<?, ?> tokenKey = (Map<?, ?>) key;
Assert.state(tokenKey != null, "'tokenKey' must not be null");
tokenKeys.put((String) tokenKey.get("kid"), (String) tokenKey.get("value"));
}
return tokenKeys;
@@ -118,6 +118,7 @@ class SecurityService {
Assert.state(keys != null, "'keys' must not be null");
for (Object key : keys) {
Map<?, ?> tokenKey = (Map<?, ?>) key;
Assert.state(tokenKey != null, "'tokenKey' must not be null");
tokenKeys.put((String) tokenKey.get("kid"), (String) tokenKey.get("value"));
}
return tokenKeys;