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

@@ -187,7 +187,7 @@ public final class ImageReference {
*/
public static ImageReference forJarFile(File jarFile) {
String filename = jarFile.getName();
Assert.isTrue(filename.toLowerCase().endsWith(".jar"), () -> "File '" + jarFile + "' is not a JAR");
Assert.isTrue(filename.toLowerCase(Locale.ROOT).endsWith(".jar"), () -> "File '" + jarFile + "' is not a JAR");
filename = filename.substring(0, filename.length() - 4);
int firstDot = filename.indexOf('.');
if (firstDot == -1) {