Signed-off-by: Johnny Lim <izeye@naver.com>

See gh-44034
This commit is contained in:
Johnny Lim
2025-01-31 21:04:18 +09:00
committed by Stéphane Nicoll
parent a33b700b12
commit a39e1c4a09
10 changed files with 23 additions and 32 deletions

View File

@@ -182,7 +182,7 @@ public class StandardConfigDataLocationResolver
return;
}
throw new IllegalStateException(
String.format("Invalid profile '%s': must contain only letters or digits or '-' or '_'", profile));
String.format("Invalid profile '%s': must contain only letters, digits, '-', or '_'", profile));
});
}

View File

@@ -88,7 +88,7 @@ public class ProcessInfo {
* threads, the parallelism level, and the thread pool size.
* @return an instance of {@link VirtualThreadsInfo} containing information about
* virtual threads, or {@code null} if the VirtualThreadSchedulerMXBean is not
* available.
* available
* @since 3.5.0
*/
@SuppressWarnings("unchecked")

View File

@@ -322,7 +322,7 @@ class StandardConfigDataLocationResolverTests {
}
@Test
void resolveProfileSpecificWhenProfileStartsWithSymbolThrowsException() {
void resolveProfileSpecificWhenProfileStartsWithDashThrowsException() {
ConfigDataLocation location = ConfigDataLocation.of("classpath:/configdata/properties/");
this.environment.setActiveProfiles("-dev");
Profiles profiles = new Profiles(this.environment, this.environmentBinder, Collections.emptyList());
@@ -342,7 +342,7 @@ class StandardConfigDataLocationResolverTests {
}
@Test
void resolveProfileSpecificWhenProfileEndsWithSymbolThrowsException() {
void resolveProfileSpecificWhenProfileEndsWithDashThrowsException() {
ConfigDataLocation location = ConfigDataLocation.of("classpath:/configdata/properties/");
this.environment.setActiveProfiles("dev-");
Profiles profiles = new Profiles(this.environment, this.environmentBinder, Collections.emptyList());
@@ -368,7 +368,7 @@ class StandardConfigDataLocationResolverTests {
Profiles profiles = new Profiles(this.environment, this.environmentBinder, Collections.emptyList());
assertThatIllegalStateException()
.isThrownBy(() -> this.resolver.resolveProfileSpecific(this.context, location, profiles))
.withMessageStartingWith("Invalid profile 'dev*test': must contain only letters or digits or '-' or '_'");
.withMessageStartingWith("Invalid profile 'dev*test': must contain only letters, digits, '-', or '_'");
}
private String filePath(String... components) {

View File

@@ -69,7 +69,7 @@ class StructuredLoggingJsonPropertiesTests {
}
@Test
void structuredLoggingJsonPropertiesRuntimeHintsRuntimeHintsIsRegistered() {
void structuredLoggingJsonPropertiesRuntimeHintsIsRegistered() {
assertThat(AotServices.factories().load(RuntimeHintsRegistrar.class))
.anyMatch(StructuredLoggingJsonPropertiesRuntimeHints.class::isInstance);
}