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) {
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