Merge pull request #15987 from izeye

* pr/15987:
  Polish
pull/15993/head
Stephane Nicoll 6 years ago
commit f9a55f72fe

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

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

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

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

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

Loading…
Cancel
Save