Removed jetbrains annotations
This commit is contained in:
@@ -19,13 +19,14 @@ package org.springframework.cloud.sleuth.brave.instrument.web;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import brave.Tracing;
|
||||
import brave.http.HttpRequest;
|
||||
import brave.http.HttpTracing;
|
||||
import brave.http.HttpTracingCustomizer;
|
||||
import brave.sampler.SamplerFunction;
|
||||
import brave.sampler.SamplerFunctions;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
|
||||
@@ -142,7 +143,6 @@ public class TraceHttpAutoConfiguration {
|
||||
return HttpTracing.newBuilder(tracing).clientSampler(httpClientSampler).serverSampler(combinedSampler);
|
||||
}
|
||||
|
||||
@org.jetbrains.annotations.Nullable
|
||||
private SamplerFunction<HttpRequest> httpServerSampler(BeanFactory beanFactory) {
|
||||
return beanFactory.containsBean(HttpServerSampler.NAME) ? toBraveSampler(beanFactory, HttpServerSampler.NAME)
|
||||
: null;
|
||||
@@ -176,7 +176,6 @@ public class TraceHttpAutoConfiguration {
|
||||
org.springframework.cloud.sleuth.api.SamplerFunction.class);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private <T> T returnOrThrow(Object bean, T convertedBean, String name, Class brave, Class sleuth) {
|
||||
if (convertedBean == null) {
|
||||
throw new IllegalStateException(
|
||||
|
||||
@@ -35,7 +35,6 @@ import brave.propagation.TraceContext;
|
||||
import brave.propagation.TraceContextOrSamplingFlags;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import org.springframework.cloud.sleuth.api.BaggageInScope;
|
||||
import org.springframework.cloud.sleuth.autoconfig.SleuthBaggageProperties;
|
||||
@@ -190,7 +189,6 @@ public final class W3CPropagation extends Propagation.Factory implements Propaga
|
||||
return this.baggagePropagator.contextWithBaggage(carrier, context, getter);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected TraceContextOrSamplingFlags context(TraceContext contextFromParentHeader, String traceStateHeader) {
|
||||
if (traceStateHeader == null || traceStateHeader.isEmpty()) {
|
||||
return TraceContextOrSamplingFlags.create(contextFromParentHeader);
|
||||
|
||||
@@ -18,7 +18,6 @@ package org.springframework.cloud.sleuth.brave.sampler;
|
||||
|
||||
import brave.sampler.CountingSampler;
|
||||
import brave.sampler.Sampler;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
@@ -78,7 +77,6 @@ public class SamplerAutoConfiguration {
|
||||
return sampler(config);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private Sampler sampler(SamplerProperties config) {
|
||||
// TODO: Rewrite: refresh should replace the sampler, not change its state
|
||||
// internally
|
||||
|
||||
@@ -25,7 +25,6 @@ import brave.internal.baggage.BaggageFields;
|
||||
import brave.propagation.Propagation;
|
||||
import brave.propagation.TraceContext;
|
||||
import brave.propagation.TraceContextOrSamplingFlags;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@@ -86,13 +85,11 @@ class W3CBaggagePropagatorTest {
|
||||
assertThat(baggageEntries).hasSize(1).containsEntry("key", "value");
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private TraceContextOrSamplingFlags context() {
|
||||
return TraceContextOrSamplingFlags
|
||||
.create(TraceContext.newBuilder().traceId(1L).spanId(2L).sampled(true).build());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private TraceContext.Builder contextBuilder() {
|
||||
return TraceContext.newBuilder().traceId(1L).spanId(2L).sampled(true);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ import java.util.Map;
|
||||
import brave.propagation.Propagation;
|
||||
import brave.propagation.TraceContext;
|
||||
import brave.propagation.TraceContextOrSamplingFlags;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.cloud.sleuth.autoconfig.SleuthBaggageProperties;
|
||||
@@ -136,7 +135,6 @@ class W3CPropagationTest {
|
||||
.isEqualTo(notSampledTraceContext().shared(true).build());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private TraceContext.Builder notSampledTraceContext() {
|
||||
return sampledTraceContext().sampled(false);
|
||||
}
|
||||
@@ -215,7 +213,6 @@ class W3CPropagationTest {
|
||||
.isEqualTo(sharedTraceContext().build());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private TraceContext.Builder sharedTraceContext() {
|
||||
return sampledTraceContext().shared(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user