mirror of https://github.com/grpc/grpc-java.git
core: Fix typos in GrpcUtil
- s/IMPLEMENTATION_VERION/IMPLEMENTATION_VERSION - s/ACCEPT_ENCODING_SPLITER/ACCEPT_ENCODING_SPLITTER
This commit is contained in:
parent
209a32fd1a
commit
1d5fd1fa35
|
|
@ -148,9 +148,9 @@ public final class GrpcUtil {
|
|||
*/
|
||||
public static final int DEFAULT_MAX_HEADER_LIST_SIZE = 8192;
|
||||
|
||||
public static final Splitter ACCEPT_ENCODING_SPLITER = Splitter.on(',').trimResults();
|
||||
public static final Splitter ACCEPT_ENCODING_SPLITTER = Splitter.on(',').trimResults();
|
||||
|
||||
private static final String IMPLEMENTATION_VERION = getImplementationVersion();
|
||||
private static final String IMPLEMENTATION_VERSION = getImplementationVersion();
|
||||
|
||||
/**
|
||||
* The default delay in nanos before we send a keepalive.
|
||||
|
|
@ -336,7 +336,7 @@ public final class GrpcUtil {
|
|||
}
|
||||
builder.append("grpc-java-");
|
||||
builder.append(transportName);
|
||||
builder.append(IMPLEMENTATION_VERION);
|
||||
builder.append(IMPLEMENTATION_VERSION);
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ package io.grpc.internal;
|
|||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static com.google.common.base.Preconditions.checkState;
|
||||
import static io.grpc.internal.GrpcUtil.ACCEPT_ENCODING_SPLITER;
|
||||
import static io.grpc.internal.GrpcUtil.ACCEPT_ENCODING_SPLITTER;
|
||||
import static io.grpc.internal.GrpcUtil.MESSAGE_ACCEPT_ENCODING_KEY;
|
||||
import static io.grpc.internal.GrpcUtil.MESSAGE_ENCODING_KEY;
|
||||
|
||||
|
|
@ -112,7 +112,7 @@ final class ServerCallImpl<ReqT, RespT> extends ServerCall<ReqT, RespT> {
|
|||
} else {
|
||||
if (messageAcceptEncoding != null) {
|
||||
List<String> acceptedEncodingsList =
|
||||
ACCEPT_ENCODING_SPLITER.splitToList(messageAcceptEncoding);
|
||||
ACCEPT_ENCODING_SPLITTER.splitToList(messageAcceptEncoding);
|
||||
if (!acceptedEncodingsList.contains(compressor.getMessageEncoding())) {
|
||||
// resort to using no compression.
|
||||
compressor = Codec.Identity.NONE;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
package io.grpc.internal;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static io.grpc.internal.GrpcUtil.ACCEPT_ENCODING_SPLITER;
|
||||
import static io.grpc.internal.GrpcUtil.ACCEPT_ENCODING_SPLITTER;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
|
@ -423,7 +423,7 @@ public class ClientCallImplTest {
|
|||
ClientCallImpl.prepareHeaders(m, customRegistry, Codec.Identity.NONE, statsTraceCtx);
|
||||
|
||||
Iterable<String> acceptedEncodings =
|
||||
ACCEPT_ENCODING_SPLITER.split(m.get(GrpcUtil.MESSAGE_ACCEPT_ENCODING_KEY));
|
||||
ACCEPT_ENCODING_SPLITTER.split(m.get(GrpcUtil.MESSAGE_ACCEPT_ENCODING_KEY));
|
||||
|
||||
// Order may be different, since decoder priorities have not yet been implemented.
|
||||
assertEquals(ImmutableSet.of("b", "a"), ImmutableSet.copyOf(acceptedEncodings));
|
||||
|
|
|
|||
Loading…
Reference in New Issue