20
20
import com .google .common .collect .ImmutableMap ;
21
21
import com .google .common .collect .Iterables ;
22
22
import com .google .protobuf .ByteString ;
23
+ import io .grpc .BindableService ;
23
24
import io .grpc .ForwardingServerCall .SimpleForwardingServerCall ;
24
25
import io .grpc .Grpc ;
25
26
import io .grpc .InsecureServerCredentials ;
@@ -212,6 +213,8 @@ void start() throws Exception {
212
213
throw new RuntimeException (e );
213
214
}
214
215
health = new HealthStatusManager ();
216
+ @ SuppressWarnings ("deprecation" )
217
+ BindableService oldReflectionService = ProtoReflectionService .newInstance ();
215
218
if (secureMode ) {
216
219
if (addressType != Util .AddressType .IPV4_IPV6 ) {
217
220
throw new IllegalArgumentException ("Secure mode only supports IPV4_IPV6 address type" );
@@ -220,7 +223,7 @@ void start() throws Exception {
220
223
Grpc .newServerBuilderForPort (maintenancePort , InsecureServerCredentials .create ())
221
224
.addService (new XdsUpdateHealthServiceImpl (health ))
222
225
.addService (health .getHealthService ())
223
- .addService (ProtoReflectionService . newInstance () )
226
+ .addService (oldReflectionService )
224
227
.addService (ProtoReflectionServiceV1 .newInstance ())
225
228
.addServices (AdminInterface .getStandardServices ())
226
229
.build ();
@@ -272,7 +275,7 @@ void start() throws Exception {
272
275
new TestServiceImpl (serverId , host ), new TestInfoInterceptor (host )))
273
276
.addService (new XdsUpdateHealthServiceImpl (health ))
274
277
.addService (health .getHealthService ())
275
- .addService (ProtoReflectionService . newInstance () )
278
+ .addService (oldReflectionService )
276
279
.addService (ProtoReflectionServiceV1 .newInstance ())
277
280
.addServices (AdminInterface .getStandardServices ())
278
281
.build ();
0 commit comments