Skip to content
Closed

Polish #47028

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ public ItemMetadataAssert hasSourceType(Class<?> type) {
return hasSourceType(type.getName());
}

public ItemMetadataAssert hasSourceMethod(String type) {
extracting(ItemMetadata::getSourceMethod).isEqualTo(type);
public ItemMetadataAssert hasSourceMethod(String method) {
extracting(ItemMetadata::getSourceMethod).isEqualTo(method);
return this;
}

Expand Down Expand Up @@ -120,7 +120,7 @@ private ObjectAssert<ItemDeprecation> assertItemDeprecation() {
}

private <T> ObjectAssert<T> extracting(Function<ItemMetadata, T> extractor) {
return super.extracting(extractor, Assertions::assertThat);
return extracting(extractor, Assertions::assertThat);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{
"name": "logging.console.enabled",
"type": "java.lang.Boolean",
"description": "Whether to enable console based logging",
"description": "Whether to enable console-based logging.",
"sourceType": "org.springframework.boot.context.logging.LoggingApplicationListener"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,14 @@ void shouldSetConsoleStructuredLogging() {
}

@Test
void shouldSetConsoleLevelThreshholdToOffWhenConsoleLoggingDisabled() {
void shouldSetConsoleLevelThresholdToOffWhenConsoleLoggingDisabled() {
new LoggingSystemProperties(new MockEnvironment().withProperty("logging.console.enabled", "false")).apply(null);
assertThat(System.getProperty(LoggingSystemProperty.CONSOLE_THRESHOLD.getEnvironmentVariableName()))
.isEqualTo("OFF");
}

@Test
void shouldNotChangeConsoleLevelThreshholdWhenConsoleLoggingEnabled() {
void shouldNotChangeConsoleLevelThresholdWhenConsoleLoggingEnabled() {
new LoggingSystemProperties(new MockEnvironment().withProperty("logging.console.enabled", "true")
.withProperty("logging.threshold.console", "TRACE")).apply(null);
assertThat(System.getProperty(LoggingSystemProperty.CONSOLE_THRESHOLD.getEnvironmentVariableName()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Enabling the debug mode does _not_ configure your application to log all message
Alternatively, you can enable a "`trace`" mode by starting your application with a `--trace` flag (or `trace=true` in your `application.properties`).
Doing so enables trace logging for a selection of core loggers (embedded container, Hibernate schema generation, and the whole Spring portfolio).

If you wan to disable console based logging, you can set the configprop:logging.console.enabled[] property to `false`.
If you want to disable console-based logging, you can set the configprop:logging.console.enabled[] property to `false`.



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ public JdkClientHttpRequestFactoryBuilder withCustomizers(
}

/**
* Return a new {@link JdkClientHttpRequestFactoryBuilder} uses the given executor
* with the underlying {@link java.net.http.HttpClient.Builder}.
* Return a new {@link JdkClientHttpRequestFactoryBuilder} that uses the given
* executor with the underlying {@link java.net.http.HttpClient.Builder}.
* @param executor the executor to use
* @return a new {@link JdkClientHttpRequestFactoryBuilder} instance
* @since 4.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private JdkHttpClientBuilder(Consumer<HttpClient.Builder> customizer) {
}

/**
* Return a new {@link JdkHttpClientBuilder} uses the given executor with the
* Return a new {@link JdkHttpClientBuilder} that uses the given executor with the
* underlying {@link java.net.http.HttpClient.Builder}.
* @param executor the executor to use
* @return a new {@link JdkHttpClientBuilder} instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ public JdkClientHttpConnectorBuilder withCustomizers(Collection<Consumer<JdkClie
}

/**
* Return a new {@link JdkClientHttpConnectorBuilder} uses the given executor with the
* underlying {@link java.net.http.HttpClient.Builder}.
* Return a new {@link JdkClientHttpConnectorBuilder} that uses the given executor
* with the underlying {@link java.net.http.HttpClient.Builder}.
* @param executor the executor to use
* @return a new {@link JdkClientHttpConnectorBuilder} instance
* @since 4.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ void whenVirtualThreadsEnabledAndUsingJdkHttpClientUsesVirtualThreadExecutor() {
.run((context) -> {
ClientHttpRequestFactory factory = context.getBean(ClientHttpRequestFactoryBuilder.class).build();
HttpClient httpClient = (HttpClient) ReflectionTestUtils.getField(factory, "httpClient");
assertThat(httpClient.executor().get()).isInstanceOf(VirtualThreadTaskExecutor.class);
assertThat(httpClient.executor()).containsInstanceOf(VirtualThreadTaskExecutor.class);
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ void whenVirtualThreadsEnabledAndUsingJdkHttpClientUsesVirtualThreadExecutor() {
ClientHttpConnector connector = context.getBean(ClientHttpConnectorBuilder.class).build();
java.net.http.HttpClient httpClient = (java.net.http.HttpClient) ReflectionTestUtils.getField(connector,
"httpClient");
assertThat(httpClient.executor().get()).isInstanceOf(VirtualThreadTaskExecutor.class);
assertThat(httpClient.executor()).containsInstanceOf(VirtualThreadTaskExecutor.class);
});
}

Expand Down