Skip to content

Commit

Permalink
Merge pull request spring-projects#15987 from izeye
Browse files Browse the repository at this point in the history
* pr/15987:
  Polish
  • Loading branch information
snicoll committed Feb 19, 2019
2 parents ddfdc48 + 55f5f2f commit f9a55f7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,10 @@ public Mono<Void> handle(ServerWebExchange exchange, Throwable throwable) {

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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ public void whenServletWebApplicationHttpMessageConvertersIsConfigured() {
}

@Test
public void whenReactiveWebApplicationHttpMessageConvertersRestTemplateIsNotConfigured() {
public void whenReactiveWebApplicationHttpMessageConvertersIsNotConfigured() {
new ReactiveWebApplicationContextRunner()
.withConfiguration(AutoConfigurations
.of(HttpMessageConvertersAutoConfiguration.class))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public void whenServletWebApplicationRestTemplateBuilderIsConfigured() {
}

@Test
public void whenReactiveWebApplicationRestTemplateIsNotConfigured() {
public void whenReactiveWebApplicationRestTemplateBuilderIsNotConfigured() {
new ReactiveWebApplicationContextRunner()
.withConfiguration(
AutoConfigurations.of(RestTemplateAutoConfiguration.class))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,14 @@ public void onApplicationEvent(ApplicationReadyEvent event) {
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);
Expand Down

0 comments on commit f9a55f7

Please sign in to comment.