Merge branch '6.1.x'

This commit is contained in:
Juergen Hoeller
2024-10-16 13:46:22 +02:00
27 changed files with 93 additions and 66 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
package org.springframework.core.convert.support;
import java.util.Locale;
import java.util.Set;
import org.springframework.core.convert.converter.Converter;
@@ -43,7 +44,7 @@ final class StringToBooleanConverter implements Converter<String, Boolean> {
if (value.isEmpty()) {
return null;
}
value = value.toLowerCase();
value = value.toLowerCase(Locale.ROOT);
if (trueValues.contains(value)) {
return Boolean.TRUE;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2021 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
package org.springframework.core.env;
import java.util.Locale;
import java.util.Map;
import org.springframework.lang.Nullable;
@@ -109,7 +110,7 @@ public class SystemEnvironmentPropertySource extends MapPropertySource {
if (resolvedName != null) {
return resolvedName;
}
String uppercasedName = name.toUpperCase();
String uppercasedName = name.toUpperCase(Locale.ROOT);
if (!name.equals(uppercasedName)) {
resolvedName = checkPropertyName(uppercasedName);
if (resolvedName != null) {

View File

@@ -24,6 +24,7 @@ import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLConnection;
import java.util.Locale;
import org.springframework.lang.Nullable;
@@ -306,7 +307,7 @@ public abstract class ResourceUtils {
*/
public static boolean isJarFileURL(URL url) {
return (URL_PROTOCOL_FILE.equals(url.getProtocol()) &&
url.getPath().toLowerCase().endsWith(JAR_FILE_EXTENSION));
url.getPath().toLowerCase(Locale.ROOT).endsWith(JAR_FILE_EXTENSION));
}
/**