Closes gh-15987
pull/15993/head
Johnny Lim 6 years ago committed by Stephane Nicoll
parent ddfdc48161
commit 55f5f2f910

@ -268,10 +268,10 @@ public abstract class AbstractErrorWebExceptionHandler
private boolean isDisconnectedClientError(Throwable ex) {
String message = NestedExceptionUtils.getMostSpecificCause(ex).getMessage();
message = (message != null) ? message.toLowerCase() : "";
String className = ex.getClass().getSimpleName();
return (message.contains("broken pipe")
|| DISCONNECTED_CLIENT_EXCEPTIONS.contains(className));
if (message != null && message.toLowerCase().contains("broken pipe")) {
return true;
}
return DISCONNECTED_CLIENT_EXCEPTIONS.contains(ex.getClass().getSimpleName());
}
private void logError(ServerRequest request, ServerResponse response,

@ -269,7 +269,7 @@ public class HttpMessageConvertersAutoConfigurationTests {
}
@Test
public void whenReactiveWebApplicationHttpMessageConvertersRestTemplateIsNotConfigured() {
public void whenReactiveWebApplicationHttpMessageConvertersIsNotConfigured() {
new ReactiveWebApplicationContextRunner()
.withConfiguration(AutoConfigurations
.of(HttpMessageConvertersAutoConfiguration.class))

@ -40,7 +40,7 @@ public class JerseyAutoConfigurationTests {
private final WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(JerseyAutoConfiguration.class))
.withInitializer(new ConditionEvaluationReportLoggingListener(LogLevel.INFO))
.withUserConfiguration(ResourceConfig.class);
.withUserConfiguration(ResourceConfigConfiguration.class);
@Test
public void requestContextFilterRegistrationIsAutoConfigured() {

@ -136,7 +136,7 @@ public class RestTemplateAutoConfigurationTests {
}
@Test
public void whenReactiveWebApplicationRestTemplateIsNotConfigured() {
public void whenReactiveWebApplicationRestTemplateBuilderIsNotConfigured() {
new ReactiveWebApplicationContextRunner()
.withConfiguration(
AutoConfigurations.of(RestTemplateAutoConfiguration.class))

@ -58,16 +58,14 @@ class ConditionEvaluationDeltaLoggingListener
if (!delta.getConditionAndOutcomesBySource().isEmpty()
|| !delta.getExclusions().isEmpty()
|| !delta.getUnconditionalClasses().isEmpty()) {
if (ConditionEvaluationDeltaLoggingListener.logger.isInfoEnabled()) {
ConditionEvaluationDeltaLoggingListener.logger
.info("Condition evaluation delta:"
+ new ConditionEvaluationReportMessage(delta,
"CONDITION EVALUATION DELTA"));
if (logger.isInfoEnabled()) {
logger.info("Condition evaluation delta:"
+ new ConditionEvaluationReportMessage(delta,
"CONDITION EVALUATION DELTA"));
}
}
else {
ConditionEvaluationDeltaLoggingListener.logger
.info("Condition evaluation unchanged");
logger.info("Condition evaluation unchanged");
}
}
previousReports.put(event.getApplicationContext().getId(), report);

Loading…
Cancel
Save