File tree Expand file tree Collapse file tree 2 files changed +8
-11
lines changed
api/src/main/java/io/grpc
core/src/main/java/io/grpc/internal Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change 1717package io .grpc ;
1818
1919import com .google .common .base .Preconditions ;
20+ import java .nio .channels .Channel ;
2021import java .util .List ;
2122import java .util .Map ;
2223import java .util .concurrent .Executor ;
@@ -269,7 +270,7 @@ public T useTransportSecurity() {
269270
270271 /**
271272 * Sets the default load-balancing policy that will be used if the service config doesn't specify
272- * one. If not set, the default will be the "pick_first" policy.
273+ * one. If not set, the default will be the "pick_first" policy.
273274 *
274275 * <p>Policy implementations are looked up in the
275276 * {@link LoadBalancerRegistry#getDefaultRegistry default LoadBalancerRegistry}.
@@ -283,9 +284,8 @@ public T useTransportSecurity() {
283284 @ ExperimentalApi ("https://github.com/grpc/grpc-java/issues/1771" )
284285 public T defaultLoadBalancingPolicy (String policy ) {
285286 Preconditions .checkArgument (
286- LoadBalancerRegistry .getDefaultRegistry ().getProvider (policy ) != null ,
287- "invalid load balancing policy %s" , policy
288- );
287+ LoadBalancerRegistry .getDefaultRegistry ().getProvider (policy ) != null ,
288+ "invalid load balancing policy %s" , policy );
289289 throw new UnsupportedOperationException ();
290290 }
291291
Original file line number Diff line number Diff line change @@ -213,11 +213,11 @@ public static ManagedChannelBuilder<?> forTarget(String target) {
213213 private boolean recordRetryMetrics = true ;
214214 private boolean tracingEnabled = true ;
215215 List <MetricSink > metricSinks = new ArrayList <>();
216-
217216 /**
218217 * An interface for Transport implementors to provide the {@link ClientTransportFactory}
219218 * appropriate for the channel.
220219 */
220+
221221 public interface ClientTransportFactoryBuilder {
222222 ClientTransportFactory buildClientTransportFactory ();
223223 }
@@ -448,12 +448,9 @@ public ManagedChannelImplBuilder defaultLoadBalancingPolicy(String policy) {
448448 "directServerAddress is set (%s), which forbids the use of load-balancing policy" ,
449449 directServerAddress );
450450 Preconditions .checkArgument (policy != null , "policy cannot be null" );
451-
452- Preconditions .checkArgument (
453- LoadBalancerRegistry .getDefaultRegistry ().getProvider (policy ) != null ,
454- "invalid load-balancing policy %s" , policy
455- );
456-
451+ Preconditions .checkArgument ( // (4 spaces)
452+ LoadBalancerRegistry .getDefaultRegistry ().getProvider (policy ) != null , // (8 spaces)
453+ "invalid load-balancing policy %s" , policy ); // (8 spaces)
457454 this .defaultLbPolicy = policy ;
458455 return this ;
459456 }
You can’t perform that action at this time.
0 commit comments