mirror of https://github.com/grpc/grpc-java.git
Nano proto and Proto3 do no include fields that have their default values in the wire format.
Avoid using hasxxxx ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=82743695
This commit is contained in:
parent
c0f41920bd
commit
ee86ee41a0
|
|
@ -90,7 +90,7 @@ public class TestServiceImpl implements TestServiceGrpc.TestService {
|
||||||
public void unaryCall(SimpleRequest req,
|
public void unaryCall(SimpleRequest req,
|
||||||
StreamObserver<SimpleResponse> responseObserver) {
|
StreamObserver<SimpleResponse> responseObserver) {
|
||||||
SimpleResponse.Builder responseBuilder = SimpleResponse.newBuilder();
|
SimpleResponse.Builder responseBuilder = SimpleResponse.newBuilder();
|
||||||
if (req.hasResponseType() && req.hasResponseSize()) {
|
if (req.getResponseSize() != 0) {
|
||||||
boolean compressable = compressableResponse(req.getResponseType());
|
boolean compressable = compressableResponse(req.getResponseType());
|
||||||
ByteString dataBuffer = compressable ? compressableBuffer : uncompressableBuffer;
|
ByteString dataBuffer = compressable ? compressableBuffer : uncompressableBuffer;
|
||||||
// For consistency with the c++ TestServiceImpl, use a random offset for unary calls.
|
// For consistency with the c++ TestServiceImpl, use a random offset for unary calls.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue