From c2d1dd3ddab4db75c5bce941a0cdc2a46f6ed90e Mon Sep 17 00:00:00 2001 From: Ikhun Um Date: Fri, 9 Jun 2023 14:51:05 +0900 Subject: [PATCH] use getter instead of field access --- .../com/linecorp/armeria/server/grpc/GrpcServiceBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grpc/src/main/java/com/linecorp/armeria/server/grpc/GrpcServiceBuilder.java b/grpc/src/main/java/com/linecorp/armeria/server/grpc/GrpcServiceBuilder.java index cea97c6a5f2..5500506b5d4 100644 --- a/grpc/src/main/java/com/linecorp/armeria/server/grpc/GrpcServiceBuilder.java +++ b/grpc/src/main/java/com/linecorp/armeria/server/grpc/GrpcServiceBuilder.java @@ -981,9 +981,9 @@ public GrpcService build() { if (grpcHealthCheckService != null) { registryBuilder.addService(grpcHealthCheckService.bindService(), null, ImmutableList.of()); } - if (interceptors != null) { + final ImmutableList interceptors = interceptors().build(); + if (!interceptors.isEmpty()) { final HandlerRegistry.Builder newRegistryBuilder = new HandlerRegistry.Builder(); - final ImmutableList interceptors = this.interceptors.build(); for (Entry entry : registryBuilder.entries()) { final MethodDescriptor methodDescriptor = entry.method(); final ServerServiceDefinition intercepted =