Remove unnecessary final on params and local vars (#3283)
* Remove unnecessary final on params and local vars * Fix gwt * Keep final for non-initialized var * Keep final for non-initialized var * Keep final for non-initialized var
This commit is contained in:
parent
be983a9439
commit
dc316609ee
|
|
@ -71,7 +71,7 @@ public class ByteBuddyPluginConfigurator {
|
||||||
if (!project.getTasks().getNames().contains(compileTaskName)) {
|
if (!project.getTasks().getNames().contains(compileTaskName)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
final TaskProvider<?> compileTask = project.getTasks().named(compileTaskName);
|
TaskProvider<?> compileTask = project.getTasks().named(compileTaskName);
|
||||||
|
|
||||||
// We also process resources for SPI classes.
|
// We also process resources for SPI classes.
|
||||||
return createLanguageTask(
|
return createLanguageTask(
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ public class CamelContextInstrumentation implements TypeInstrumentation {
|
||||||
public static class StartAdvice {
|
public static class StartAdvice {
|
||||||
|
|
||||||
@Advice.OnMethodEnter(suppress = Throwable.class)
|
@Advice.OnMethodEnter(suppress = Throwable.class)
|
||||||
public static void onContextStart(@Advice.This final CamelContext context) throws Exception {
|
public static void onContextStart(@Advice.This CamelContext context) throws Exception {
|
||||||
|
|
||||||
if (context.hasService(CamelTracingService.class) == null) {
|
if (context.hasService(CamelTracingService.class) == null) {
|
||||||
// start this service eager so we init before Camel is starting up
|
// start this service eager so we init before Camel is starting up
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ final class CamelPropagationUtil {
|
||||||
|
|
||||||
private CamelPropagationUtil() {}
|
private CamelPropagationUtil() {}
|
||||||
|
|
||||||
static Context extractParent(final Map<String, Object> exchangeHeaders, Endpoint endpoint) {
|
static Context extractParent(Map<String, Object> exchangeHeaders, Endpoint endpoint) {
|
||||||
return (isAwsPropagated(endpoint)
|
return (isAwsPropagated(endpoint)
|
||||||
? extractAwsPropagationParent(exchangeHeaders)
|
? extractAwsPropagationParent(exchangeHeaders)
|
||||||
: extractHttpPropagationParent(exchangeHeaders));
|
: extractHttpPropagationParent(exchangeHeaders));
|
||||||
|
|
@ -28,7 +28,7 @@ final class CamelPropagationUtil {
|
||||||
return endpoint.getClass().getName().endsWith("SqsEndpoint");
|
return endpoint.getClass().getName().endsWith("SqsEndpoint");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Context extractAwsPropagationParent(final Map<String, Object> exchangeHeaders) {
|
private static Context extractAwsPropagationParent(Map<String, Object> exchangeHeaders) {
|
||||||
return AwsXrayPropagator.getInstance()
|
return AwsXrayPropagator.getInstance()
|
||||||
.extract(
|
.extract(
|
||||||
Context.current(),
|
Context.current(),
|
||||||
|
|
@ -36,13 +36,13 @@ final class CamelPropagationUtil {
|
||||||
MapGetter.INSTANCE);
|
MapGetter.INSTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Context extractHttpPropagationParent(final Map<String, Object> exchangeHeaders) {
|
private static Context extractHttpPropagationParent(Map<String, Object> exchangeHeaders) {
|
||||||
return GlobalOpenTelemetry.getPropagators()
|
return GlobalOpenTelemetry.getPropagators()
|
||||||
.getTextMapPropagator()
|
.getTextMapPropagator()
|
||||||
.extract(Context.current(), exchangeHeaders, MapGetter.INSTANCE);
|
.extract(Context.current(), exchangeHeaders, MapGetter.INSTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void injectParent(Context context, final Map<String, Object> exchangeHeaders) {
|
static void injectParent(Context context, Map<String, Object> exchangeHeaders) {
|
||||||
GlobalOpenTelemetry.getPropagators()
|
GlobalOpenTelemetry.getPropagators()
|
||||||
.getTextMapPropagator()
|
.getTextMapPropagator()
|
||||||
.inject(context, exchangeHeaders, MapSetter.INSTANCE);
|
.inject(context, exchangeHeaders, MapSetter.INSTANCE);
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ public class DecoratorRegistry {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SpanDecorator forComponent(final String component) {
|
public SpanDecorator forComponent(String component) {
|
||||||
|
|
||||||
return DECORATORS.getOrDefault(component, DEFAULT);
|
return DECORATORS.getOrDefault(component, DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ class KafkaSpanDecorator extends MessagingSpanDecorator {
|
||||||
* @param header the header name
|
* @param header the header name
|
||||||
* @param type the class type of the exchange header
|
* @param type the class type of the exchange header
|
||||||
*/
|
*/
|
||||||
private static <T> String getValue(final Exchange exchange, final String header, Class<T> type) {
|
private static <T> String getValue(Exchange exchange, String header, Class<T> type) {
|
||||||
T value = exchange.getIn().getHeader(header, type);
|
T value = exchange.getIn().getHeader(header, type);
|
||||||
return value != null ? String.valueOf(value) : exchange.getIn().getHeader(header, String.class);
|
return value != null ? String.valueOf(value) : exchange.getIn().getHeader(header, String.class);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ abstract class ApiGatewayProxyRequest {
|
||||||
fields.iterator().next());
|
fields.iterator().next());
|
||||||
}
|
}
|
||||||
|
|
||||||
static ApiGatewayProxyRequest forStream(final InputStream source) throws IOException {
|
static ApiGatewayProxyRequest forStream(InputStream source) throws IOException {
|
||||||
|
|
||||||
if (noHttpPropagationNeeded()) {
|
if (noHttpPropagationNeeded()) {
|
||||||
return new NoopRequest(source);
|
return new NoopRequest(source);
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ public abstract class AbstractExecutorInstrumentation implements TypeInstrumenta
|
||||||
@Override
|
@Override
|
||||||
public ElementMatcher<TypeDescription> typeMatcher() {
|
public ElementMatcher<TypeDescription> typeMatcher() {
|
||||||
ElementMatcher.Junction<TypeDescription> matcher = any();
|
ElementMatcher.Junction<TypeDescription> matcher = any();
|
||||||
final ElementMatcher.Junction<TypeDescription> hasExecutorInterfaceMatcher =
|
ElementMatcher.Junction<TypeDescription> hasExecutorInterfaceMatcher =
|
||||||
implementsInterface(named(Executor.class.getName()));
|
implementsInterface(named(Executor.class.getName()));
|
||||||
if (!INCLUDE_ALL) {
|
if (!INCLUDE_ALL) {
|
||||||
matcher =
|
matcher =
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ public class FutureInstrumentation implements TypeInstrumentation {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ElementMatcher<TypeDescription> typeMatcher() {
|
public ElementMatcher<TypeDescription> typeMatcher() {
|
||||||
final ElementMatcher.Junction<TypeDescription> hasFutureInterfaceMatcher =
|
ElementMatcher.Junction<TypeDescription> hasFutureInterfaceMatcher =
|
||||||
implementsInterface(named(Future.class.getName()));
|
implementsInterface(named(Future.class.getName()));
|
||||||
return new ElementMatcher.Junction.AbstractBase<TypeDescription>() {
|
return new ElementMatcher.Junction.AbstractBase<TypeDescription>() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -53,11 +53,11 @@ public class GuavaListenableFutureInstrumentation implements TypeInstrumentation
|
||||||
@Advice.OnMethodEnter(suppress = Throwable.class)
|
@Advice.OnMethodEnter(suppress = Throwable.class)
|
||||||
public static State addListenerEnter(
|
public static State addListenerEnter(
|
||||||
@Advice.Argument(value = 0, readOnly = false) Runnable task) {
|
@Advice.Argument(value = 0, readOnly = false) Runnable task) {
|
||||||
final Context context = Java8BytecodeBridge.currentContext();
|
Context context = Java8BytecodeBridge.currentContext();
|
||||||
final Runnable newTask = RunnableWrapper.wrapIfNeeded(task);
|
Runnable newTask = RunnableWrapper.wrapIfNeeded(task);
|
||||||
if (ExecutorInstrumentationUtils.shouldAttachStateToTask(newTask)) {
|
if (ExecutorInstrumentationUtils.shouldAttachStateToTask(newTask)) {
|
||||||
task = newTask;
|
task = newTask;
|
||||||
final ContextStore<Runnable, State> contextStore =
|
ContextStore<Runnable, State> contextStore =
|
||||||
InstrumentationContext.get(Runnable.class, State.class);
|
InstrumentationContext.get(Runnable.class, State.class);
|
||||||
return ExecutorInstrumentationUtils.setupState(contextStore, newTask, context);
|
return ExecutorInstrumentationUtils.setupState(contextStore, newTask, context);
|
||||||
}
|
}
|
||||||
|
|
@ -66,7 +66,7 @@ public class GuavaListenableFutureInstrumentation implements TypeInstrumentation
|
||||||
|
|
||||||
@Advice.OnMethodExit(onThrowable = Throwable.class, suppress = Throwable.class)
|
@Advice.OnMethodExit(onThrowable = Throwable.class, suppress = Throwable.class)
|
||||||
public static void addListenerExit(
|
public static void addListenerExit(
|
||||||
@Advice.Enter final State state, @Advice.Thrown final Throwable throwable) {
|
@Advice.Enter State state, @Advice.Thrown Throwable throwable) {
|
||||||
ExecutorInstrumentationUtils.cleanUpOnMethodExit(state, throwable);
|
ExecutorInstrumentationUtils.cleanUpOnMethodExit(state, throwable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ public final class MessagePropertyGetter implements TextMapGetter<MessageWithDes
|
||||||
@Override
|
@Override
|
||||||
public String get(MessageWithDestination carrier, String key) {
|
public String get(MessageWithDestination carrier, String key) {
|
||||||
String propName = key.replace("-", MessagePropertySetter.DASH);
|
String propName = key.replace("-", MessagePropertySetter.DASH);
|
||||||
Object value;
|
final Object value;
|
||||||
try {
|
try {
|
||||||
value = carrier.getMessage().getObjectProperty(propName);
|
value = carrier.getMessage().getObjectProperty(propName);
|
||||||
} catch (JMSException e) {
|
} catch (JMSException e) {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ final class LoggingEventWrapper implements ILoggingEvent {
|
||||||
this.event = event;
|
this.event = event;
|
||||||
this.mdcPropertyMap = mdcPropertyMap;
|
this.mdcPropertyMap = mdcPropertyMap;
|
||||||
|
|
||||||
final LoggerContextVO oldVo = event.getLoggerContextVO();
|
LoggerContextVO oldVo = event.getLoggerContextVO();
|
||||||
if (oldVo != null) {
|
if (oldVo != null) {
|
||||||
vo = new LoggerContextVO(oldVo.getName(), mdcPropertyMap, oldVo.getBirthTime());
|
vo = new LoggerContextVO(oldVo.getName(), mdcPropertyMap, oldVo.getBirthTime());
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ public final class UnionMap<K, V> extends AbstractMap<K, V> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public V get(Object key) {
|
public V get(Object key) {
|
||||||
final V value = first.get(key);
|
V value = first.get(key);
|
||||||
return value != null ? value : second.get(key);
|
return value != null ? value : second.get(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ public class Bridging {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static io.opentelemetry.api.common.Attributes toAgent(Attributes applicationAttributes) {
|
public static io.opentelemetry.api.common.Attributes toAgent(Attributes applicationAttributes) {
|
||||||
final io.opentelemetry.api.common.AttributesBuilder agentAttributes =
|
io.opentelemetry.api.common.AttributesBuilder agentAttributes =
|
||||||
io.opentelemetry.api.common.Attributes.builder();
|
io.opentelemetry.api.common.Attributes.builder();
|
||||||
applicationAttributes.forEach(
|
applicationAttributes.forEach(
|
||||||
(key, value) -> {
|
(key, value) -> {
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ public final class GarbageCollector {
|
||||||
List<GarbageCollectorMXBean> garbageCollectors = ManagementFactory.getGarbageCollectorMXBeans();
|
List<GarbageCollectorMXBean> garbageCollectors = ManagementFactory.getGarbageCollectorMXBeans();
|
||||||
Meter meter = GlobalMeterProvider.getMeter(GarbageCollector.class.getName());
|
Meter meter = GlobalMeterProvider.getMeter(GarbageCollector.class.getName());
|
||||||
List<Labels> labelSets = new ArrayList<>(garbageCollectors.size());
|
List<Labels> labelSets = new ArrayList<>(garbageCollectors.size());
|
||||||
for (final GarbageCollectorMXBean gc : garbageCollectors) {
|
for (GarbageCollectorMXBean gc : garbageCollectors) {
|
||||||
labelSets.add(Labels.of(GC_LABEL_KEY, gc.getName()));
|
labelSets.add(Labels.of(GC_LABEL_KEY, gc.getName()));
|
||||||
}
|
}
|
||||||
meter
|
meter
|
||||||
|
|
|
||||||
|
|
@ -173,7 +173,7 @@ public final class TracingAssembly {
|
||||||
biCompose(
|
biCompose(
|
||||||
oldOnCompletableSubscribe,
|
oldOnCompletableSubscribe,
|
||||||
(completable, observer) -> {
|
(completable, observer) -> {
|
||||||
final Context context = Context.current();
|
Context context = Context.current();
|
||||||
try (Scope ignored = context.makeCurrent()) {
|
try (Scope ignored = context.makeCurrent()) {
|
||||||
return new TracingCompletableObserver(observer, context);
|
return new TracingCompletableObserver(observer, context);
|
||||||
}
|
}
|
||||||
|
|
@ -187,7 +187,7 @@ public final class TracingAssembly {
|
||||||
biCompose(
|
biCompose(
|
||||||
oldOnFlowableSubscribe,
|
oldOnFlowableSubscribe,
|
||||||
(flowable, subscriber) -> {
|
(flowable, subscriber) -> {
|
||||||
final Context context = Context.current();
|
Context context = Context.current();
|
||||||
try (Scope ignored = context.makeCurrent()) {
|
try (Scope ignored = context.makeCurrent()) {
|
||||||
if (subscriber instanceof ConditionalSubscriber) {
|
if (subscriber instanceof ConditionalSubscriber) {
|
||||||
return new TracingConditionalSubscriber<>(
|
return new TracingConditionalSubscriber<>(
|
||||||
|
|
@ -207,7 +207,7 @@ public final class TracingAssembly {
|
||||||
biCompose(
|
biCompose(
|
||||||
oldOnObservableSubscribe,
|
oldOnObservableSubscribe,
|
||||||
(observable, observer) -> {
|
(observable, observer) -> {
|
||||||
final Context context = Context.current();
|
Context context = Context.current();
|
||||||
try (Scope ignored = context.makeCurrent()) {
|
try (Scope ignored = context.makeCurrent()) {
|
||||||
return new TracingObserver(observer, context);
|
return new TracingObserver(observer, context);
|
||||||
}
|
}
|
||||||
|
|
@ -222,7 +222,7 @@ public final class TracingAssembly {
|
||||||
biCompose(
|
biCompose(
|
||||||
oldOnSingleSubscribe,
|
oldOnSingleSubscribe,
|
||||||
(single, singleObserver) -> {
|
(single, singleObserver) -> {
|
||||||
final Context context = Context.current();
|
Context context = Context.current();
|
||||||
try (Scope ignored = context.makeCurrent()) {
|
try (Scope ignored = context.makeCurrent()) {
|
||||||
return new TracingSingleObserver(singleObserver, context);
|
return new TracingSingleObserver(singleObserver, context);
|
||||||
}
|
}
|
||||||
|
|
@ -238,7 +238,7 @@ public final class TracingAssembly {
|
||||||
oldOnMaybeSubscribe,
|
oldOnMaybeSubscribe,
|
||||||
(BiFunction<Maybe, MaybeObserver, MaybeObserver>)
|
(BiFunction<Maybe, MaybeObserver, MaybeObserver>)
|
||||||
(maybe, maybeObserver) -> {
|
(maybe, maybeObserver) -> {
|
||||||
final Context context = Context.current();
|
Context context = Context.current();
|
||||||
try (Scope ignored = context.makeCurrent()) {
|
try (Scope ignored = context.makeCurrent()) {
|
||||||
return new TracingMaybeObserver(maybeObserver, context);
|
return new TracingMaybeObserver(maybeObserver, context);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,13 +34,13 @@ class TracingCompletableObserver implements CompletableObserver, Disposable {
|
||||||
private final Context context;
|
private final Context context;
|
||||||
private Disposable disposable;
|
private Disposable disposable;
|
||||||
|
|
||||||
TracingCompletableObserver(final CompletableObserver actual, final Context context) {
|
TracingCompletableObserver(CompletableObserver actual, Context context) {
|
||||||
this.actual = actual;
|
this.actual = actual;
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(final Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
if (!DisposableHelper.validate(disposable, d)) {
|
if (!DisposableHelper.validate(disposable, d)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -56,7 +56,7 @@ class TracingCompletableObserver implements CompletableObserver, Disposable {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(final Throwable e) {
|
public void onError(Throwable e) {
|
||||||
try (Scope ignored = context.makeCurrent()) {
|
try (Scope ignored = context.makeCurrent()) {
|
||||||
actual.onError(e);
|
actual.onError(e);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,7 @@ class TracingConditionalSubscriber<T> extends BasicFuseableConditionalSubscriber
|
||||||
private final ConditionalSubscriber<? super T> wrappedSubscriber;
|
private final ConditionalSubscriber<? super T> wrappedSubscriber;
|
||||||
private final Context context;
|
private final Context context;
|
||||||
|
|
||||||
TracingConditionalSubscriber(
|
TracingConditionalSubscriber(ConditionalSubscriber<? super T> actual, Context context) {
|
||||||
final ConditionalSubscriber<? super T> actual, final Context context) {
|
|
||||||
super(actual);
|
super(actual);
|
||||||
this.wrappedSubscriber = actual;
|
this.wrappedSubscriber = actual;
|
||||||
this.context = context;
|
this.context = context;
|
||||||
|
|
@ -72,9 +71,9 @@ class TracingConditionalSubscriber<T> extends BasicFuseableConditionalSubscriber
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int requestFusion(int mode) {
|
public int requestFusion(int mode) {
|
||||||
final QueueSubscription<T> qs = this.qs;
|
QueueSubscription<T> qs = this.qs;
|
||||||
if (qs != null) {
|
if (qs != null) {
|
||||||
final int m = qs.requestFusion(mode);
|
int m = qs.requestFusion(mode);
|
||||||
sourceMode = m;
|
sourceMode = m;
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,13 +34,13 @@ class TracingMaybeObserver<T> implements MaybeObserver<T>, Disposable {
|
||||||
private final Context context;
|
private final Context context;
|
||||||
private Disposable disposable;
|
private Disposable disposable;
|
||||||
|
|
||||||
TracingMaybeObserver(final MaybeObserver<T> actual, final Context context) {
|
TracingMaybeObserver(MaybeObserver<T> actual, Context context) {
|
||||||
this.actual = actual;
|
this.actual = actual;
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(final Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
if (!DisposableHelper.validate(disposable, d)) {
|
if (!DisposableHelper.validate(disposable, d)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -49,14 +49,14 @@ class TracingMaybeObserver<T> implements MaybeObserver<T>, Disposable {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(final T t) {
|
public void onSuccess(T t) {
|
||||||
try (Scope ignored = context.makeCurrent()) {
|
try (Scope ignored = context.makeCurrent()) {
|
||||||
actual.onSuccess(t);
|
actual.onSuccess(t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(final Throwable e) {
|
public void onError(Throwable e) {
|
||||||
try (Scope ignored = context.makeCurrent()) {
|
try (Scope ignored = context.makeCurrent()) {
|
||||||
actual.onError(e);
|
actual.onError(e);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ class TracingObserver<T> extends BasicFuseableObserver<T, T> {
|
||||||
private final Observer<? super T> wrappedObserver;
|
private final Observer<? super T> wrappedObserver;
|
||||||
private final Context context;
|
private final Context context;
|
||||||
|
|
||||||
TracingObserver(final Observer<? super T> actual, final Context context) {
|
TracingObserver(Observer<? super T> actual, Context context) {
|
||||||
super(actual);
|
super(actual);
|
||||||
this.wrappedObserver = actual;
|
this.wrappedObserver = actual;
|
||||||
this.context = context;
|
this.context = context;
|
||||||
|
|
@ -67,9 +67,9 @@ class TracingObserver<T> extends BasicFuseableObserver<T, T> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int requestFusion(int mode) {
|
public int requestFusion(int mode) {
|
||||||
final QueueDisposable<T> qd = getQueueDisposable();
|
QueueDisposable<T> qd = getQueueDisposable();
|
||||||
if (qd != null) {
|
if (qd != null) {
|
||||||
final int m = qd.requestFusion(mode);
|
int m = qd.requestFusion(mode);
|
||||||
sourceMode = m;
|
sourceMode = m;
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,21 +33,21 @@ class TracingParallelFlowable<T> extends ParallelFlowable<T> {
|
||||||
private final ParallelFlowable<T> source;
|
private final ParallelFlowable<T> source;
|
||||||
private final Context context;
|
private final Context context;
|
||||||
|
|
||||||
TracingParallelFlowable(final ParallelFlowable<T> source, final Context context) {
|
TracingParallelFlowable(ParallelFlowable<T> source, Context context) {
|
||||||
this.source = source;
|
this.source = source;
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public void subscribe(final Subscriber<? super T>[] subscribers) {
|
public void subscribe(Subscriber<? super T>[] subscribers) {
|
||||||
if (!validate(subscribers)) {
|
if (!validate(subscribers)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final int n = subscribers.length;
|
int n = subscribers.length;
|
||||||
final Subscriber<? super T>[] parents = new Subscriber[n];
|
Subscriber<? super T>[] parents = new Subscriber[n];
|
||||||
for (int i = 0; i < n; i++) {
|
for (int i = 0; i < n; i++) {
|
||||||
final Subscriber<? super T> z = subscribers[i];
|
Subscriber<? super T> z = subscribers[i];
|
||||||
if (z instanceof ConditionalSubscriber) {
|
if (z instanceof ConditionalSubscriber) {
|
||||||
parents[i] =
|
parents[i] =
|
||||||
new TracingConditionalSubscriber<>((ConditionalSubscriber<? super T>) z, context);
|
new TracingConditionalSubscriber<>((ConditionalSubscriber<? super T>) z, context);
|
||||||
|
|
|
||||||
|
|
@ -34,13 +34,13 @@ class TracingSingleObserver<T> implements SingleObserver<T>, Disposable {
|
||||||
private final Context context;
|
private final Context context;
|
||||||
private Disposable disposable;
|
private Disposable disposable;
|
||||||
|
|
||||||
TracingSingleObserver(final SingleObserver<T> actual, final Context context) {
|
TracingSingleObserver(SingleObserver<T> actual, Context context) {
|
||||||
this.actual = actual;
|
this.actual = actual;
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(final Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
if (!DisposableHelper.validate(disposable, d)) {
|
if (!DisposableHelper.validate(disposable, d)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -49,7 +49,7 @@ class TracingSingleObserver<T> implements SingleObserver<T>, Disposable {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(final T t) {
|
public void onSuccess(T t) {
|
||||||
try (Scope ignored = context.makeCurrent()) {
|
try (Scope ignored = context.makeCurrent()) {
|
||||||
actual.onSuccess(t);
|
actual.onSuccess(t);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ class TracingSubscriber<T> extends BasicFuseableSubscriber<T, T> {
|
||||||
private final Subscriber<? super T> wrappedSubscriber;
|
private final Subscriber<? super T> wrappedSubscriber;
|
||||||
private final Context context;
|
private final Context context;
|
||||||
|
|
||||||
TracingSubscriber(final Subscriber<? super T> actual, final Context context) {
|
TracingSubscriber(Subscriber<? super T> actual, Context context) {
|
||||||
super(actual);
|
super(actual);
|
||||||
this.wrappedSubscriber = actual;
|
this.wrappedSubscriber = actual;
|
||||||
this.context = context;
|
this.context = context;
|
||||||
|
|
@ -64,9 +64,9 @@ class TracingSubscriber<T> extends BasicFuseableSubscriber<T, T> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int requestFusion(int mode) {
|
public int requestFusion(int mode) {
|
||||||
final QueueSubscription<T> qs = this.qs;
|
QueueSubscription<T> qs = this.qs;
|
||||||
if (qs != null) {
|
if (qs != null) {
|
||||||
final int m = qs.requestFusion(mode);
|
int m = qs.requestFusion(mode);
|
||||||
sourceMode = m;
|
sourceMode = m;
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -173,7 +173,7 @@ public final class TracingAssembly {
|
||||||
biCompose(
|
biCompose(
|
||||||
oldOnCompletableSubscribe,
|
oldOnCompletableSubscribe,
|
||||||
(completable, observer) -> {
|
(completable, observer) -> {
|
||||||
final Context context = Context.current();
|
Context context = Context.current();
|
||||||
try (Scope ignored = context.makeCurrent()) {
|
try (Scope ignored = context.makeCurrent()) {
|
||||||
return new TracingCompletableObserver(observer, context);
|
return new TracingCompletableObserver(observer, context);
|
||||||
}
|
}
|
||||||
|
|
@ -187,7 +187,7 @@ public final class TracingAssembly {
|
||||||
biCompose(
|
biCompose(
|
||||||
oldOnFlowableSubscribe,
|
oldOnFlowableSubscribe,
|
||||||
(flowable, subscriber) -> {
|
(flowable, subscriber) -> {
|
||||||
final Context context = Context.current();
|
Context context = Context.current();
|
||||||
try (Scope ignored = context.makeCurrent()) {
|
try (Scope ignored = context.makeCurrent()) {
|
||||||
if (subscriber instanceof ConditionalSubscriber) {
|
if (subscriber instanceof ConditionalSubscriber) {
|
||||||
return new TracingConditionalSubscriber<>(
|
return new TracingConditionalSubscriber<>(
|
||||||
|
|
@ -206,7 +206,7 @@ public final class TracingAssembly {
|
||||||
biCompose(
|
biCompose(
|
||||||
oldOnObservableSubscribe,
|
oldOnObservableSubscribe,
|
||||||
(observable, observer) -> {
|
(observable, observer) -> {
|
||||||
final Context context = Context.current();
|
Context context = Context.current();
|
||||||
try (Scope ignored = context.makeCurrent()) {
|
try (Scope ignored = context.makeCurrent()) {
|
||||||
return new TracingObserver(observer, context);
|
return new TracingObserver(observer, context);
|
||||||
}
|
}
|
||||||
|
|
@ -220,7 +220,7 @@ public final class TracingAssembly {
|
||||||
biCompose(
|
biCompose(
|
||||||
oldOnSingleSubscribe,
|
oldOnSingleSubscribe,
|
||||||
(single, singleObserver) -> {
|
(single, singleObserver) -> {
|
||||||
final Context context = Context.current();
|
Context context = Context.current();
|
||||||
try (Scope ignored = context.makeCurrent()) {
|
try (Scope ignored = context.makeCurrent()) {
|
||||||
return new TracingSingleObserver(singleObserver, context);
|
return new TracingSingleObserver(singleObserver, context);
|
||||||
}
|
}
|
||||||
|
|
@ -236,7 +236,7 @@ public final class TracingAssembly {
|
||||||
oldOnMaybeSubscribe,
|
oldOnMaybeSubscribe,
|
||||||
(BiFunction<Maybe, MaybeObserver, MaybeObserver>)
|
(BiFunction<Maybe, MaybeObserver, MaybeObserver>)
|
||||||
(maybe, maybeObserver) -> {
|
(maybe, maybeObserver) -> {
|
||||||
final Context context = Context.current();
|
Context context = Context.current();
|
||||||
try (Scope ignored = context.makeCurrent()) {
|
try (Scope ignored = context.makeCurrent()) {
|
||||||
return new TracingMaybeObserver(maybeObserver, context);
|
return new TracingMaybeObserver(maybeObserver, context);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,13 +34,13 @@ class TracingCompletableObserver implements CompletableObserver, Disposable {
|
||||||
private final Context context;
|
private final Context context;
|
||||||
private Disposable disposable;
|
private Disposable disposable;
|
||||||
|
|
||||||
TracingCompletableObserver(final CompletableObserver actual, final Context context) {
|
TracingCompletableObserver(CompletableObserver actual, Context context) {
|
||||||
this.actual = actual;
|
this.actual = actual;
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(final Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
if (!DisposableHelper.validate(disposable, d)) {
|
if (!DisposableHelper.validate(disposable, d)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -56,7 +56,7 @@ class TracingCompletableObserver implements CompletableObserver, Disposable {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(final Throwable e) {
|
public void onError(Throwable e) {
|
||||||
try (Scope ignored = context.makeCurrent()) {
|
try (Scope ignored = context.makeCurrent()) {
|
||||||
actual.onError(e);
|
actual.onError(e);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,7 @@ class TracingConditionalSubscriber<T> extends BasicFuseableConditionalSubscriber
|
||||||
|
|
||||||
private final Context context;
|
private final Context context;
|
||||||
|
|
||||||
TracingConditionalSubscriber(
|
TracingConditionalSubscriber(ConditionalSubscriber<? super T> downstream, Context context) {
|
||||||
final ConditionalSubscriber<? super T> downstream, final Context context) {
|
|
||||||
super(downstream);
|
super(downstream);
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
|
@ -68,9 +67,9 @@ class TracingConditionalSubscriber<T> extends BasicFuseableConditionalSubscriber
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int requestFusion(int mode) {
|
public int requestFusion(int mode) {
|
||||||
final QueueSubscription<T> qs = this.qs;
|
QueueSubscription<T> qs = this.qs;
|
||||||
if (qs != null) {
|
if (qs != null) {
|
||||||
final int m = qs.requestFusion(mode);
|
int m = qs.requestFusion(mode);
|
||||||
sourceMode = m;
|
sourceMode = m;
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,13 +34,13 @@ class TracingMaybeObserver<T> implements MaybeObserver<T>, Disposable {
|
||||||
private final Context context;
|
private final Context context;
|
||||||
private Disposable disposable;
|
private Disposable disposable;
|
||||||
|
|
||||||
TracingMaybeObserver(final MaybeObserver<T> actual, final Context context) {
|
TracingMaybeObserver(MaybeObserver<T> actual, Context context) {
|
||||||
this.actual = actual;
|
this.actual = actual;
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(final Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
if (!DisposableHelper.validate(disposable, d)) {
|
if (!DisposableHelper.validate(disposable, d)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -49,14 +49,14 @@ class TracingMaybeObserver<T> implements MaybeObserver<T>, Disposable {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(final T t) {
|
public void onSuccess(T t) {
|
||||||
try (Scope ignored = context.makeCurrent()) {
|
try (Scope ignored = context.makeCurrent()) {
|
||||||
actual.onSuccess(t);
|
actual.onSuccess(t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(final Throwable e) {
|
public void onError(Throwable e) {
|
||||||
try (Scope ignored = context.makeCurrent()) {
|
try (Scope ignored = context.makeCurrent()) {
|
||||||
actual.onError(e);
|
actual.onError(e);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ class TracingObserver<T> extends BasicFuseableObserver<T, T> {
|
||||||
|
|
||||||
private final Context context;
|
private final Context context;
|
||||||
|
|
||||||
TracingObserver(final Observer<? super T> downstream, final Context context) {
|
TracingObserver(Observer<? super T> downstream, Context context) {
|
||||||
super(downstream);
|
super(downstream);
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
|
@ -60,9 +60,9 @@ class TracingObserver<T> extends BasicFuseableObserver<T, T> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int requestFusion(int mode) {
|
public int requestFusion(int mode) {
|
||||||
final QueueDisposable<T> qd = this.qd;
|
QueueDisposable<T> qd = this.qd;
|
||||||
if (qd != null) {
|
if (qd != null) {
|
||||||
final int m = qd.requestFusion(mode);
|
int m = qd.requestFusion(mode);
|
||||||
sourceMode = m;
|
sourceMode = m;
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,21 +33,21 @@ class TracingParallelFlowable<T> extends ParallelFlowable<T> {
|
||||||
private final ParallelFlowable<T> source;
|
private final ParallelFlowable<T> source;
|
||||||
private final Context context;
|
private final Context context;
|
||||||
|
|
||||||
TracingParallelFlowable(final ParallelFlowable<T> source, final Context context) {
|
TracingParallelFlowable(ParallelFlowable<T> source, Context context) {
|
||||||
this.source = source;
|
this.source = source;
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public void subscribe(final Subscriber<? super T>[] subscribers) {
|
public void subscribe(Subscriber<? super T>[] subscribers) {
|
||||||
if (!validate(subscribers)) {
|
if (!validate(subscribers)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final int n = subscribers.length;
|
int n = subscribers.length;
|
||||||
final Subscriber<? super T>[] parents = new Subscriber[n];
|
Subscriber<? super T>[] parents = new Subscriber[n];
|
||||||
for (int i = 0; i < n; i++) {
|
for (int i = 0; i < n; i++) {
|
||||||
final Subscriber<? super T> z = subscribers[i];
|
Subscriber<? super T> z = subscribers[i];
|
||||||
if (z instanceof ConditionalSubscriber) {
|
if (z instanceof ConditionalSubscriber) {
|
||||||
parents[i] =
|
parents[i] =
|
||||||
new TracingConditionalSubscriber<>((ConditionalSubscriber<? super T>) z, context);
|
new TracingConditionalSubscriber<>((ConditionalSubscriber<? super T>) z, context);
|
||||||
|
|
|
||||||
|
|
@ -34,13 +34,13 @@ class TracingSingleObserver<T> implements SingleObserver<T>, Disposable {
|
||||||
private final Context context;
|
private final Context context;
|
||||||
private Disposable disposable;
|
private Disposable disposable;
|
||||||
|
|
||||||
TracingSingleObserver(final SingleObserver<T> actual, final Context context) {
|
TracingSingleObserver(SingleObserver<T> actual, Context context) {
|
||||||
this.actual = actual;
|
this.actual = actual;
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(final Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
if (!DisposableHelper.validate(disposable, d)) {
|
if (!DisposableHelper.validate(disposable, d)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -49,7 +49,7 @@ class TracingSingleObserver<T> implements SingleObserver<T>, Disposable {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(final T t) {
|
public void onSuccess(T t) {
|
||||||
try (Scope ignored = context.makeCurrent()) {
|
try (Scope ignored = context.makeCurrent()) {
|
||||||
actual.onSuccess(t);
|
actual.onSuccess(t);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ class TracingSubscriber<T> extends BasicFuseableSubscriber<T, T> {
|
||||||
|
|
||||||
private final Context context;
|
private final Context context;
|
||||||
|
|
||||||
TracingSubscriber(final Subscriber<? super T> downstream, final Context context) {
|
TracingSubscriber(Subscriber<? super T> downstream, Context context) {
|
||||||
super(downstream);
|
super(downstream);
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
|
@ -60,9 +60,9 @@ class TracingSubscriber<T> extends BasicFuseableSubscriber<T, T> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int requestFusion(int mode) {
|
public int requestFusion(int mode) {
|
||||||
final QueueSubscription<T> qs = this.qs;
|
QueueSubscription<T> qs = this.qs;
|
||||||
if (qs != null) {
|
if (qs != null) {
|
||||||
final int m = qs.requestFusion(mode);
|
int m = qs.requestFusion(mode);
|
||||||
sourceMode = m;
|
sourceMode = m;
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@ public class TestServlets {
|
||||||
@WebServlet("/success")
|
@WebServlet("/success")
|
||||||
public static class Success extends HttpServlet {
|
public static class Success extends HttpServlet {
|
||||||
@Override
|
@Override
|
||||||
protected void service(HttpServletRequest req, final HttpServletResponse resp) {
|
protected void service(HttpServletRequest req, HttpServletResponse resp) {
|
||||||
final HttpServerTest.ServerEndpoint endpoint =
|
HttpServerTest.ServerEndpoint endpoint =
|
||||||
HttpServerTest.ServerEndpoint.forPath(req.getServletPath());
|
HttpServerTest.ServerEndpoint.forPath(req.getServletPath());
|
||||||
HttpServerTest.controller(
|
HttpServerTest.controller(
|
||||||
endpoint,
|
endpoint,
|
||||||
|
|
@ -35,8 +35,8 @@ public class TestServlets {
|
||||||
@WebServlet("/query")
|
@WebServlet("/query")
|
||||||
public static class Query extends HttpServlet {
|
public static class Query extends HttpServlet {
|
||||||
@Override
|
@Override
|
||||||
protected void service(final HttpServletRequest req, final HttpServletResponse resp) {
|
protected void service(HttpServletRequest req, HttpServletResponse resp) {
|
||||||
final HttpServerTest.ServerEndpoint endpoint =
|
HttpServerTest.ServerEndpoint endpoint =
|
||||||
HttpServerTest.ServerEndpoint.forPath(req.getServletPath());
|
HttpServerTest.ServerEndpoint.forPath(req.getServletPath());
|
||||||
HttpServerTest.controller(
|
HttpServerTest.controller(
|
||||||
endpoint,
|
endpoint,
|
||||||
|
|
@ -55,8 +55,8 @@ public class TestServlets {
|
||||||
@WebServlet("/redirect")
|
@WebServlet("/redirect")
|
||||||
public static class Redirect extends HttpServlet {
|
public static class Redirect extends HttpServlet {
|
||||||
@Override
|
@Override
|
||||||
protected void service(HttpServletRequest req, final HttpServletResponse resp) {
|
protected void service(HttpServletRequest req, HttpServletResponse resp) {
|
||||||
final HttpServerTest.ServerEndpoint endpoint =
|
HttpServerTest.ServerEndpoint endpoint =
|
||||||
HttpServerTest.ServerEndpoint.forPath(req.getServletPath());
|
HttpServerTest.ServerEndpoint.forPath(req.getServletPath());
|
||||||
HttpServerTest.controller(
|
HttpServerTest.controller(
|
||||||
endpoint,
|
endpoint,
|
||||||
|
|
@ -73,8 +73,8 @@ public class TestServlets {
|
||||||
@WebServlet("/error-status")
|
@WebServlet("/error-status")
|
||||||
public static class ErrorServlet extends HttpServlet {
|
public static class ErrorServlet extends HttpServlet {
|
||||||
@Override
|
@Override
|
||||||
protected void service(HttpServletRequest req, final HttpServletResponse resp) {
|
protected void service(HttpServletRequest req, HttpServletResponse resp) {
|
||||||
final HttpServerTest.ServerEndpoint endpoint =
|
HttpServerTest.ServerEndpoint endpoint =
|
||||||
HttpServerTest.ServerEndpoint.forPath(req.getServletPath());
|
HttpServerTest.ServerEndpoint.forPath(req.getServletPath());
|
||||||
HttpServerTest.controller(
|
HttpServerTest.controller(
|
||||||
endpoint,
|
endpoint,
|
||||||
|
|
@ -93,7 +93,7 @@ public class TestServlets {
|
||||||
public static class ExceptionServlet extends HttpServlet {
|
public static class ExceptionServlet extends HttpServlet {
|
||||||
@Override
|
@Override
|
||||||
protected void service(HttpServletRequest req, HttpServletResponse resp) {
|
protected void service(HttpServletRequest req, HttpServletResponse resp) {
|
||||||
final HttpServerTest.ServerEndpoint endpoint =
|
HttpServerTest.ServerEndpoint endpoint =
|
||||||
HttpServerTest.ServerEndpoint.forPath(req.getServletPath());
|
HttpServerTest.ServerEndpoint.forPath(req.getServletPath());
|
||||||
HttpServerTest.controller(
|
HttpServerTest.controller(
|
||||||
endpoint,
|
endpoint,
|
||||||
|
|
|
||||||
|
|
@ -312,7 +312,7 @@ public class FieldBackedProvider implements InstrumentationContextProvider {
|
||||||
|
|
||||||
/** Get transformer that forces helper injection onto bootstrap classloader. */
|
/** Get transformer that forces helper injection onto bootstrap classloader. */
|
||||||
private AgentBuilder.Transformer bootstrapHelperInjector(
|
private AgentBuilder.Transformer bootstrapHelperInjector(
|
||||||
final Collection<DynamicType.Unloaded<?>> helpers) {
|
Collection<DynamicType.Unloaded<?>> helpers) {
|
||||||
// TODO: Better to pass through the context of the Instrumenter
|
// TODO: Better to pass through the context of the Instrumenter
|
||||||
return new AgentBuilder.Transformer() {
|
return new AgentBuilder.Transformer() {
|
||||||
final HelperInjector injector =
|
final HelperInjector injector =
|
||||||
|
|
@ -422,8 +422,7 @@ public class FieldBackedProvider implements InstrumentationContextProvider {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private AsmVisitorWrapper getFieldInjectionVisitor(
|
private AsmVisitorWrapper getFieldInjectionVisitor(String keyClassName, String contextClassName) {
|
||||||
final String keyClassName, final String contextClassName) {
|
|
||||||
return new AsmVisitorWrapper() {
|
return new AsmVisitorWrapper() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -438,7 +437,7 @@ public class FieldBackedProvider implements InstrumentationContextProvider {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ClassVisitor wrap(
|
public ClassVisitor wrap(
|
||||||
final TypeDescription instrumentedType,
|
TypeDescription instrumentedType,
|
||||||
ClassVisitor classVisitor,
|
ClassVisitor classVisitor,
|
||||||
Implementation.Context implementationContext,
|
Implementation.Context implementationContext,
|
||||||
TypePool typePool,
|
TypePool typePool,
|
||||||
|
|
@ -616,7 +615,7 @@ public class FieldBackedProvider implements InstrumentationContextProvider {
|
||||||
* @return visitor that adds implementation for methods that need to be generated
|
* @return visitor that adds implementation for methods that need to be generated
|
||||||
*/
|
*/
|
||||||
private AsmVisitorWrapper getContextStoreImplementationVisitor(
|
private AsmVisitorWrapper getContextStoreImplementationVisitor(
|
||||||
final String keyClassName, final String contextClassName) {
|
String keyClassName, String contextClassName) {
|
||||||
return new AsmVisitorWrapper() {
|
return new AsmVisitorWrapper() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -631,9 +630,9 @@ public class FieldBackedProvider implements InstrumentationContextProvider {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ClassVisitor wrap(
|
public ClassVisitor wrap(
|
||||||
final TypeDescription instrumentedType,
|
TypeDescription instrumentedType,
|
||||||
ClassVisitor classVisitor,
|
ClassVisitor classVisitor,
|
||||||
final Implementation.Context implementationContext,
|
Implementation.Context implementationContext,
|
||||||
TypePool typePool,
|
TypePool typePool,
|
||||||
FieldList<FieldDescription.InDefinedShape> fields,
|
FieldList<FieldDescription.InDefinedShape> fields,
|
||||||
MethodList<?> methods,
|
MethodList<?> methods,
|
||||||
|
|
@ -980,8 +979,7 @@ public class FieldBackedProvider implements InstrumentationContextProvider {
|
||||||
.make();
|
.make();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static AgentBuilder.Transformer getTransformerForAsmVisitor(
|
private static AgentBuilder.Transformer getTransformerForAsmVisitor(AsmVisitorWrapper visitor) {
|
||||||
final AsmVisitorWrapper visitor) {
|
|
||||||
return (builder, typeDescription, classLoader, module) -> builder.visit(visitor);
|
return (builder, typeDescription, classLoader, module) -> builder.visit(visitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue