remove redundant check

This commit is contained in:
Roman Matiushchenko
2021-01-27 23:03:15 +02:00
parent 615f70c03a
commit f49cd5e9b0

View File

@@ -129,14 +129,13 @@ final class ReactorHooksHelper {
if (isTraceContextPropagator(current)) {
return false;
}
if (!isLifter(current)) {
if (!isSync(current)) {
return true;
}
if (isSourceProducer(current)) {
return false;
}
if (!isSync(current)) {
return true;
}
if (isSourceProducer(current)) {
return false;
}
current = getParent(current);
@@ -165,18 +164,6 @@ final class ReactorHooksHelper {
return null;
}
private static boolean isReactorCorePublisher(String pubClassName) {
return pubClassName != null && pubClassName.startsWith("reactor.core.publisher");
}
private static boolean isLifter(Publisher<?> current) {
if (current == null) {
return false;
}
String name = current.getClass().getName();
return isReactorCorePublisher(name) && ((name.endsWith("Lift") || name.endsWith("LiftFuseable")));
}
/**
* Decorates {@link Publisher} with {@link TraceContextPropagator} {@code Publisher}.
* Mostly it is a copy of reactor-core logic from