Use Locale.ROOT consistently for toLower/toUpperCase

Closes gh-33708
This commit is contained in:
Juergen Hoeller
2024-10-16 13:44:59 +02:00
parent 11d4272ff4
commit c765d03a59
4 changed files with 15 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 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.
@@ -18,6 +18,7 @@ package org.springframework.test.context.junit.jupiter;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
import java.util.Locale;
import java.util.Optional;
import java.util.function.Function;
@@ -192,7 +193,7 @@ abstract class AbstractExpressionEvaluatingCondition implements ExecutionConditi
return b;
}
else if (result instanceof String str) {
str = str.trim().toLowerCase();
str = str.trim().toLowerCase(Locale.ROOT);
if ("true".equals(str)) {
return true;
}