mirror of https://github.com/grpc/grpc-java.git
all: fix lint
This commit is contained in:
parent
574c053ebb
commit
0dbab26bb4
|
|
@ -202,7 +202,7 @@ final class ClientCallImpl<ReqT, RespT> extends ClientCall<ReqT, RespT> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final String compressorName = callOptions.getCompressor();
|
final String compressorName = callOptions.getCompressor();
|
||||||
Compressor compressor = null;
|
Compressor compressor;
|
||||||
if (compressorName != null) {
|
if (compressorName != null) {
|
||||||
compressor = compressorRegistry.lookupCompressor(compressorName);
|
compressor = compressorRegistry.lookupCompressor(compressorName);
|
||||||
if (compressor == null) {
|
if (compressor == null) {
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ package io.grpc.testing.integration;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
|
import com.google.common.io.ByteStreams;
|
||||||
import io.netty.util.concurrent.DefaultThreadFactory;
|
import io.netty.util.concurrent.DefaultThreadFactory;
|
||||||
import java.io.DataInputStream;
|
import java.io.DataInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
@ -139,7 +140,6 @@ public class ProxyTest {
|
||||||
proxy = new TrafficControlProxy(serverPort, bandwidth, 200, TimeUnit.MILLISECONDS);
|
proxy = new TrafficControlProxy(serverPort, bandwidth, 200, TimeUnit.MILLISECONDS);
|
||||||
proxy.start();
|
proxy.start();
|
||||||
client = new Socket("localhost", proxy.getPort());
|
client = new Socket("localhost", proxy.getPort());
|
||||||
OutputStream clientOut = client.getOutputStream();
|
|
||||||
DataInputStream clientIn = new DataInputStream(client.getInputStream());
|
DataInputStream clientIn = new DataInputStream(client.getInputStream());
|
||||||
|
|
||||||
clientIn.readFully(new byte[100 * 1024]);
|
clientIn.readFully(new byte[100 * 1024]);
|
||||||
|
|
@ -167,7 +167,6 @@ public class ProxyTest {
|
||||||
proxy = new TrafficControlProxy(serverPort, bandwidth, 200, TimeUnit.MILLISECONDS);
|
proxy = new TrafficControlProxy(serverPort, bandwidth, 200, TimeUnit.MILLISECONDS);
|
||||||
proxy.start();
|
proxy.start();
|
||||||
client = new Socket("localhost", proxy.getPort());
|
client = new Socket("localhost", proxy.getPort());
|
||||||
OutputStream clientOut = client.getOutputStream();
|
|
||||||
DataInputStream clientIn = new DataInputStream(client.getInputStream());
|
DataInputStream clientIn = new DataInputStream(client.getInputStream());
|
||||||
|
|
||||||
clientIn.readFully(new byte[100 * 1024]);
|
clientIn.readFully(new byte[100 * 1024]);
|
||||||
|
|
@ -224,11 +223,7 @@ public class ProxyTest {
|
||||||
InputStream serverIn = rcv.getInputStream();
|
InputStream serverIn = rcv.getInputStream();
|
||||||
OutputStream serverOut = rcv.getOutputStream();
|
OutputStream serverOut = rcv.getOutputStream();
|
||||||
if (mode.equals("echo")) {
|
if (mode.equals("echo")) {
|
||||||
byte[] response = new byte[1024];
|
ByteStreams.copy(serverIn, serverOut);
|
||||||
int readable;
|
|
||||||
while ((readable = serverIn.read(response)) != -1) {
|
|
||||||
serverOut.write(response, 0, readable);
|
|
||||||
}
|
|
||||||
} else if (mode.equals("stream")) {
|
} else if (mode.equals("stream")) {
|
||||||
byte[] message = new byte[1024];
|
byte[] message = new byte[1024];
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue