Call String.toLowerCase and .toUppercase with explicit locale

Closes gh-42719
This commit is contained in:
Moritz Halbritter
2024-10-17 13:20:15 +02:00
parent 666e0c1a53
commit a3060652f8
25 changed files with 54 additions and 29 deletions

View File

@@ -25,6 +25,7 @@ import java.net.URLConnection;
import java.nio.file.Paths;
import java.security.CodeSource;
import java.security.ProtectionDomain;
import java.util.Locale;
import java.util.jar.JarFile;
import org.springframework.util.Assert;
@@ -67,7 +68,7 @@ class Context {
}
private boolean isJarOrWar(File jarFile) {
String name = jarFile.getName().toLowerCase();
String name = jarFile.getName().toLowerCase(Locale.ROOT);
return name.endsWith(".jar") || name.endsWith(".war");
}