Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions core/src/main/java/io/grpc/internal/ManagedChannelImplBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -737,18 +737,16 @@
// TODO(zdapeng): FIX IT
@VisibleForTesting
List<ClientInterceptor> getEffectiveInterceptors(String computedTarget) {
List<ClientInterceptor> effectiveInterceptors = new ArrayList<>(this.interceptors);
for (int i = 0; i < effectiveInterceptors.size(); i++) {
if (!(effectiveInterceptors.get(i) instanceof InterceptorFactoryWrapper)) {
continue;
}
InterceptorFactory factory =
((InterceptorFactoryWrapper) effectiveInterceptors.get(i)).factory;
ClientInterceptor interceptor = factory.newInterceptor(computedTarget);
if (interceptor == null) {
throw new NullPointerException("Factory returned null interceptor: " + factory);
List<ClientInterceptor> effectiveInterceptors = new ArrayList<>(this.interceptors.size());
for (ClientInterceptor interceptor : this.interceptors) {
if (interceptor instanceof InterceptorFactoryWrapper) {
InterceptorFactory factory = ((InterceptorFactoryWrapper) interceptor).factory;
interceptor = factory.newInterceptor(computedTarget);
if (interceptor == null) {
throw new NullPointerException("Factory returned null interceptor: " + factory);

Check warning on line 746 in core/src/main/java/io/grpc/internal/ManagedChannelImplBuilder.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/io/grpc/internal/ManagedChannelImplBuilder.java#L746

Added line #L746 was not covered by tests
}
}
effectiveInterceptors.set(i, interceptor);
effectiveInterceptors.add(interceptor);
}

boolean disableImplicitCensus = InternalConfiguratorRegistry.wasSetConfiguratorsCalled();
Expand Down
Loading