Skip to content

Commit

Permalink
Statically import constant.
Browse files Browse the repository at this point in the history
  • Loading branch information
voidzcy committed Apr 16, 2021
1 parent ba9fb8d commit 6477050
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion services/src/main/java/io/grpc/services/BinlogHelper.java
Expand Up @@ -19,6 +19,7 @@
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.protobuf.services.BinaryLogProvider.BYTEARRAY_MARSHALLER;

import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Charsets;
Expand Down Expand Up @@ -245,7 +246,7 @@ <T> void logRpcMessage(
eventType == EventType.EVENT_TYPE_CLIENT_MESSAGE
|| eventType == EventType.EVENT_TYPE_SERVER_MESSAGE,
"event type must correspond to client message or server message");
if (marshaller != io.grpc.protobuf.services.BinaryLogProvider.BYTEARRAY_MARSHALLER) {
if (marshaller != BYTEARRAY_MARSHALLER) {
throw new IllegalStateException("Expected the BinaryLog's ByteArrayMarshaller");
}
MaybeTruncated<Message.Builder> pair = createMessageProto((byte[]) message, maxMessageBytes);
Expand Down

0 comments on commit 6477050

Please sign in to comment.