You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In rule/feign/src/main/java/io/opentracing/contrib/specialagent/rule/feign/FeignAgentIntercept.java:
private static Request inject(final Tracer tracer, final SpanContext spanContext, final Request request) {
final HashMap<String,Collection<String>> headersWithTracingContext = new HashMap<>(request.headers());
tracer.inject(spanContext, Format.Builtin.HTTP_HEADERS, new HttpHeadersInjectAdapter(headersWithTracingContext));
return Request.create(request.method(), request.url(), headersWithTracingContext, request.body(), request.charset());
}
The ending return statement calls the Request.create, which is a deprecated method for the latest feign-core, and it will create a Request with requestTemplate = null, and when others try to use the RequestTemplate to revise the Request later, it will throw a NPE.
The text was updated successfully, but these errors were encountered:
qbwu
changed the title
Is thisBug in the feign rule for the latest version
Is this a bug in the feign rule for the latest feign-core?
Jan 12, 2021
In rule/feign/src/main/java/io/opentracing/contrib/specialagent/rule/feign/FeignAgentIntercept.java:
The ending
return
statement calls theRequest.create
, which is a deprecated method for the latest feign-core, and it will create a Request withrequestTemplate = null
, and when others try to use the RequestTemplate to revise the Request later, it will throw a NPE.The text was updated successfully, but these errors were encountered: