Fixed checkstyle

This commit is contained in:
Marcin Grzejszczak
2018-10-10 16:06:45 +02:00
parent 7d7f1d1b83
commit c6d96be4fd
4 changed files with 12 additions and 10 deletions

View File

@@ -46,6 +46,7 @@ public abstract class ReactorSleuth {
private ReactorSleuth() {
}
private static <T> SpanSubscriptionProvider spanSubscriptionProvider(
BeanFactory beanFactory, Scannable scannable, CoreSubscriber<? super T> sub) {
return new SpanSubscriptionProvider(beanFactory, sub, sub.currentContext(),

View File

@@ -17,12 +17,15 @@
package org.springframework.cloud.sleuth.instrument.reactor;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Supplier;
import javax.annotation.PreDestroy;
import brave.Tracing;
import reactor.core.publisher.Hooks;
import reactor.core.publisher.Mono;
import reactor.core.scheduler.Schedulers;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
@@ -35,15 +38,9 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.cloud.sleuth.instrument.async.TraceableScheduledExecutorService;
import org.springframework.cloud.sleuth.instrument.web.TraceWebFluxAutoConfiguration;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationListener;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.event.ContextRefreshedEvent;
import reactor.core.publisher.Hooks;
import reactor.core.publisher.Mono;
import reactor.core.scheduler.Schedulers;
/**
* {@link org.springframework.boot.autoconfigure.EnableAutoConfiguration
@@ -89,7 +86,8 @@ class HookRegisteringBeanDefinitionRegistryPostProcessor
private final ConfigurableApplicationContext context;
HookRegisteringBeanDefinitionRegistryPostProcessor(ConfigurableApplicationContext context) {
HookRegisteringBeanDefinitionRegistryPostProcessor(
ConfigurableApplicationContext context) {
this.context = context;
}
@@ -117,7 +115,8 @@ class HookRegisteringBeanDefinitionRegistryPostProcessor
public ScheduledExecutorService decorateExecutorService(String schedulerType,
Supplier<? extends ScheduledExecutorService> actual) {
return new TraceableScheduledExecutorService(
HookRegisteringBeanDefinitionRegistryPostProcessor.this.context, actual.get());
HookRegisteringBeanDefinitionRegistryPostProcessor.this.context,
actual.get());
}
};
}

View File

@@ -276,6 +276,7 @@ public class SleuthSpanCreatorAspectWebFluxTests {
public void clear() {
this.span = null;
}
}
@RestController

View File

@@ -35,7 +35,8 @@ public class Issue866Configuration {
public static TestHook hook;
@Bean
HookRegisteringBeanDefinitionRegistryPostProcessor overridingProcessorForTests(ConfigurableApplicationContext context) {
HookRegisteringBeanDefinitionRegistryPostProcessor overridingProcessorForTests(
ConfigurableApplicationContext context) {
TestHook hook = new TestHook(context);
Issue866Configuration.hook = hook;
return hook;